Skip to content

Conversation

@akabiru
Copy link
Member

@akabiru akabiru commented Jan 6, 2026

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)

  • Extend seeder so that new OP instances will have Documents right from the start.
  • Create a migration that sets the default modules to include "Documents" for new projects even for existing instances.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

1 Warning
⚠️ This PR has migration-related changes on a release branch. Ping @opf/operations

Generated by 🚫 Danger

@akabiru akabiru added this to the 17.0.x milestone Jan 6, 2026
@akabiru akabiru self-assigned this Jan 6, 2026
@akabiru akabiru requested a review from Copilot January 6, 2026 15:53
Copy link
Contributor

Copilot AI left a 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 true to 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

@akabiru akabiru force-pushed the feature/69562-seeder-migration-enable-documents-module-per-default-for-new-projects branch from d0b40f7 to 9ab26e6 Compare January 7, 2026 05:41
@akabiru akabiru changed the title Feature/69562 add seeder migration that enables documents module per default for new projects Feature/69562 add seeder migration that enables documents module by default for new projects Jan 7, 2026
@akabiru akabiru force-pushed the feature/69562-seeder-migration-enable-documents-module-per-default-for-new-projects branch 3 times, most recently from 11eee3a to fed0e95 Compare January 7, 2026 11:08
@akabiru akabiru marked this pull request as ready for review January 7, 2026 11:21
@akabiru akabiru requested review from brunopagno and cbliard January 7, 2026 11:29
Copy link
Contributor

@brunopagno brunopagno left a 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 😁

Copy link
Member

@cbliard cbliard left a 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.

…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.
@akabiru akabiru force-pushed the feature/69562-seeder-migration-enable-documents-module-per-default-for-new-projects branch from 90129b2 to 6708d21 Compare January 9, 2026 05:51
Copy link
Member

@cbliard cbliard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good 👍

@akabiru akabiru merged commit b0a306a into release/17.0 Jan 9, 2026
15 of 17 checks passed
@akabiru akabiru deleted the feature/69562-seeder-migration-enable-documents-module-per-default-for-new-projects branch January 9, 2026 08:04
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants