-
Notifications
You must be signed in to change notification settings - Fork 3k
Feature/69562 add seeder migration that enables documents module by default for new projects #21561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/69562 add seeder migration that enables documents module by default for new projects #21561
Conversation
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds the "documents" module to the default project modules when real-time text collaboration is enabled. The implementation includes a migration for existing installations, updates to the setting definition to make the default conditional, and seeder updates for new installations.
- Migration adds "documents" module to existing installations with collaboration enabled
- Setting definition now conditionally includes "documents" in default modules based on collaboration feature status
- Default value for real_time_text_collaboration_enabled changed from static
trueto check for required environment variables - Demo projects updated to include documents module
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| db/migrate/20260106151226_add_documents_to_default_projects_modules.rb | Migration that adds "documents" to default_projects_modules setting for existing installations when real-time collaboration is enabled |
| config/constants/settings/definition.rb | Updates default_projects_modules to conditionally include "documents" based on collaboration feature; changes real_time_text_collaboration_enabled default to check ENV variables |
| app/seeders/standard.yml | Adds "documents" module to demo projects (Demo project and Scrum project) |
| spec/migrations/add_documents_to_default_projects_modules_spec.rb | Tests for the migration covering enabled/disabled collaboration scenarios and edge cases |
| spec/models/setting_spec.rb | Tests for the conditional default logic in the setting definition |
d0b40f7 to
9ab26e6
Compare
11eee3a to
fed0e95
Compare
brunopagno
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, @akabiru
Left only one comment.
And probably still worth getting a review from the devops team 😁
cbliard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good overall. I have some comments.
...les/documents/spec/features/documents/admin/settings/document_collaboration_settings_spec.rb
Outdated
Show resolved
Hide resolved
…abled Note: For existing instances, documents will only be added to defaults if real-time collaboration is enabled when the migration runs. Enabling collaboration later requires manual addition to default modules.
Ensures the real_time_text_collaboration_enabled setting exists before checking its value in the migration. This guards against potential edge cases where the setting definition might be removed in the future.
90129b2 to
6708d21
Compare
cbliard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good 👍
Ticket
https://community.openproject.org/wp/69562
What are you trying to accomplish?
Right now, people need to add the Documents module manually per project. Ideally that module is turned on by default.
Only enable the default modules if real time text collaboration is enabled (by default should be OFF)
Merge checklist