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
[49409] Exclude work package from totals calculation by status #15370
Draft
cbliard
wants to merge
16
commits into
dev
Choose a base branch
from
feature/49409-status-exclude-from-totals
base: dev
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
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 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
cbliard
force-pushed
the
feature/49409-status-exclude-from-totals
branch
2 times, most recently
from
April 25, 2024 08:44
b3be21c
to
7469cea
Compare
- Use correct progress terminology in test description. - Merge tests changing work and remaining work: the tests setup and expectations where the same. Only the action differed: one was calling the service with `estimated_hours` being modified, the other with `remaining_hours` being modified. - Make tests faster (from 13 secs to 5 secs) - Introduce `shared_let_work_packages` to create work packages with table helpers in a `shared_let` fashion. - Introduce `for_each_context` which runs the same set of tests with different RSpec shared contexts.
cbliard
force-pushed
the
feature/49409-status-exclude-from-totals
branch
from
April 25, 2024 09:01
7469cea
to
36faf2d
Compare
The leaves are no more used in `UpdateAncestorsService`.
The job has been updated to excluded work packages having a status with `excluded_from_totals` set to true. The journal entry has valid values so that the cause renders correctly. The job is not yet triggered properly when the "excluded from totals" attribute of a status is changed in the administration.
Use 2 custom matchers to test rendering. It avoids creating contexts to set different values fro `html`. The rspec output with documentation formatter also looks nicer.
The column headers of the statuses page have a shorter text to fit a reasonable page width.
- Update the messages according to latest specification - Update the journal cause to handle multiple changes in one cause
It's to prevent silly mistakes when writing and copy-pasting tables in specs.
There was a bug in the way the excluded work packages were affecting the query which updates the totals, especially regarding looking at the `MAX(generations)` value. When considering work packages after filtering out excluded work packages, the parent is alone, and its `MAX(generations)` is 0, which is interpreted like it is a leaf work package and leading to totals being unset, which is not correct. Now the check for `MAX(generations) > 0` is done outside of the filtering to prevent this bug from happening.
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.
https://community.openproject.org/wp/49409