Skip to content

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

🛠 with at Siemens

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.

image

How to set up and validate locally

  1. Open the milestone edit page in two individual browser tabs, e.g. http://127.0.0.1:3000/flightjs/Flight/-/milestones/6/edit
  2. In one of the brwoser tabs, edit and save the description of the milestone => this should be successful
  3. 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 in app/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.

Related to #27338 (closed)

Edited by Gerardo Navarro

Merge request reports