Page MenuHomePhabricator

One Phabricator task displayed in two workboard columns simultaneously
Open, LowPublicBUG REPORT

Description

If you are affected by this: Drag and drop the task on the workboard from the "wrong" column to the "correct" column.


Upstream: https://we.phorge.it/T15764

This has been reported in T335422 and T160715.

Thus filing a task for potential investigation of the root cause, in case anyone ever finds a reproducer and/or capacity to investigate Phabricator's transaction code.

I wildly guess that a non-default column on a parent board, then moving the task into a milestone, then back to a non-default column on the parent board (milestone columns are displayed on the parent board) play a role here.

Looking into T335422, ignoring the initial task creation, Codex tag, and most recent problem fixing, here's what's in the DB (output manually edited for improved readability):

+---------+----------+---------------------------------------------------------------------------------------------------------+---------------------+
| id      | userName | oldValue and newValue                                                                                   | date                |
+---------+----------+---------------------------------------------------------------------------------------------------------+---------------------+
| 7958421 | ldelench | board:"Design-Systems-Team", fromcolumns:"Requests", column:"Codex Component Backlog"                   | 2022-05-25 21:30:50 |
| 8242869 | ldelench | board:"Design-Systems-Team", fromcolumns:"Codex Component Backlog", column:"Backlog"                    | 2022-09-16 18:15:58 |
| 8483115 | egardner | board:"Design-Systems-Team", fromcolumns:"Backlog", column:"Design-Systems-Product-Roadmap" (milestone) | 2022-12-20 21:52:03 |
| 8483116 | egardner | project: from "Design-Systems-Team" to "Design-Systems-Product-Roadmap" (milestone)                     | 2022-12-20 21:52:03 |
| 8485232 | ldelench | board:"Design-Systems-Product-Roadmap", fromcolumns:"Backlog", column:"Proposed Components"             | 2022-12-21 18:26:50 |
| 8626931 | ldelench | project: from "Design-Systems-Product-Roadmap" (milestone) to "Design-Systems-Team"                     | 2023-02-18 00:41:08 |
| 8664980 | ldelench | board:"Design-Systems-Team", fromcolumns:"Requests", column:"Needs Refinement"                          | 2023-03-03 21:27:53 | <<<
| 8705079 | bmartine | project: from "Design-Systems-Team" to "Design-Systems-Sprint" (milestone)                              | 2023-03-17 13:12:55 |
| 8705081 | bmartine | board:"Design-Systems-Sprint", fromcolumns:"Committed", column:"In Design"                              | 2023-03-17 13:13:40 |
| 8715324 | bmartine | board:"Design-Systems-Sprint", fromcolumns:"In Design", column:"Design Review"                          | 2023-03-21 15:21:37 |
| 8738111 | bmartine | board:"Design-Systems-Sprint", fromcolumns:"Design Review", column:"Ready for Development"              | 2023-03-29 12:38:48 |
| 8803035 | CCiufo-W | board:"Design-Systems-Team", fromcolumns:"Design-Systems-Sprint" (milestone), column:"Refined/Up Next"  | 2023-04-24 21:09:36 | <<<
| 8803036 | CCiufo-W | project: from "Design-Systems-Sprint" (milestone) to "Design-Systems-Team"                              | 2023-04-24 21:09:36 |
+---------+----------+---------------------------------------------------------------------------------------------------------+---------------------+

Underlying DB query, FYI:

SELECT mt.id, u.userName, REPLACE(REPLACE(REPLACE(mt.oldValue,"PHID-PROJ-4gmhqpxrfqgvms2qjyba","Design-Systems-Team"),'PHID-PROJ-6ztp3ghofb4iigying6d','Design-Systems-Product-Roadmap'),'PHID-PROJ-7x2jagmev5l5dyco323o','Design-Systems-Sprint') AS oldValue, REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REPLACE(REPLACE(REPLACE(mt.newValue,"PHID-PROJ-4gmhqpxrfqgvms2qjyba","Design-Systems-Team"),'PHID-PROJ-6ztp3ghofb4iigying6d','Design-Systems-Product-Roadmap'),'PHID-PROJ-7x2jagmev5l5dyco323o','Design-Systems-Sprint'), '\"PHID-TASK-.{20}\",?',''), '\"beforePHIDs\":\\[\\],',''), '\"afterPHIDs\":\\[\\],',''), 'PHID-PCOL-4zzjgyjv7i5nbl63f7lp','Committed'), 'PHID-PCOL-e7a2d7mtre57tqrtgcpk','Needs Refinement'), 'PHID-PCOL-fho6k73fws32xtvnr54a','Ready for Development'), 'PHID-PCOL-ht7qch3vd2ev4noufynl','Backlog'), 'PHID-PCOL-nrq65vsgm6iyxi2c3f2j','Refined/Up Next'), 'PHID-PCOL-o4qolhwlyand4wpv2plw','Backlog'), 'PHID-PCOL-pihiq42brxaubbejuiod','Proposed Components'), 'PHID-PCOL-purybymc2iwhpw26oxss','Design-Systems-Product-Roadmap'), 'PHID-PCOL-rhtndg655bjfbsot54r4','Design-Systems-Sprint'), 'PHID-PCOL-t3bzplilzcmchy74ame6','In Design'), 'PHID-PCOL-v2bi5q3vouwwh7zpqvp5','Requests'), 'PHID-PCOL-vdtqhmojntko7usxjuyj','Codex Component Backlog'), 'PHID-PCOL-wwtuysjejyofumuo7k2m','Design Review') AS newValue, FROM_UNIXTIME(mt.dateCreated) AS date FROM phabricator_maniphest.maniphest_transaction mt INNER JOIN phabricator_user.user u ON mt.authorPHID = u.phid WHERE (mt.transactionType = "core:columns" OR (mt.transactionType = "core:edge" AND mt.newValue LIKE "%PHID-PROJ%")) AND mt.objectPHID = "PHID-TASK-3tlkmmofmuz2vrtn4obq" AND mt.newValue NOT LIKE "%PHID-PROJ-n3w2cazdwjy56gx7ic5b%" AND u.userName != "gerritbot" AND mt.dateCreated < 1682523100 AND mt.dateCreated != 1653525557 ORDER BY mt.dateCreated;

Event Timeline

Affected T140289 has the same pattern:

  • debt moved this task from This Quarter to Up Next (non-standard column) on the Discovery-Search board.
  • debt edited projects, added Discovery-Search (Current work) (milestone); removed Discovery-Search.
  • Deskana moved this task from Current work (milestone) to search-icebox (non-standard column; renamed from "Later") on the Discovery-Search board.
  • Deskana edited projects, added Discovery-Search; removed Discovery-Search (Current work) (milestone).

Technically this is the very same underlying issue as T139396: "AphrontDuplicateKeyQueryException" when trying to drag a task from (sub-project) column to other column on parent workboard but the error in this case is suppressed by the ON DUPLICATE KEY UPDATE in https://we.phorge.it/source/phorge/browse/master/src/applications/project/engine/PhabricatorBoardLayoutEngine.php;f497b93e4311b424b24599f23c272ecb912ab5a6$281-282

Steps to reproduce:

  1. Move a task from Backlog workboard column in parent project to a milestone column via the task "Add Action" dropdown.
  2. On the workboard, drag and drop the task from the milestone column to another column which is not the Backlog column.

Upstream code seems to lack _any_ handling of updating the columnposition database content when using the "Add Action" dropdown, as can be seen via
SELECT p.name AS projectNameFromBoardID, pc.name AS columnName, pc.proxyPHID, pcp.* from phabricator_project.project_columnposition pcp INNER JOIN phabricator_project.project_column pc ON pc.phid=pcp.columnPHID INNER JOIN phabricator_project.project p ON p.phid = pcp.boardPHID WHERE pcp.objectPHID = "PHID-TASK-xxxxxxxxxxxxxxxxxxxxx";
creating an unexpected duplicate entry for the second step.

Aklapper moved this task from Backlog to Reported Upstream on the Upstream board.
Aklapper moved this task from Backlog to Upstreamed on the Phabricator (Upstream) board.