# Bug OP-20534 - Board lists reload all their cards twice after dragging a card to another list

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-20534

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Boards |
| Target versions | 18.0.0 |
| Observed in versions | 18.0.0, 17.9.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Alexander Coles |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Preconditions

- OpenProject 17.8.0 (Docker all-in-one), same code on `release/17.9` and `dev`
- A status (action) board whose lists hold a few dozen work packages, e.g. "New" with 40
- Chrome; no console errors

### Steps to reproduce

1. Open the status board with the browser's network tab open
2. Drag a card from "New" to "In progress"

### Actual behavior

- The card moves into "In progress" right away, but both lists then show the loading indicator and fetch
  all their work packages again (`GET /api/v3/queries/:id?…&pageSize=500`, the full HAL representation
  of every card, ~440 kB of JSON for 34 cards).
- About two seconds later the board polling fetches both lists in full a second time.
- That is four full list loads per drop for the user who moved the card. With larger lists and a few
  colleagues having the same board open, the lists stay blocked by the loading indicator for 5–10 s.

Measured on a local 17.8.0 instance (lists of 200 / 150 cards, one move New → In progress):

| | full list loads | loading indicator |
|---|---|---|
| board open in 1 tab | 4 | 1.7–2.9 s |
| board open in 4 tabs | 3–4 | 3.8–7.3 s |

### Expected behavior

- No list reload after an own drag and drop: the card is already in place, only the work package
  update and the order updates need to be sent.
- Lists still reload when the attribute changes in a way the list does not show yet
  (split view, another user).

### Cause

1. `BoardListComponent#listenToActionAttributeChanges` calls `updateQuery(true)` on the source and the
   target list for every change of the action attribute, even though the drag and drop already moved
   the card optimistically.
2. `CausedUpdatesService` keys own updates by `updatedAt + href`. The href of a board list query includes
   its params (`/api/v3/queries/2552?columns%5B%5D=id&…`), the one of the polled query does not
   (`/api/v3/queries/2552`), so own order updates are never recognised and polling reloads both lists.

A pull request with a fix follows and will be linked here.
