Skip to content
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

[50961] Ensure computation of the derived values is triggered at the right time #14516

Conversation

cbliard
Copy link
Member

@cbliard cbliard commented Jan 9, 2024

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

The following triggers where missing to trigger a recalculation of the derived values:

  • deleting a child
  • changing status to closed/open

Mainly generated by GitHub Copilot.
Add tests to ensure that the work and remaining work derived values are
computed again when:
- a child work package work or remaining work value is changed
- a child work package is deleted

More tests to need to be added
- Add optional label to context menu.
- Add menuitem and separator role attribute to context menu items.
- Use capybara accessible selectors to interact with them in tests.
- Harmonize `#expect_options` and `#expect_no_options` argument type.
Setting `intervals` in Retriable configuration overrides `tries`,
`base_interval`, `max_interval`, `rand_factor`, and `multiplier`
parameters and thus ruins the benefit of calling `retry_block` with
`args: { tries: _ }` argument.

Prefer setting `base_interval`, `max_interval`, `rand_factor`, and
`multiplier` instead to keep the benefit of `args: { tries: _ }`
argument.

This will generate the following intervals: [0.5, 0.75, 1.125, ~1.7, ~2.5, ~3.8, ...]

Also improve logged messages of `retry_block`.
@cbliard cbliard marked this pull request as ready for review January 9, 2024 15:15
@cbliard cbliard changed the base branch from dev to primer-dev January 9, 2024 15:18
@cbliard cbliard changed the base branch from primer-dev to dev January 9, 2024 15:18
@cbliard cbliard force-pushed the implementation/50961-ensure-computation-of-the-derived-values-is-triggered-at-the-right-time branch from 04a62e3 to c559de0 Compare January 9, 2024 15:20
…e-derived-values-is-triggered-at-the-right-time
Copy link
Contributor

@aaron-contreras aaron-contreras left a comment

Choose a reason for hiding this comment

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

There's only one debugging leftover in a spec. Otherwise, looks good 👍

@cbliard cbliard merged commit 475da99 into dev Jan 9, 2024
7 checks passed
@cbliard cbliard deleted the implementation/50961-ensure-computation-of-the-derived-values-is-triggered-at-the-right-time branch January 9, 2024 16:44
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