Skip to content

[#69139] Create boards on Sprint start#22086

Open
myabc wants to merge 12 commits intodevfrom
feature/69139-sprint-task-boards
Open

[#69139] Create boards on Sprint start#22086
myabc wants to merge 12 commits intodevfrom
feature/69139-sprint-task-boards

Conversation

@myabc
Copy link
Contributor

@myabc myabc commented Feb 23, 2026

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 sprint flow for symmetry. For now, finishing a sprint only updates sprint status and does not change board behavior.

Important

There are some caveats:

  1. creating work packages from the sprint task board does not work properly. This will rely on Feature/72227 sprints included in api get sprint and sprint on work package resource documentation #22307 (and possibly also Feature/71061 sprints manageable from work package #22328) being merged, as well as some follow-up integration work (e.g. updating WorkPackageFilterValues).
  2. it is not possible to restore a deleted sprint task board: if a user deletes the board (via the board toolbar or index page), they cannot restore it directly. Users will encounter a 404 Not Found error 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)

Start Finish Start when another sprint active
Screenshot 2026-03-13 at 08 00 14 Screenshot 2026-03-13 at 07 58 47 Screenshot 2026-03-13 at 07 58 33

What approach did you choose and why?

I split the work into sprint board creation and an explicit Start sprint flow (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 because options is YAML in a text column, not JSONB. I then switched to a nullable polymorphic link on Boards::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_id could be preferable for stronger semantics and proper referential integrity.

I also added a matching Finish sprint action 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

  • Clicking "Start Sprint" from the backlog auto-creates a dedicated sprint board
  • User is automatically forwarded to the active sprint board
  • Board is named using convention: "[Project Name]: [Sprint Name]" (see ticket note re: naming discrepancy)
  • Board is immediately accessible via the project's board section
  • Board creation happens seamlessly without additional user prompts or configuration steps

Default Board Configuration

  • Columns map to workflow statuses (all statuses shown automatically, no status mapping)
  • Board filter automatically includes all issues assigned to the active sprint and all issue types enabled for the project

Board Visibility & Access

  • Board inherits project permissions automatically
  • All project members can view the board immediately

Preparatory & Validation

  • Create sprint work package filter
  • Adjust board permissions
  • Added/updated tests
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@myabc myabc force-pushed the feature/69139-sprint-task-boards branch from da50e0d to c896461 Compare March 1, 2026 16:23
@myabc myabc force-pushed the feature/69139-sprint-task-boards branch from c896461 to d864085 Compare March 1, 2026 16:45
@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Deploying openproject with PullPreview

Field Value
Latest commit 411cc24
Job deploy
Status ✅ Deploy successful
Preview URL https://pr-22086-69139-sprint-task-b-ip-23-88-121-1.my.opf.run:443

View logs

@myabc myabc force-pushed the feature/69139-sprint-task-boards branch 2 times, most recently from 0243a84 to b94a116 Compare March 3, 2026 22:07
@myabc myabc requested a review from Copilot March 3, 2026 22:08
@myabc myabc removed the DO NOT MERGE label Mar 3, 2026
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 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::CreateService to ensure a sprint board exists (create if missing, handle RecordNotUnique), plus unit specs.
  • Change RbTaskboardsController#show to create/load the board and redirect to project_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.cookie from 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.

Copy link
Contributor

Copilot AI commented Mar 4, 2026

@myabc I've opened a new pull request, #22177, to work on those changes. Once the pull request is ready, I'll request review from you.

@myabc myabc force-pushed the feature/69139-sprint-task-boards branch from d9d757d to 4b0f8eb Compare March 5, 2026 03:56
@myabc myabc force-pushed the feature/69139-sprint-task-boards branch 5 times, most recently from 400c7c4 to 1598c02 Compare March 11, 2026 02:55
@myabc myabc requested a review from Copilot March 11, 2026 03:43
@myabc
Copy link
Contributor Author

myabc commented Mar 11, 2026

@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!

@myabc myabc force-pushed the feature/69139-sprint-task-boards branch from 3b5e2cd to 6b1b9d4 Compare March 11, 2026 03:47
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] }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I don't think these need to coerced to String)

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

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.

@myabc myabc force-pushed the feature/69139-sprint-task-boards branch 2 times, most recently from 601636f to 50b109c Compare March 11, 2026 15:52
@myabc myabc requested a review from Copilot March 13, 2026 16:19
@myabc myabc force-pushed the feature/69139-sprint-task-boards branch from 9e537f3 to 961e266 Compare March 13, 2026 16:24
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

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.

@myabc myabc force-pushed the feature/69139-sprint-task-boards branch from 961e266 to 6e33225 Compare March 13, 2026 16:34
@myabc myabc requested a review from a team March 13, 2026 16:34
myabc added a commit that referenced this pull request Mar 13, 2026
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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ulferts can you check namespacing?

myabc and others added 12 commits March 13, 2026 12:58
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
Use within_menu_controlled_by for sprint menus as well, and
resolve the controlled menu from page scope before entering it.
This keeps within_sprint_menu aligned with within_backlog_menu.

Follow up to 39ed485 and 7f5adb8.
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.
@myabc myabc force-pushed the feature/69139-sprint-task-boards branch from b0410a6 to 411cc24 Compare March 13, 2026 18:08
@myabc myabc requested review from EinLama and Copilot March 13, 2026 18:44
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

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.

@myabc myabc added this to the 17.3.x milestone Mar 13, 2026
myabc added a commit that referenced this pull request Mar 13, 2026
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
@myabc myabc mentioned this pull request Mar 13, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants