Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


RolePersonComments
Solution ArchitectApproved
Java Lead
UI Lead
Product Owner


Jira Legacy
serverSystem
Jira
JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyUXPROD-137
 -
 Transfer/Relink  Move Holdings and/or Items

Requirements

This feature covers ability to move attached records and maintain existing relationships. When moving holdings to another instance, all associated items have to be transferred as moved as well. Bulk moving items and holdings. Ease of linking/relinking bib/holdings/item data. Part of the refined UX design of Inventory. Drag and drop is one possible solution.

BE Design

Connections between items, instances, holdings.

Drawio
bordertrue
viewerToolbartrue
fitWindowfalse
diagramNameInstance-Holding-Item
simpleViewerfalse
width
diagramWidth631
revision1

Possible scenarios and implementation:

1) Move item(s) between holdings

Changing of each moved item by request: PUT /inventory/items/{itemId} with new item.holdingsRecordId.

No need to support transaction for items updating. Just need to populate errors for each failed items update in the response.

2) Move holdings with item(s) to another instance

Changing of each moved holding by request: PUT /inventory/holdings/{holdingId}  with new holding.instanceId.Holdings update endpoint: simple CRUD PUT endpoint should be implemented for holdings updating.

3) Move selected item(s) to a holdings in another instance

This case looks the same to 1). Changing of each moved item by request: PUT /inventory/items/{itemId} with new item.holdingsRecordId.item with new item.holdingsRecordId.

Bulk operation approach

High-level description

The UI-client sends a move request to endpoints POST /inventory/items/move or inventory/holdings/move API. The mod-inventory processes this request, retrieves each item/holding from item/holdings-storage, prepares a request for each item/holding update and sends it asynchronously to tstorage. The mod-inventory waits for all responses from mod-inventory-storage to be completed and populates a response. In case of errors in some of the updating requests in the mod-inventory-storage, the mod-inventory returns a response containing a list of errors for not updated items/holdings.

APIs

MethodPathProvided permissionsRequestResponseDescriptionNotes
POST

inventory/items/move

inventory.items.move.item.postMove201 CREATEDMove items to new holding


POSTinventory/holdings/moveinventory.holdings.move.item.postMove201 CREATEDMove holdings to new instance

Flow details

Sequence diagram:

Drawio
bordertrue
diagramNameItems_holdings_bulk_operations
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth511
revision5


Steps:

1) Send move request (it contains id of holding to which items should be moved and items ids).

2) Send GET items collection form item-storage.

3) Update retrieved items with new item.holdingsRecordId and send asynchronously update request to item-storage for each item.

4) Wait all responses, populate errors if some of request failed.

5) Return response to UI client.

6) Send move request (it contains id of instance to which holdings should be moved and holdings ids).

7) Send GET holdings collection form holdings-storage.

8) Update retrieved  holdings with new holding.instanceId and send asynchronously update request to holdings-storage for each holding.

9) Wait all responses, populate errors if some of request failed.

10) Return response to UI client.


Move schema:

FieldTypeRequiredNote
toUUIDtrueUnique identifier of instance/holding to which holdings/items to be moved
idsArray<UUID>trueArray of holding/item unique identifiers which will be moved to the new instance/holding


Business logic algorithm for mod-inventory:

Drawio
bordertrue
diagramNameTransfer_relink_algorithm
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth862
revision4