-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Implementation/64524 recalculate when a score of a scored list is changed within the administration #20511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
EinLama
wants to merge
6
commits into
implementation/64523-allow-usage-of-custom-fields-of-type-hierarchy-with-a-value-within-a-calculated-values-formula
Choose a base branch
from
implementation/64524-recalculate-when-a-score-of-a-scored-list-is-changed-within-the-administration
base: implementation/64523-allow-usage-of-custom-fields-of-type-hierarchy-with-a-value-within-a-calculated-values-formula
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
a69cd9f
to
eeb3263
Compare
toy
reviewed
Oct 2, 2025
item = cached_typed_value | ||
|
||
item.score.presence || item | ||
item&.score.presence || item |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in #20454 :)
|
||
if item.nil? | ||
"#{value} #{I18n.t(:label_not_found)}" | ||
"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
b126ded
to
947544a
Compare
77f47c2
to
306fc66
Compare
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/64524
Important
This branch is based on #20454. Either merge that one first - or merge this branch into it instead of
dev
.What are you trying to accomplish?
When the score of a scored list is changed within the administration, all Calculated Values that are using the scored list should be recalculated.
Notes
In case I have to take my parental leave in the near future, here are some notes on the current state of this PR:
hierarchy_strategy.rb
). But I did not yet double check if that broke the UI somewhere else. Please be aware that the strategy is not only used by Scored Lists, but also by Hierarchies. If Hierarchies need the error string, we could simply include a type check and render a different formatted value.hierarchical_item_service_spec.rb
) - but I am not happy with them. They utilize the database quite a lot. I feel like it should be possible without doing so - but then, I had to mock too much for my taste. Maybe you have a better idea of how to do this.scored_lists_and_calculated_values_spec.rb
TL;DR: Everything should work. Specs ugly. Please double-check if there are other cases in which recalculation might be needed for Scored Lists. Thank you!
Screenshots
scored.lists.update.when.score.changes.mov
Merge checklist