Skip to content

[#73798] Remove scrum_projects feature flag from Backlogs#22740

Open
myabc wants to merge 13 commits intodevfrom
code-maintenance/73798-remove-scrum_projects-feature-flag
Open

[#73798] Remove scrum_projects feature flag from Backlogs#22740
myabc wants to merge 13 commits intodevfrom
code-maintenance/73798-remove-scrum_projects-feature-flag

Conversation

@myabc
Copy link
Copy Markdown
Contributor

@myabc myabc commented Apr 13, 2026

Ticket

https://community.openproject.org/wp/73798

What are you trying to accomplish?

Remove the scrum_projects feature flag from Backlogs and make the sprint-based implementation permanent.

What approach did you choose and why?

The flag was already permanently active ("forced"), so the old branches were dead code. This PR:

  • Removes the scrum_projects feature registration and the remaining flag checks
  • Keeps the sprint-based Backlogs path and removes the legacy UI/controller/routes that were only needed before the flag was made permanent
  • Deletes the Impediment model, services, controller (rb_impediments_controller), views, and all associated specs
  • Strips the Task and Story models to bare STI stubs (all dead methods removed)
  • Deletes rb_wikis_controller and its routing specs
  • Removes the old jQuery Taskboard frontend chain, including its legacy Sass and TypeScript/Stimulus entrypoints
  • Deletes dead patch files: type_patch.rb, versions/row_component_patch.rb, work_package_filter.rb
  • Removes unused methods from work_package_patch.rb and slims version_patch.rb to just the has_many :version_settings association
  • Strips all dead scopes and methods from Sprint < Version (now a bare shell; Agile::Sprint is the active model)
  • Removes dead plugin settings (story/task/wiki template fields) and their classification hooks
  • Keeps the rb_taskboards redirect endpoint so sprint links continue to resolve to the linked board
  • Updates affected specs throughout to match the permanent sprint-based behavior

Important

This Pull Request also updates shared feature-spec helpers because removing scrum_projects makes the old Backlogs-enabled inline-edit path always active in feature specs. That exposes pre-existing Cuprite interaction issues outside the Backlogs specs themselves: ng-select fields may already have an open dropdown when the helper tries to click again, and multi-value chip removal can be overlapped by the option panel. The helper now reuses an already-open dropdown before clicking, targets the actual ng-select input, and keeps the Cuprite-specific fallback limited to the chip-removal path that still needs it. It also refreshes My Page drag targets after CDK drag updates the DOM.

Remaining cleanup (follow-up PRs)

The following items were identified during review but are out of scope for this PR:

  • Full removal of the Task and Story STI stub models (depends on confirming no DB-level STI rows remain)
  • Remove definition-of-done menu from backlogs_settings_form
  • Delete backlogs/patches/status_patch.rb
  • Audit remaining patch files for unused methods and remove them
  • Consider removing backlogs/mixins/prevent_issue_sti.rb once Task/Story stubs are gone
  • Check all remaining Backlog, Story, and Task type references

Screenshots

No visual changes

Merge checklist

  • Added/updated tests
  • Tested major browsers (Chrome, Firefox, Edge, ...)

Copy link
Copy Markdown
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

Removes the scrum_projects feature decision from the Backlogs module and makes the sprint-based Backlogs (Agile::Sprint) behavior the default across UI routes, controllers, helpers, and API endpoints, with corresponding spec updates.

Changes:

  • Removed scrum_projects feature decision registration and deleted feature-flag-dependent branches across Backlogs routes/controllers/API.
  • Made sprint-based Backlogs behavior the default (Agile::Sprint), including routing and representer/schema exposure.
  • Updated Backlogs and PDF export specs to align with the permanent sprint model and adjusted position/reordering behavior.

Reviewed changes

Copilot reviewed 60 out of 60 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb Updates PDF export expectations (adds Story Points/Position/Sprint handling).
modules/backlogs/spec/services/work_packages/update_service_sprint_preservation_spec.rb Removes feature-flag gating from sprint-preservation service specs.
modules/backlogs/spec/services/sprints/finish_service_spec.rb Removes feature-flag gating from sprint finish service specs.
modules/backlogs/spec/routing/rb_stories_routing_spec.rb Makes sprint story move route always available (no flag split).
modules/backlogs/spec/routing/rb_sprints_routing_spec.rb Makes sprint dialog/start/finish routes always available (no flag split).
modules/backlogs/spec/routing/projects/settings/backlog_sharings_routing_spec.rb Makes backlog sharing settings routes always available (no flag split).
modules/backlogs/spec/routing/inbox_routing_spec.rb Removes feature-flag gating from inbox routing spec.
modules/backlogs/spec/requests/rb_master_backlogs_spec.rb Aligns master backlogs request behavior with permanent backlog action and turbo-frame src params.
modules/backlogs/spec/requests/api/v3/sprints/show_resource_spec.rb Removes API v3 sprints show feature-flag guard coverage.
modules/backlogs/spec/requests/api/v3/sprints/project_index_resource_spec.rb Removes API v3 project sprints index feature-flag guard coverage.
modules/backlogs/spec/requests/api/v3/sprints/index_resource_spec.rb Removes API v3 sprints index feature-flag guard coverage.
modules/backlogs/spec/models/work_packages/position_spec.rb Removes feature-flag gating from position behavior specs.
modules/backlogs/spec/models/queries/work_packages/filter/sprint_filter_spec.rb Updates sprint filter availability specs to no longer depend on flag state.
modules/backlogs/spec/lib/open_project/backlogs/permissions_spec.rb Makes sprint-related permissions visible unconditionally (no flag split).
modules/backlogs/spec/lib/api/v3/work_packages/work_package_representer_rendering_spec.rb Removes flag-dependent representer behavior branches for sprint/storyPoints/position.
modules/backlogs/spec/lib/api/v3/work_packages/schema/work_package_schema_representer_spec.rb Removes flag-dependent schema branches for storyPoints/position/sprint.
modules/backlogs/spec/features/work_packages/sprints_on_wp_view_spec.rb Removes feature-flag “off” scenario and makes sprint attribute always expected (subject to permissions).
modules/backlogs/spec/features/work_packages/filter_spec.rb Removes sprint filtering feature-flag gating.
modules/backlogs/spec/features/work_packages/drag_in_sprint_spec.rb Removes feature-flag gating from sprint drag/drop feature spec.
modules/backlogs/spec/features/work_packages/drag_in_inbox_spec.rb Removes feature-flag gating from inbox drag/drop feature spec.
modules/backlogs/spec/features/work_packages/create_work_package_spec.rb Removes feature-flag gating from create-in-sprint feature spec.
modules/backlogs/spec/features/projects/settings/backlog_sharing_settings_spec.rb Removes feature-flag “tab hidden” scenario; sharing tab now depends on permission only.
modules/backlogs/spec/features/inbox_column_spec.rb Removes feature-flag gating from inbox column feature spec.
modules/backlogs/spec/features/burndown/show_spec.rb Removes feature-flag gating from burndown chart feature spec.
modules/backlogs/spec/features/backlogs/start_finish_spec.rb Removes feature-flag gating from start/finish sprint feature spec.
modules/backlogs/spec/features/backlogs/sprint_list_spec.rb Removes feature-flag gating from sprint list feature spec.
modules/backlogs/spec/features/backlogs/edit_spec.rb Renames context and removes feature-flag gating in edit sprint planning spec.
modules/backlogs/spec/features/backlogs/create_spec.rb Renames context and removes feature-flag “inactive” scenario in create spec.
modules/backlogs/spec/features/admin/backlogs_settings_spec.rb Removes legacy admin configuration scenarios; asserts blankslate instead.
modules/backlogs/spec/controllers/rb_taskboards_controller_spec.rb Removes flag split and consolidates taskboard controller expectations.
modules/backlogs/spec/controllers/rb_stories_controller_spec.rb Removes flag split and keeps both Agile::Sprint and version Sprint behaviors covered.
modules/backlogs/spec/controllers/rb_sprints_controller_spec.rb Removes flag gating for sprint dialogs/create/update/start/finish and adds refresh_form edit-mode case.
modules/backlogs/spec/controllers/projects/settings/backlog_sharings_controller_spec.rb Removes feature-flag gating from backlog sharings controller spec.
modules/backlogs/spec/controllers/inbox_controller_spec.rb Removes feature-flag gating from inbox controller spec.
modules/backlogs/lib/open_project/backlogs/work_package_filter.rb Disables legacy backlogs-type filter availability by hard-coding configuration false.
modules/backlogs/lib/open_project/backlogs/patches/work_package_patch.rb Removes legacy story/task/backlogs-type classification by hard-coding methods to empty/false; keeps sprint association/list behavior.
modules/backlogs/lib/open_project/backlogs/patches/versions/row_component_patch.rb Removes backlogs-specific edit link injection; defers to upstream button links.
modules/backlogs/lib/open_project/backlogs/patches/type_patch.rb Hard-codes Type#story?/task? to false (legacy classification removed).
modules/backlogs/lib/open_project/backlogs/patches/set_attributes_service_patch.rb Always nullifies sprint when moved to a project without sprint visibility; removes legacy version inheritance logic.
modules/backlogs/lib/open_project/backlogs/patches/api/work_package_schema_representer.rb Removes scrum feature decision from sprint schema visibility conditions.
modules/backlogs/lib/open_project/backlogs/patches/api/work_package_representer.rb Removes scrum feature decision from sprint link/embed visibility conditions.
modules/backlogs/lib/open_project/backlogs/list.rb Makes acts_as_list scoping consistently project+sprint and simplifies scope-change handling; uses rebuild service in nil-position edge case.
modules/backlogs/lib/open_project/backlogs/engine.rb Makes sprint-related permissions and project menu entries always visible when module enabled; simplifies attribute constraints.
modules/backlogs/lib/api/v3/sprints/sprints_by_project_api.rb Removes feature-flag guard from project sprints API.
modules/backlogs/lib/api/v3/sprints/sprints_api.rb Removes feature-flag guard from global sprints API.
modules/backlogs/config/routes.rb Removes feature-flag route constraints so Agile::Sprint routes are always mounted.
modules/backlogs/app/views/backlogs_settings/show.html.erb Always renders Backlogs administration blankslate (legacy config form removed).
modules/backlogs/app/models/queries/work_packages/filter/sprint_filter.rb Makes sprint filter availability depend only on permission (no feature decision).
modules/backlogs/app/helpers/rb_common_helper.rb Removes scrum feature decision checks; disables legacy type lists and standardizes sprint board label.
modules/backlogs/app/forms/my/backlogs_form.rb Removes legacy task color preference field gated by feature decision.
modules/backlogs/app/controllers/rb_taskboards_controller.rb Switches “new vs legacy” behavior based on sprint class (Agile::Sprint vs Sprint).
modules/backlogs/app/controllers/rb_stories_controller.rb Switches story loading behavior based on sprint class (Agile::Sprint vs Sprint).
modules/backlogs/app/controllers/rb_master_backlogs_controller.rb Makes backlog view the default for index/details and always loads Agile::Sprint-based data.
modules/backlogs/app/controllers/rb_burndown_charts_controller.rb Switches burndown creation based on sprint class (Agile::Sprint vs Sprint).
modules/backlogs/app/controllers/rb_application_controller.rb Removes legacy “plugin configured” check and uses Agile::Sprint-first sprint loading with fallback to legacy Sprint.
modules/backlogs/app/controllers/projects/settings/backlogs_controller.rb Always rebuilds positions via WorkPackages::RebuildPositionsService.
modules/backlogs/app/controllers/inbox_controller.rb Removes feature-flag authorization gate for inbox actions.
modules/backlogs/app/components/projects/settings/backlogs/settings_header_component.html.erb Shows sharing tab based on permission only (no feature decision).
config/initializers/feature_decisions.rb Removes scrum_projects feature decision registration.
app/forms/versions/form.rb Disables legacy version backlog settings UI by hard-coding backlogs_enabled? to false.
Comments suppressed due to low confidence (1)

modules/backlogs/lib/open_project/backlogs/work_package_filter.rb:88

  • backlogs_configured? is now hard-coded to false, which makes this filter permanently unavailable (available? will always be false when backlogs is enabled). Since the filter still contains SQL logic for story/task/impediment, this looks like dead/stranded code. Consider removing the filter (and any API/schema exposure) entirely if it’s no longer part of the sprint-based Backlogs model, or update it to reflect the new model so it remains usable.
    def backlogs_configured?
      false
    end

    def backlogs_enabled?
      project.nil? || project.module_enabled?(:backlogs)
    end

Comment thread modules/backlogs/lib/open_project/backlogs/patches/work_package_patch.rb Outdated
Comment thread modules/backlogs/lib/open_project/backlogs/patches/work_package_patch.rb Outdated
Comment thread app/forms/versions/form.rb Outdated
@myabc myabc changed the title Remove the scrum_projects feature flag from Backlogs [#73798] Remove the scrum_projects feature flag from Backlogs Apr 13, 2026
@myabc myabc force-pushed the code-maintenance/73798-remove-scrum_projects-feature-flag branch 3 times, most recently from 8f370d4 to f39b8b9 Compare April 13, 2026 17:21
@myabc myabc requested a review from Copilot April 13, 2026 17:22
Comment thread app/forms/versions/form.rb
Copy link
Copy Markdown
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

Copilot reviewed 112 out of 112 changed files in this pull request and generated no new comments.

Comment thread modules/backlogs/app/controllers/rb_stories_controller.rb Outdated
Comment thread modules/backlogs/app/helpers/rb_common_helper.rb Outdated
Comment thread modules/backlogs/app/helpers/rb_common_helper.rb Outdated
Comment thread modules/backlogs/app/helpers/rb_common_helper.rb Outdated
@myabc myabc force-pushed the code-maintenance/73798-remove-scrum_projects-feature-flag branch from f39b8b9 to d4064f4 Compare April 13, 2026 18:24
@myabc myabc requested a review from Copilot April 13, 2026 18:26
Copy link
Copy Markdown
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

Copilot reviewed 137 out of 137 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

modules/backlogs/app/services/work_packages/rebuild_positions_service.rb:55

  • When @project is provided, the UPDATE is filtered, but the mapping subquery still computes ROW_NUMBER() over the entire work_packages table. On large instances this can be unnecessarily expensive. Consider applying the same project condition inside the subquery (e.g., in the FROM work_packages part) so the window function only scans rows for the target project when @project is set.

Comment thread modules/backlogs/app/components/backlogs/sprint_menu_component.rb Outdated
Comment thread spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb
Copy link
Copy Markdown
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

Copilot reviewed 137 out of 137 changed files in this pull request and generated 3 comments.

Comment thread modules/backlogs/app/controllers/rb_burndown_charts_controller.rb Outdated
Comment thread modules/backlogs/lib/open_project/backlogs/list.rb Outdated
Comment thread modules/backlogs/lib/open_project/backlogs/list.rb Outdated
@ulferts
Copy link
Copy Markdown
Contributor

ulferts commented Apr 14, 2026

@myabc copied from our chat:

is it ok to remove the global settings page? (Admin > Settings > Backlogs) It only shows a blankslate.

The blankslate should be kept. The idea was to keep the route alive even though all the options were removed in 17.3, because new settings will be added soon.

I've removed old APIv3 endpoints.

I assume you are referring to the removal of the BacklogTypeRepresenter. That change is fine.

We're still using Story.types and Task.type in a few places. I'm not sure if this PR should try to get rid (the UI for configuring is no longer reachable). Specifically, we need to check the logic here.

It should definitely be removed ASAP. We don't rely on it any more. Whether the removal is part of this PR or the next, I don't care.

I had to modify the rebuild positions service SQL (AI helped me with thiis), but am not sure about the change.

The change I could spot was adding the id to the order criteria: ORDER BY position, created_at, id. That should not be relevant in reality but I also don't see a problem doing it.

Comment thread app/models/permitted_params.rb
Comment thread modules/backlogs/config/locales/en.yml Outdated
myabc added 7 commits April 15, 2026 12:00
Strips all scopes and methods from `Sprint < Version`, including wiki
page helpers, leaving a bare class shell. `Agile::Sprint` is the
active model going forward.

Removes `Story.types` (settings-driven type list), `Story#tasks`,
and `Story#set_points`. Removes `VersionSetting` display predicates
and setters (constants retained), and dead `Backlog` instance methods
(`updated_at`, `owner_backlog?`, `sprint_backlog?`).

Slims `VersionPatch` to just the `has_many :version_settings`
association. Simplifies `Burndown#make_date_series` to the
`Agile::Sprint` path only. Removes the dead locale key and stale
engine permission stubs.
Restore `#backlog` as the canonical Backlogs route by redirecting
all `#index` requests to it.
Deletes the jQuery Taskboard Sass and JS chain.
Keeps the Backlogs task board route and links redirecting into Boards
unchanged.
@myabc myabc force-pushed the code-maintenance/73798-remove-scrum_projects-feature-flag branch from 715aeb8 to 2bc82c3 Compare April 15, 2026 11:00
@myabc myabc marked this pull request as ready for review April 15, 2026 11:20
Update the Backlogs-related type form expectations so reset and
empty-state coverage matches the current Position-in-Other behavior.
@myabc myabc added needs review pullpreview ruby Pull requests that update Ruby code javascript Pull requests that update Javascript code maintenance labels Apr 15, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 15, 2026

Deploying openproject with PullPreview

Field Value
Latest commit ed8f0d1
Job deploy
Status ✅ Deploy successful
Preview URL https://pr-22740-73798-remove-scru-ip-46-224-142-44.my.opf.run:443

View logs

Copy link
Copy Markdown
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

Copilot reviewed 193 out of 196 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

Copy link
Copy Markdown
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

Copilot reviewed 196 out of 199 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

Comment thread spec/support/components/work_packages/filters.rb
attr_reader :story, :sprint, :project, :current_user, :show_actions, :show_drag_handle

def initialize(story:, sprint:, project:, current_user: User.current)
def initialize(story:, sprint:, project:, current_user: User.current, show_actions: true, show_drag_handle: true)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dombesz this change is probably not necessary. However, it may future proof things for permissions.

myabc added 2 commits April 15, 2026 20:12
Stabilize shared ng-select interactions for Cuprite and reuse open
dropdowns safely in modal-based flows. Also keep filter clearing
safe when no value is selected and refresh the My Page drop target
after drag-induced DOM updates.
Use the default Capybara wait when checking filtered share rows on
the members page. The sidebar permission filters navigate with Turbo,
so the previous 0.5s poll was too short for share_spec.rb:101.
@myabc myabc force-pushed the code-maintenance/73798-remove-scrum_projects-feature-flag branch from 57ea63b to ed8f0d1 Compare April 15, 2026 19:12
@myabc myabc requested a review from Copilot April 15, 2026 19:13
Copy link
Copy Markdown
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

Copilot reviewed 197 out of 200 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code maintenance needs review pullpreview ruby Pull requests that update Ruby code

Development

Successfully merging this pull request may close these issues.

5 participants