Feature #2621
closed
Errors when editing an issue that was just edited - StaleObjectError
Added by Eric Davis almost 16 years ago.
Updated almost 13 years ago.
Description
What should happen¶
- User A opens issue #100 and starts to update it with content and files
- User B opens issues #100, changes the status, and saves
- User A submits the form
- Images are uploaded
- Redmine finds User A's data was stale
- Redmine redirect User A to the edit form with the data User A has seen but without a stale lock
- Redmine displays User A's comment and time entry data properly in the form
- Redmine displays an Error message saying the data was updated by another user
- User A checks the form and resubmits
- Redmine saves User A's data
Bugs¶
8. The error should say which data was updated. Since User B changed the Status it should say "Status was changed to XYZ"
9. Re-submitting the form fails because Redmine is using the stale lock and not a fresh one. Since the lock is never renewed, the user will be unable to submit the form successfully.
I have working code and will integrate it once it's been tested and cleaned up
Files
Re-submitting the form fails because Redmine is using the stale lock and not a fresh one.
It prevents user B from overwriting user A's changes by simply re-submitting the form.
Surely, it's a poor design but it's not a defect.
- Tracker changed from Defect to Feature
Jean-Philippe Lang wrote:
It prevents user B from overwriting user A's changes by simply re-submitting the form.
Surely, it's a poor design but it's not a defect.
It puts the user into a position where they either lose their data or have to copy and paste it all into a new browser tab, hence the defect. If you look the form when there is a conflict, there is a hidden field for lock_version that is the stale lock. So at that point, the user cannot ever submit the form, even if they reconcile the differences. If the error is going to be handled by displaying a form, then the form should be functional.
I've attached a patch to fix thi, I've ran into it many times and every time I lose data. This patch fixes several things and makes the user interface more friendly (I hope):
- When a conflict occurs, the user can submit their change
- The conflicting fields are shown to the user (in Red)
- File attachments that failed are saved and re-associated (this reverts the fix in r2875 / #3846. If the user just spent a bunch of time to upload a large file, deleting it could make them unhappy).
I'm ready to commit this fix if it looks good.
Here's a screenshot of what the user would see if a conflict occurred.
It does not appear to list any journal entries that accompany the updates. Could you include the journal entries that go with the changes so the user has all the information available to them?
- Target version changed from 0.9.0 to 1.0.0 (RC)
I prefer that we take some time before this gets added to a stable branch.
And it's a bit late for 0.9.
- Priority changed from High to Normal
- Target version changed from 1.0.0 (RC) to 1.1.0
Pushing to a later release. If I can get me some more feedback on the UI I can update the patch.
- Assignee deleted (
Eric Davis)
- Target version changed from 1.1.0 to Unplanned backlogs
- Target version changed from Unplanned backlogs to Candidate for next major release
- Status changed from 7 to Closed
- Target version deleted (
Candidate for next major release)
- Resolution set to Duplicate
Superseded by #8691 which is fixed for 1.4.0.
Also available in: Atom
PDF