question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kanban Boards revert column changes made by other users without user interaction

See original GitHub issue

Description of the issue

I have users who keep one of my kanban boards open. Recently a newly trained member of our team was organizing card on the kanban board, when he was dismayed to see that the work he was doing was being undone, and the cards were moving back into their original column!

Here is an example where Grant updated a document by moving it between kanban columns while Luke had two browser tabs open to the kanban board. Luke had left the tabs open from the previous day, but he never touched them on the day this happened.

image

It is noteworthy that Grant moved a second card within a few minutes of the first, and the same changes occurred on the second card by Luke at exactly the same time as on the first card.

Context information (for bug reports)

This was a difficult bug to track down, because it isn’t guaranteed to happen every time someone moves a card even if the proper environment is set up to reproduce the bug. However, I was able to pin down the cause to this POST request, which had the same timestamp as the modified time on the document that was improperly updated:

Request URL: https://foo.com/api/method/frappe.desk.doctype.kanban_board.kanban_board.update_order
Request Method: POST
Status Code: 200 OK

This makes sense, because the update_order call sends every card, including the list they are in, in the body of the POST request.

What I don’t understand is why.

a) What triggers the call to update_order? Is it time based? Is the browser failing to receive some sort of update in time? b) Why is there a call to update_order in the first place: especially when the user isn’t interacting with the page, but even IF the user is interacting with the page. See c) below c) There is a function called update_order_for_single_card that should work for any deliberate modifications to the order of cards that a user can perform on a board. Under what circumstances should the browser update the order of all cards on a board?

Output of bench version

ERPNext: v13.36.1 (version-13)
Frappe Framework: v13.36.2 (version-13)

Steps to reproduce the issue

  1. Have multiple people open the same kanban board, preferably staggered (in case staggering when the board is opened helps to replicate the issue sooner).
  2. Move a card between kanban columns and wait up to 10m.
  3. Monitor the database using something like SELECT name, modified, modified_by FROM tab[DOCTYPE] ORDER BY modified DESC, or waiting until the change is reflected in the other user’s browser tabs after an automatic update of the kanban board.
  4. Repeat until the card is modified by someone other than the person who moved the card.

Observed result

Every once in a while, the last person who modifies the card won’t be the person who moved it. In that case, the column will change back to the original column when the value of the field is reverted.

Expected result

Cards should remain in the selected column unless they are physically moved to a different column or the column field is updated by a person on the Document itself.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
git-avccommented, Oct 31, 2022

This video show the issue with all its beauty 😉

Even without manual refreshing … after a while, some kind of autorefresh launchs /api/method/frappe.desk.doctype.kanban_board.kanban_board.update_order

kanban

0reactions
barredterracommented, Nov 1, 2022

@git-avc I can confirm, Kanban board is a big mess. Tried to improve it, but failed: https://github.com/frappe/frappe/pull/17424#issuecomment-1269648947

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kanban (exorcism) issue. Undesired data update - Bug
Kanban Boards revert column changes made by other users without user interaction ... ## Description of the issue I have users who keep...
Read more >
Query by assignment or workflow changes in Azure Boards
Learn how to list work items based on changes made to their assignment, state, or Kanban board column or swimlane in Azure Boards....
Read more >
How to Customize your Board and Edit your Workflows?
(1) Use the pallet icon to change the background color of the column. (2) Use the drag & drop column to changes its...
Read more >
Configure columns | Jira Software Cloud - Atlassian Support
The default columns on a Kanban board are Backlog, Selected for Development, In Progress, and Done. As your team's workflow matures, you may...
Read more >
Issue boards - GitLab Docs
An issue board represents a unique view of your issues. It can have multiple lists with each list consisting of issues represented by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found