Skip to content

[COMMS-932] Handle group queries when the value is not a model association - #24471

Merged
brunopagno merged 1 commit into
devfrom
blp/impl/comms-932-group-by-work-package-without-version
Jul 29, 2026
Merged

[COMMS-932] Handle group queries when the value is not a model association#24471
brunopagno merged 1 commit into
devfrom
blp/impl/comms-932-group-by-work-package-without-version

Conversation

@brunopagno

@brunopagno brunopagno commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Ticket

https://community.openproject.org/projects/COMMS/work_packages/COMMS-932/activity

What are you trying to accomplish?

When the property being queried is not a model association, we can explicitly define the class form which the result will be loaded from.

This is necessary because https://community.openproject.org/wp/COMMS-863 will remove the belongs_to :version association from work_package.rb

Merge checklist

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

@brunopagno brunopagno self-assigned this Jul 28, 2026
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./modules/storages/spec/features/hide_attachments_spec.rb[1:2:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #24471, linked for reference only):

- `rspec ./modules/storages/spec/features/hide_attachments_spec.rb[1:2:1]`

Treat this as a standalone task, unrelated to PR #24471. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #24471 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @brunopagno to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @brunopagno, and request a review from @brunopagno.
On every commit, set @brunopagno as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@brunopagno
brunopagno requested a review from a team July 28, 2026 09:14
@brunopagno
brunopagno marked this pull request as ready for review July 28, 2026 10:33
@github-actions

Copy link
Copy Markdown

Caution

The provided work package version does not match the core version

Details:

Please make sure that:

  • The work package version OR your pull request target branch is correct

@akabiru akabiru left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:shipit: Small but mighty 👍🏾

@brunopagno
brunopagno merged commit e03d4ae into dev Jul 29, 2026
14 checks passed
@brunopagno
brunopagno deleted the blp/impl/comms-932-group-by-work-package-without-version branch July 29, 2026 13:15
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants