Skip to content

[AGILE-178] Changing the status of a work package in the sprint board does not update the column#24289

Draft
thykel wants to merge 5 commits into
devfrom
bug/AGILE-178-changing-the-status-of-a-work-package-in
Draft

[AGILE-178] Changing the status of a work package in the sprint board does not update the column#24289
thykel wants to merge 5 commits into
devfrom
bug/AGILE-178-changing-the-status-of-a-work-package-in

Conversation

@thykel

@thykel thykel commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🔁 Taken over from #23811

Ticket

https://community.openproject.org/work_packages/AGILE-178

What are you trying to accomplish?

Fixes a bug on action boards (sprint boards and Kanban boards): changing a work package's status from the details panel does not move its card to the matching column.

Steps to reproduce

  1. Open an action board (e.g. the active sprint board or any status Kanban board).
  2. Open a work package's details panel via the "i" icon.
  3. Change the status (e.g. "Claim", which assigns the work package and sets it to "In development").
  4. The card stays in its original column (e.g. "Confirmed") instead of moving to the column matching the new status.

The card only ends up in the right column after a manual full page reload. As noted in the report, this affects all action boards, not just sprint boards.

Root cause

The details panel is rendered server-side into the content-bodyRight Turbo frame (app/views/work_packages/split_view.html.erb), and its body embeds the Angular work package view as a separately-bootstrapped custom element. Edits made there do not reach the board's Angular HAL event bus, so BoardListComponent.listenToActionAttributeChanges() never fires. The polling fallback (QueryUpdatedService) only watches each query definition's updatedAt, not the work packages it contains, so it never detects the status change either. The result is that the affected columns are never refreshed.

What approach did you choose and why?

I bridged the Hotwire details panel back to the Angular board by listening for turbo:frame-load events on the content-bodyRight frame in BoardListContainerComponent. When that frame finishes loading, every column is refreshed via the existing public BoardListComponent.updateQuery(false), so each list re-runs its filtered query and the card naturally lands in the correct column (and disappears from the old one).

  • The close button is an <a href=base_route data-turbo> rendered inside the frame, so closing the panel navigates the frame and emits turbo:frame-load — directly matching the reporter's expectation that "after closing the details panel, the board should be reloaded". The same hook also covers any in-panel save that re-renders the frame.
  • skip(1) ignores the panel's initial open (when nothing has changed yet) to avoid a redundant reload.
  • The listener is filtered to event.target.id === 'content-bodyRight', so nested frames (e.g. the activity tab) do not trigger refreshes.
  • The fix lives in the shared board list container, so it applies to all action boards (status, assignee, version, Kanban).

Alternative considered and discarded: re-emitting synthetic HAL events from the Turbo frame into the Angular event bus. That is more invasive and cross-stack; the frame-load hook is contained, frontend-only, and reuses the board's existing refresh path.

Screenshots

No visual changes (behavioral fix — cards now move to the correct column after a status change in the details panel).

Merge checklist

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

@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

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

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

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

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