[#73889] Clean up Backlogs module naming and namespacing#22829
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the Backlogs module cleanup by aligning naming/namespacing across controllers, helpers, and specs, and by introducing a namespaced admin settings endpoint and view.
Changes:
- Rename/namespace Backlogs helpers (
RbCommonHelper→Backlogs::CommonHelper,BurndownChartsHelper→Backlogs::BurndownChartHelper) and update consumers/specs. - Introduce
Backlogs::BaseControllerand move Backlogs controllers to inherit from it instead of the legacyRbApplicationController. - Rename the admin settings controller to
Backlogs::SettingsController, update its route, and add a new admin settings view.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/backlogs/spec/views/backlogs/burndown_chart/show_spec.rb | Update view spec to extend the renamed/namespaced burndown chart helper. |
| modules/backlogs/spec/helpers/backlogs/common_helper_spec.rb | Update helper spec to target Backlogs::CommonHelper. |
| modules/backlogs/spec/controllers/backlogs/settings_controller_spec.rb | Update controller spec to target Backlogs::SettingsController. |
| modules/backlogs/lib/open_project/backlogs/hooks/layout_hook.rb | Update hook to include the renamed/namespaced common helper. |
| modules/backlogs/config/routes.rb | Point admin backlogs settings route at backlogs/settings. |
| modules/backlogs/app/views/backlogs/settings/show.html.erb | Add admin Backlogs settings page (Primer header + blankslate). |
| modules/backlogs/app/helpers/backlogs/common_helper.rb | Move common helper into Backlogs::CommonHelper namespace. |
| modules/backlogs/app/helpers/backlogs/burndown_chart_helper.rb | Move burndown helper into Backlogs::BurndownChartHelper namespace. |
| modules/backlogs/app/controllers/backlogs/*.rb | Switch controllers to inherit from Backlogs::BaseController; adjust helper loading and controller namespacing. |
93e98ef to
c01dfea
Compare
fc256d7 to
66c0b0c
Compare
3ca8292 to
1037de4
Compare
4436dc7 to
d02622e
Compare
1037de4 to
34310b4
Compare
d02622e to
bb79537
Compare
34310b4 to
e42e257
Compare
myabc
commented
Apr 20, 2026
myabc
commented
Apr 20, 2026
Comment on lines
+105
to
+110
| def format_date_range(dates) | ||
| return nil if dates.all?(&:nil?) | ||
|
|
||
| from, to = dates.map { |date| tag.time(datetime: date.iso8601) { format_date(date) } if date } | ||
| safe_join([from, "–", to], " ") # – and | ||
| end |
Contributor
Author
There was a problem hiding this comment.
(This could also be a View Component) / @HDinger
e42e257 to
08f2c88
Compare
Base automatically changed from
code-maintenance/72661-consolidate-backlogs-routes
to
dev
April 20, 2026 15:48
Matches the `<Module>::BaseController` convention used in `Boards`, `Calendar`, `TeamPlanner`, `Gantt`, and other module engines. https://community.openproject.org/wp/73889
Moves `BacklogsSettingsController` under the `Backlogs::` module as `Backlogs::SettingsController`. Keeps the `admin_backlogs_settings` route name so `redirect_to_backlogs_settings` callers keep working. https://community.openproject.org/wp/73889
Places the helper next to `format_date` and `format_time` so other modules can reuse it. Adds YARD docs.
Drops the `agile_` prefix from `agile_sprint_params`, `edit_agile_sprint_params`, and `converted_agile_sprint_params`. The controller already sits under `Backlogs::` as `SprintsController`, so the prefix was historical noise from before the namespacing.
The chart payload is serialized with `to_json` at render time, so pre-escaping day labels would (theoretically) add an extra layer of backslashes.
Registers the admin menu entry from OpenProject::Backlogs::Engine and removes the duplicate initializer entry. Adds an engine spec for the admin menu target.
0b1c77e to
031d9f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR is based on #22791. Please review/merge that PR first.
Ticket
https://community.openproject.org/wp/73889
What are you trying to accomplish?
Follow-up to #72661. Finishes the Backlogs naming/namespacing cleanup:
Rb*/rb_*prefix from the remaining controller and helper.Backlogs::module (BacklogsSettingsController→Backlogs::SettingsController,RbCommonHelper→Backlogs::CommonHelper,BurndownChartsHelper→Backlogs::BurndownChartHelper).RbApplicationControllerwithBacklogs::BaseController, matching the<Module>::BaseControllerconvention used across Boards, Calendar, TeamPlanner, Gantt, Avatars, etc.agile_sprint_*controller param helpers tosprint_*for consistency/admin/backlogsRoute paths and helper names are unchanged.
What approach did you choose and why?
Four focused commits, each green in isolation. Legacy top-level models (
Story,Task,Sprint,Backlog,Burndown) are intentionally left alone — they're removed in OP #71254.Merge checklist