Uploaded image for project: 'ui-inventory'
  1. ui-inventory
  2. UIIN-1245

Implement optimistic locking in Inventory



    • Story
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Duplicate
    • None
    • None
    • Prokopovych


      [color;orange} Charlotte: Note: 7/22/2021: Text below is in DRAFT. Will await the spec work - see Optimistic Locking - Detecting and Resolving Conflicts Requirements - https://wiki.folio.org/display/COMMUNITY/Optimistic+Locking+-++Detecting+and+Resolving+Conflicts+Requirements

      Purpose: In FOLIO, most storage modules follow the "last writer wins" strategy for handling record updates. From the UI perspective this may lead to a situation when a stale record (older version of a give record) previously loaded into the UI may override a more recent version on the server. Hence relevant updates may get lost in the process and the user is not made aware of what has happened. Furthermore, it is possible that updates on related records (e.g. holdings and items) can interfere with one another. See MODINVSTOR-516 for a specific example of this.

      User story statement(s):

      As a FOLIO user who has updated a record in Inventory,
      I want to be notified if my updates clash with any other simultaneously updates, whether the update is triggered by a person or by the system in any of FOLIO's apps (e.g. Data Import, Orders, or updates triggered outside of FOLIO by the Union Catalogue)?
      so that I can decide if I want to proceed with my updates or reapply them after the other updates have been saved


      1. Scenario:
        • Given an instance, holding or item is modified (by another user or by the same user in another browser window) while User A has it open
        • When User A attempts to save their changes
        • Then the "update clash popup" should display
      2. Scenario:
        • Given the update clash popup
        • When displayed
        • Then:
          • Header - Update clash
          • Body - Another user has updated this record and your working copy might not be up-to-date. Would you like to:
          • Action buttons
            • Update anyway
            • Reload
      3. Scenario:
        • Given the Update clash popup
        • When "Update anyway" is clicked
        • Then the record will be saved as it appears to User A (overwriting the last save)
      4. Scenario:
        • Given the Update clash popup
        • When Reload is clicked
        • Then the record will be reloaded to reflect the most recent changes (User A will have to re-apply their changes)


      This is blocked by UIIN-1568 "align dependency versions affected by Inventory's Optimistic Locking".
      A very basic error message has been implemented in UIIN-1527.

      TestRail: Results


          Issue Links



                Unassigned Unassigned
                charlotte Charlotte Whitt
                0 Vote for this issue
                10 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases