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

Updating item with _version always fails with optimistic locking conflict

    XMLWordPrintable

    Details

    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      Prokopovych - Sprint 122
    • Development Team:
      Prokopovych

      Description

      Steps to Reproduce

      1. Log into https://core-platform.ci.folio.org/ where optimistic locking (fail on conflict) has been enabled.
      2. Open an item record for edit
      3. Change the item material type
      4. Save the item record
      5. (If it succeeds repeat Open, Change, and Save one time.)

      Expected Results

      Save succeeds.

      Actual Results

      Optimistic locking conflict detection modal with this error message:

      ERROR: in module @folio/inventory, operation PUT on resource 'items' failed, saying: { "message": "Cannot update record eedd13c4-7d40-4b1e-8f77-b0b9d19a896b because it has been changed (optimistic locking): Stored _version is 1, _version of request is <NULL>", "severity": "ERROR", "code": "23F09", "where": "PL/pgSQL function item_set_ol_version() line 8 at RAISE", "file": "pl_exec.c", "line": "3862", "routine": "exec_stmt_raise", "schema": "diku_mod_inventory_storage", "table": "item" }
      

      Additional information

      The front-end doesn't send the _version property when submitting the PUT request to the back-end.

      Updating instance and updating holding work and are not affected because the frontend sends the instance _version and holdings _version to the back-end when submitting the PUT request.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mpk35 Michal Kuklis
                Reporter:
                kgambrell Khalilah Gambrell
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases