Optimistic locking: display error message to inform user about OL

CSP Request Details

None

CSP Rejection Details

None

CSP Approved

None

Description

Purpose:

User story statement(s):

As a user,
I want to update the existing Inventory Instance/Holdings record via quick-marc
so that when the optimistic locking issue has occurred:

"{ \"message\": \"Cannot update record dc822c6c-b27a-4a77-8c59-1c42a50d0745 because it has been changed (optimistic locking): Stored _version is 3, _version of request is 1\", \"severity\": \"ERROR\", \"code\": \"23F09\", \"where\": \"PL/pgSQL function holdings_record_set_ol_version() line 8 at RAISE\", \"file\": \"pl_exec.c\", \"line\": \"3841\", \"routine\": \"exec_stmt_raise\", \"schema\": \"diku_mod_inventory_storage\", \"table\": \"holdings_record\" }"

user will see an understandable message 

Requirement

  • Requirement applies to the user editing a MARC bib or MARC holdings record via quickMARC

  • If user hits Save and a conflict is detected then display Conflict detection banner

  • If a MARC bib record then clicking View latest version link displays AS IF the user hit Save & close and it was successful AND display three pane view with an update Instance record in the third pane in a new window/tab

    • If possible have focus go to the instance record pane header.

  • If a MARC holdings record then clicking View latest version link displays AS IF the user hit Save & close and it was successful AND display update FOLIO Holdings record in a new window/tab

    • If possible have focus go to FOLIO holdings pane header

  • If user hits Cancel or X on the Edit quickMARC form then no change to current UX behavior > Show Are you sure modal?

    • If user has deleted MARC fields/rows or has entered an invalid value then do not show the are you sure you want to delete fields modal or error toast notification. Just show the conflict detection modal (if possible)

    , can you confirm if this is possible?

  • When user hits Save & close, make sure focus returns or remains on the conflict detection banner.

Scenarios:
Given the user A is editing a MARC bib or MARC holdings record via quickMARC
AND while user A is editing the record via quickMARC, user B has edited and saved the same quickMARC record
Therefore user A editing the quickMARC record is not viewing the latest version
When user A hits Save on the quickMARC form
Then display the conflict detection banner on the quickMARC form

Given conflict detection banner displays on the MARC bib record - quickMARC
When user A clicks on View latest version link
Then display three pane view with an update Instance record in the third pane in a new pane/window

Given conflict detection banner displays on the MARC holdings record - quickMARC
When user A clicks on View latest version link
Then display updated FOLIO Holdings record view in a new pane/window

Given conflict detection banner displays on the MARC holdings record - quickMARC OR MARC bib record - quickMARC
When user A hits Cancel or X
Then display the Are you sure? modal (no change from current behavior)

Given conflict detection banner displays on the MARC holdings record - quickMARC OR MARC bib record - quickMARC
When user A hits Save again
Then shift focus to the conflict detection banner

Given a user has deleted rows
When a conflict is detected
Then do not show are you sure you want to delete fields modal
AND just show the conflict detection banner

Given a user has entered invalid values
When a conflict is detected
Then do not show error toast notification
AND just show the conflict detection banner  , can you confirm if this is possible?

Environment

None

Potential Workaround

None

Attachments

1
  • 30 Mar 2022, 12:20 PM

Checklist

hide

TestRail: Results

Activity

Show:

Natalia ZaitsevaApril 14, 2022 at 1:16 PM

demonstrated on snapshot

Khalilah GambrellApril 3, 2022 at 5:59 PM

Hey

Is this work available in snapshot? If so I am not seeing the message. In fact the following happens 

1- Have the same instance record open in two tabs 

2- Hit Edit on both tabs

3- One one of the tabs, edit the record and hit Save

4- Record saves. 

5-Go to the other tab that is still in edit

6-Edit that record. 

7-Hit Save

8- The record seems to update rather than show the Conflict detection banner. 

9. NOTE: The record does seem to update  and the update changes the quickMARC status to Error. 

 

 

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Morning Glory (R2 2022)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created March 30, 2022 at 12:20 PM
Updated June 28, 2022 at 2:13 PM
Resolved April 14, 2022 at 1:16 PM
TestRail: Cases
TestRail: Runs

Flag notifications