Skip to content

[#74845] Show message when WP with excluded type or status disappears#23439

Open
EinLama wants to merge 1 commit into
devfrom
implementation/74845-show-message-when-work-package-with-excluded-type-status-is-moved-to-backlog-and-disappears
Open

[#74845] Show message when WP with excluded type or status disappears#23439
EinLama wants to merge 1 commit into
devfrom
implementation/74845-show-message-when-work-package-with-excluded-type-status-is-moved-to-backlog-and-disappears

Conversation

@EinLama
Copy link
Copy Markdown
Contributor

@EinLama EinLama commented May 28, 2026

Ticket

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

What are you trying to accomplish?

Show a notification upon moving a work package that explain that it was moved successfully but that the type/status is excluded which is why it is no longer displayed.

Screenshots

message.when.wp.turns.invisible.mov

What approach did you choose and why?

Decided to use a flash banner with type default instead of success so that users hopefully notice and read the flash message due to its slightly rarer nature. Additionally, success banners are automatically closed after a short time and I wanted users to have enough time to read the message as the behavior here might be surprising.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@EinLama EinLama marked this pull request as ready for review May 28, 2026 12:47
@EinLama EinLama force-pushed the implementation/74845-show-message-when-work-package-with-excluded-type-status-is-moved-to-backlog-and-disappears branch from 3060cfc to 701f9b6 Compare May 28, 2026 15:11
Copy link
Copy Markdown
Contributor

@dombesz dombesz left a comment

Choose a reason for hiding this comment

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

Works nicely👍 I just left one comment regarding a simplification. Feel free to merge at will.

Comment on lines +142 to +147
def work_package_invisible_after_move?(work_package, move_target_id)
return false unless move_target_id&.start_with?("backlog_bucket", "inbox")

@project.backlog_excluded_type_ids.include?(work_package.type_id) ||
@project.done_status_ids.include?(work_package.status_id)
end
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe it is not necessary to rely on the move_target_id parameter, because at this point the saved work package is in the right location (inbox, bucket or sprint). Thus checking the presence of a sprint id would suffice.

Suggested change
def work_package_invisible_after_move?(work_package, move_target_id)
return false unless move_target_id&.start_with?("backlog_bucket", "inbox")
@project.backlog_excluded_type_ids.include?(work_package.type_id) ||
@project.done_status_ids.include?(work_package.status_id)
end
def work_package_invisible_after_move?(work_package)
return false if work_package.sprint_id?
@project.backlog_excluded_type_ids.include?(work_package.type_id) ||
@project.done_status_ids.include?(work_package.status_id)
end

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants