[#73925] "Move to backlog bucket" and "move to backlog inbox" menu option#23326
Draft
dombesz wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Backlogs work package card “Move” menu by adding explicit actions to move a work package to the backlog inbox and to a backlog bucket (via a new async dialog), including routing, UI components, and test coverage.
Changes:
- Added “Move to inbox” and “Move to backlog bucket” entries to the work package action menu, gated by permissions and availability.
- Introduced a new
move_to_backlog_bucket_dialogendpoint andBacklogs::MoveToBacklogBucketDialogComponentto select a target bucket. - Expanded controller/component/routing/feature specs to cover the new menu items and dialog behavior.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/backlogs/spec/support/pages/backlog.rb | Adds page-object helpers for bucket assertions and unifies menu interaction helpers for work packages. |
| modules/backlogs/spec/routing/backlogs/work_packages_routing_spec.rb | Adds routing coverage for the new backlog bucket dialog endpoint. |
| modules/backlogs/spec/features/work_packages/move_to_backlog_spec.rb | New JS feature spec covering moving to inbox/bucket/sprint across different sources. |
| modules/backlogs/spec/features/inbox_column_spec.rb | Updates to use the generalized work package move-menu helpers. |
| modules/backlogs/spec/features/backlogs/edit_spec.rb | Removes redundant sprint-to-sprint move coverage now handled in the new spec. |
| modules/backlogs/spec/controllers/backlogs/work_packages_controller_spec.rb | Adds controller coverage for other_buckets_exist and the new dialog action (incl. permissions and all=1). |
| modules/backlogs/spec/components/backlogs/work_package_card_menu_component_spec.rb | Extends menu component spec for new items/visibility rules and all=1 propagation. |
| modules/backlogs/spec/components/backlogs/move_to_backlog_bucket_dialog_component_spec.rb | New component spec for dialog rendering and option filtering. |
| modules/backlogs/lib/open_project/backlogs/engine.rb | Extends manage_sprint_items permission mapping to include the new dialog action. |
| modules/backlogs/config/routes.rb | Adds move_to_backlog_bucket_dialog route. |
| modules/backlogs/config/locales/en.yml | Adds i18n strings for the new dialog title and menu entries. |
| modules/backlogs/app/controllers/backlogs/work_packages_controller.rb | Computes other_buckets_exist and serves the new backlog bucket dialog via turbo-stream. |
| modules/backlogs/app/components/backlogs/work_package_card_menu_component.rb | Adds menu visibility predicates and a required other_buckets_exist initializer argument. |
| modules/backlogs/app/components/backlogs/work_package_card_menu_component.html.erb | Renders the new “Move to inbox” (PUT) and “Move to backlog bucket” (async dialog) items. |
| modules/backlogs/app/components/backlogs/sprint_dialog_component.html.erb | Removes redundant data: { turbo: true } from the submit button. |
| modules/backlogs/app/components/backlogs/move_to_sprint_dialog_component.html.erb | Removes redundant data: { turbo: true } from the submit button. |
| modules/backlogs/app/components/backlogs/move_to_backlog_bucket_dialog_component.rb | New dialog component that lists eligible buckets and excludes the current bucket. |
| modules/backlogs/app/components/backlogs/move_to_backlog_bucket_dialog_component.html.erb | New dialog UI with a bucket select and PUT submission to the existing move endpoint. |
| modules/backlogs/app/components/backlogs/bucket_dialog_component.html.erb | Removes redundant data: { turbo: true } from the submit button. |
Comment on lines
+878
to
+879
| let(:other_project_bucket_wp) { create(:work_package, status:, project:, backlog_bucket: current_bucket) } | ||
| let(:params) { { project_id: project.id, id: other_project_bucket_wp.id } } |
Comment on lines
283
to
290
| def within_work_package_menu(work_package, &) | ||
| within(work_package_selector(work_package)) do | ||
| button = find(:button, accessible_name: "Work package actions") | ||
| within(open_controlled_menu(button), &) | ||
| end | ||
|
|
||
| dismiss_menu(story) | ||
| dismiss_menu(work_package) | ||
| end |
c1b8a47 to
d9bf971
Compare
…tion for work packages within the backlog module https://community.openproject.org/wp/73925
d9bf971 to
8312d44
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ticket
https://community.openproject.org/wp/73925
What are you trying to accomplish?
Screenshots
What approach did you choose and why?
Merge checklist