[#74845] Show message when WP with excluded type or status disappears#23439
Open
EinLama wants to merge 1 commit into
Conversation
3060cfc to
701f9b6
Compare
dombesz
approved these changes
Jun 1, 2026
Contributor
dombesz
left a comment
There was a problem hiding this comment.
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 |
Contributor
There was a problem hiding this comment.
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 |
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/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
defaultinstead ofsuccessso 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