Skip to content

[COMMS-897] Read and write target versions in the incoming e-mail handler - #24345

Merged
akabiru merged 2 commits into
devfrom
implementation/comms-897-adjust-incoming-e-mail-handler-to-read-write-target_versions
Jul 22, 2026
Merged

[COMMS-897] Read and write target versions in the incoming e-mail handler#24345
akabiru merged 2 commits into
devfrom
implementation/comms-897-adjust-incoming-e-mail-handler-to-read-write-target_versions

Conversation

@akabiru

@akabiru akabiru commented Jul 20, 2026

Copy link
Copy Markdown
Member

https://community.openproject.org/wp/COMMS-897

Adapt the work package e-mail handler to set a work package's version via Target versions: - the legacy Version: keyword is retained as a secondary supported option but it is marked as deprecated in the relevant docs.

Note

Docs PR separate so it's reviewable by the docs team #24361

@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/activities/work_package/activities_spec.rb[1:5:2:1]
  • rspec ./spec/features/projects/create_spec.rb[1:12:3:1]
  • rspec ./spec/features/users/user_memberships_spec.rb[1:2:1:1:1:1]
  • rspec ./spec/features/workflows/edit_multi_role_spec.rb[1:4:4:2]
🤖 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 #24345, linked for reference only):

- `rspec ./spec/features/activities/work_package/activities_spec.rb[1:5:2:1]`
- `rspec ./spec/features/projects/create_spec.rb[1:12:3:1]`
- `rspec ./spec/features/users/user_memberships_spec.rb[1:2:1:1:1:1]`
- `rspec ./spec/features/workflows/edit_multi_role_spec.rb[1:4:4:2]`

Treat this as a standalone task, unrelated to PR #24345. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #24345 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 @akabiru 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 @akabiru, and request a review from @akabiru.
On every commit, set @akabiru 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.

@akabiru
akabiru force-pushed the implementation/comms-897-adjust-incoming-e-mail-handler-to-read-write-target_versions branch from 195d391 to ee41c6f Compare July 20, 2026 18:20
The mail handler wrote versions through the deprecated version_id column; route it through the target_versions association instead, in line with the ongoing migration away from single versions. The Target versions keyword now sets them, comma-separated for several (more than one requires the multiple versions feature), taking precedence over the legacy Version keyword.

References COMMS-897.
@akabiru
akabiru force-pushed the implementation/comms-897-adjust-incoming-e-mail-handler-to-read-write-target_versions branch from ee41c6f to a6f9b5e Compare July 20, 2026 19:16
@akabiru
akabiru marked this pull request as ready for review July 20, 2026 19:20
@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 changed the title Implementation/COMMS-897: Read and write target versions in the incoming e-mail handler [COMMS-897] Read and write target versions in the incoming e-mail handler Jul 20, 2026
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./modules/backlogs/spec/features/inbox_column_spec.rb[1:7:1]
  • rspec ./modules/overviews/spec/features/managing_dashboard_page_spec.rb[1:1: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 #24345, linked for reference only):

- `rspec ./modules/backlogs/spec/features/inbox_column_spec.rb[1:7:1]`
- `rspec ./modules/overviews/spec/features/managing_dashboard_page_spec.rb[1:1:1]`

Treat this as a standalone task, unrelated to PR #24345. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #24345 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 @akabiru 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 @akabiru, and request a review from @akabiru.
On every commit, set @akabiru 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.

The README changes now live in #24361 so the documentation can be reviewed independently of this handler change.
@akabiru akabiru self-assigned this Jul 21, 2026

@thykel thykel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀 Very nice!

@akabiru
akabiru merged commit f0d108a into dev Jul 22, 2026
14 checks passed
@akabiru
akabiru deleted the implementation/comms-897-adjust-incoming-e-mail-handler-to-read-write-target_versions branch July 22, 2026 06:15
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

2 participants