Frequent conflicts when editing work item descriptions
Problem
When editing a work item description, I frequently get this error even though I know no one else updated the description while I was actively doing so:
Steps to reproduce
Within the work item epic experience, If I am editing the description and I edit/update any other attribute on the epic, I get the description conflict warning message. For example, open an epic, start editing the title, make a few changes, then re-order the items in the child items widget. Is this known?
Details
Slack conversation
I see in the frontend code that we do this check to check if there is a conflict:
this.descriptionText !== this.workItemDescription?.description
this.descriptionText is supposed to be the description stored in the DB before you started editing so we can compare with the new description from the real-time update and show the banner.
8:31
But it’s actually the current description in the editor. So if you change any changes, the check will evaluate to true
8:31
@simon
I see you worked on this before
simon
Thursday at 9:24 PM
@heinrich
other way round - this.workItemDescription?.description is the one from DB/widget, then this.descriptionText is the current working copy. I have a couple of suspicions, will have a look shortly
heinrich
Thursday at 9:25 PM
I see. But the check is still incorrect right?
To check for conflicts we want to compare the description from DB when we started editing, with the newly updated description from DB.
We don’t want to compare with current working copy
simon
Thursday at 9:34 PM
yeagh we are missing a subscription for the accurate current copy, and there is a bit of dumb empty string stuff in there that is possibly causing 2 other minor issues
9:36
ummm is workItem.lockVersion updated for any change? "Incremented each time the work item is updated." (edited)
9:37
anyways, will dig into all this now. Perfect overlap with 2 issues I have assigned to me
heinrich
Thursday at 9:38 PM
lock version is only incremented with title / description changes if I recall correctly