Add lock_version to milestone
What does this MR do and why?
Until now, it was possible to update the milestone object in parallel. This would cause data loss when one user overrides the changes that antoher user has made seconds before.
With this change, we are avoiding the avoiding concurrent edits, upgrade and subsquently data loss.
Changelog: added
Screenshots or screen recordings
The following screenshot occurs when the milestone is updated and a ActiveRecord::ObjectStaleError
occurred because the object has been updated by another user or session.
How to set up and validate locally
- Open the milestone edit page in two individual browser tabs, e.g. http://127.0.0.1:3000/flightjs/Flight/-/milestones/6/edit
- In one of the brwoser tabs, edit and save the description of the milestone => this should be successful
- In the other browser tab, edit and save another description for the milstone => this should fail with an alert, see screenshot above
TODO
-
Enable lock_version
inapp/views/groups/milestones/_form.html.haml
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR. -
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
Related to #27338 (closed)