We have run into weird race conditions when multiple users are editing the same issue.
- User 1 opens the Edit Issue dialog
- User 1 changes field A, leaving field B blank
- User 2 opens the Edit Issue dialog and changes field B
- User 2 presses Update
- User 1 presses Update
The behavior we see is that field B will be reverted to a blank value, because User 1 did not have a value for field B when the Edit Issue dialog was initially opened.
It seems like there could be two main approaches to improve this scenario:
If the user does not change a field in the Edit Issue window, don't update that field.
This would require knowing if a user changed the field, as there are legitimate cases to change a field from a value back to blank.
Implement some sort of concurrency scheme that better handles multiple users working on the same issue. A few ideas include:
- Implement a "save id" concept, where you must get a unique token and return it when making change. If you do not have the latest token, you get an error and have to reconcile the changes and submit again
- Provide the ability to "lock" an issue and when the Edit window is open, other users cannot make changes.
It seems like Option 1 could be implemented in a non-breaking way and would improve most cases like this. Option 2 would likely be a breaking change to the APIs, but would provide much more control over how cases like this are handled.