Conversation
da50e0d to
c896461
Compare
c896461 to
d864085
Compare
Deploying openproject with ⚡ PullPreview
|
0243a84 to
b94a116
Compare
There was a problem hiding this comment.
Pull request overview
This PR replaces the legacy Backlogs sprint taskboard (server-rendered view + legacy JS/CSS) with an automatic redirect to a Work Package Board, creating the board on demand for a sprint.
Changes:
- Add
TaskBoards::CreateServiceto ensure a sprint board exists (create if missing, handle RecordNotUnique), plus unit specs. - Change
RbTaskboardsController#showto create/load the board and redirect toproject_work_package_board_path, with a localized failure flash. - Remove legacy taskboard view layer, feature/view specs, legacy frontend assets (Stimulus “taskboard-legacy” stack + vendor jQuery plugins + Sass), and drop
jquery.cookiefrom frontend dependencies.
Reviewed changes
Copilot reviewed 30 out of 33 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
modules/backlogs/app/controllers/rb_taskboards_controller.rb |
Redirects sprint taskboard route to the generated board, with error fallback. |
modules/backlogs/app/services/task_boards/create_service.rb |
Implements board + per-status query/widget creation and an idempotent .ensure entrypoint. |
modules/backlogs/app/models/sprint.rb |
Adds #board_name used to name/lookup the sprint board. |
modules/backlogs/config/locales/en.yml |
Adds translation for automatic board creation failure. |
modules/backlogs/spec/services/task_boards/create_service_spec.rb |
New specs for the board creation service. |
modules/backlogs/spec/controllers/rb_taskboards_controller_spec.rb |
Updates controller spec to expect redirect behavior and failure handling. |
modules/backlogs/spec/models/sprint_spec.rb |
Adds spec coverage for Sprint#board_name. |
modules/backlogs/app/views/rb_taskboards/show.html.erb |
Removes legacy taskboard view template. |
modules/backlogs/app/helpers/taskboards_helper.rb |
Removes legacy helper used only by the removed view. |
modules/backlogs/spec/views/rb_taskboards/show_spec.rb |
Removes legacy view spec. |
modules/backlogs/spec/features/tasks_on_taskboard_spec.rb |
Removes legacy JS feature spec for tasks on taskboard. |
modules/backlogs/spec/features/impediments_spec.rb |
Removes legacy JS feature spec for impediments on taskboard. |
frontend/src/stimulus/controllers/dynamic/backlogs/* (multiple) |
Removes legacy taskboard JS implementation. |
frontend/src/vendor/jquery.* (multiple) |
Removes vendor plugins used by the legacy taskboard implementation. |
frontend/src/assets/sass/backlogs/* (multiple) |
Removes legacy taskboard/statistics/global styles and related imports. |
frontend/package.json / frontend/package-lock.json |
Removes jquery.cookie dependency. |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
You can also share your feedback on Copilot code review. Take the survey.
modules/backlogs/spec/services/task_boards/create_service_spec.rb
Outdated
Show resolved
Hide resolved
d9d757d to
4b0f8eb
Compare
400c7c4 to
1598c02
Compare
|
@ulferts while this PR still needs some polishing, as well as feature specs, if you could give this a quick sanity check, that would be immensely helpful! |
3b5e2cd to
6b1b9d4
Compare
| module OpenProject::Backlogs | ||
| class SprintFilter < ::Queries::WorkPackages::Filter::WorkPackageFilter | ||
| def allowed_values | ||
| @allowed_values ||= sprints.pluck(:id, :id).map { |value, id| [value.to_s, id.to_s] } |
There was a problem hiding this comment.
(I don't think these need to coerced to String)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.
You can also share your feedback on Copilot code review. Take the survey.
modules/backlogs/spec/components/backlogs/sprint_menu_component_spec.rb
Outdated
Show resolved
Hide resolved
modules/boards/app/services/boards/sprint_task_board_create_service.rb
Outdated
Show resolved
Hide resolved
601636f to
50b109c
Compare
9e537f3 to
961e266
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.
You can also share your feedback on Copilot code review. Take the survey.
modules/backlogs/spec/controllers/rb_sprints_controller_spec.rb
Outdated
Show resolved
Hide resolved
961e266 to
6e33225
Compare
Add a sprint-specific query schema dependency representer so the\nboard page can render filters without crashing after sprint start.\n\nThis fixes the CI failure in the sprint start feature spec caused by\nSprintFilter not mapping to any dependency representer.\n\nhttps://github.com//pull/22086
| #++ | ||
|
|
||
| module OpenProject::Backlogs | ||
| class SprintFilter < ::Queries::WorkPackages::Filter::WorkPackageFilter |
There was a problem hiding this comment.
@ulferts I have to admit that my understanding of the filter mechanism is pretty basic. I'm not sure if this overlaps/conflicts with what you've introduced in #22054 (namely modules/backlogs/app/models/queries/sprints/filters/sprint_filter.rb
|
|
||
| ::Queries::Register.register(::Query) do | ||
| filter OpenProject::Backlogs::WorkPackageFilter | ||
| filter OpenProject::Backlogs::SprintFilter |
Introduces `OpenProject::Backlogs::SprintFilter`, a query filter that allows work packages to be filtered by `sprint_id`. Registers the filter in the backlogs engine. Adds spec coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make backlogs sprint permissions depend on the new boards permissions used by sprint task boards. - view_sprints now depends on show_board_views - start_complete_sprint now depends on manage_board_views - update focused permissions specs accordingly
Add optional linked_type/linked_id columns to grids and wire sprint task board lookup through model associations.
Introduce Boards::SprintTaskBoardCreateService and use it to create a sprint task board with one query and widget per task status. https://community.openproject.org/wp/69139
Add the Start sprint action to the sprint menu and route it through RbSprintsController so starting a sprint creates or reuses the linked sprint board and redirects to it. This also moves the start logic into Sprints::StartService so board creation and sprint activation happen within one transaction. https://community.openproject.org/wp/72942
Keep Start sprint visible for users with permission, but disable it when another sprint in the same project is already active. Render an inline description in the action menu to explain why the item is unavailable.
Add a matching Finish sprint action, route, and service so active sprints can be completed through the sprint menu. For now, the finish flow only updates sprint status and leaves board behavior unchanged.
Simplify the scrum sprint component predicates and align the component/controller specs with the sprint-specific rendering paths.
Add a sprint-specific query schema dependency representer so the board page can render filters without crashing after sprint start. This fixes the CI failure in the sprint start feature spec caused by SprintFilter not mapping to any dependency representer.
b0410a6 to
411cc24
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 33 changed files in this pull request and generated no new comments.
You can also share your feedback on Copilot code review. Take the survey.
Use Constraints::FeatureDecision for the scrum-only sprint and backlog sharing routes, and move the inactive-flag expectations from controller specs into routing specs. #22086
Ticket
https://community.openproject.org/wp/69139
https://community.openproject.org/wp/72942
What are you trying to accomplish?
Automatically create and configure a sprint task board when a user starts a sprint, so the team can immediately begin tracking work without manual board setup.
This branch also adds a matching skeleton
Finish sprintflow for symmetry. For now, finishing a sprint only updates sprint status and does not change board behavior.Important
There are some caveats:
WorkPackageFilterValues).404 Not Founderror on visiting the board via the sprint action menu's "Task board" item. If finished sprints were not filtered out in the UI as it currently stands, it might be possible to allow a workaround (e.g. to finish and restart the sprint).Screenshots
Explicit sprint start / finish (WP #72942)
What approach did you choose and why?
I split the work into sprint board creation and an explicit
Start sprintflow (OP #72942). The latter replaces lazy board creation on taskboard access, so board creation now follows sprint start and can use its own permissions.Board linkage took two iterations. I first tried storing origin metadata in
Boards::Grid#options, but that was awkward becauseoptionsis YAML in a text column, not JSONB. I then switched to a nullable polymorphic link onBoards::Grid, which gives stable lookup without relying on serialized metadata.This still leaves room for a narrower relation later. If sprint boards remain a dedicated concept, a direct
sprint_idcould be preferable for stronger semantics and proper referential integrity.I also added a matching
Finish sprintaction and service for symmetry with the new start flow. At this stage (and since the behaviour with associated boards is not yet defined), it is essentially a stub - only transitioning sprint status.What this PR does not do
Caveats: see above
Clean up and optimisations: although these PRs relate to this feature, these steps are technically out-of-scope / need their own review and can be probably be considered optional.
Merge checklist
Acceptance Criteria
Automatic Board Creation
Default Board Configuration
Board Visibility & Access
Preparatory & Validation