edge-caiasoft calls into mod-remote-storage to retrieve bibliographic metadata related to item and to return Remote Storage System - Accession flow initiated by Remote storage system.
- Endpoint POST /accessions
- Request should contain itemBarcode, remoteStorageId
- Holdings automatic duplication isn't in the scope of this story (point 5 from document)
FOLIO responds with item’s (item and holding, but only the item that was accessioned) bibliographic information and automatically changes the item’s permanent location to a remote location (as per accession table). Accession queue record should be automatically created and saved in the accession queue (item should be accessioned before).
1. FOLIO checks the permanent location of the current holdings record. The holding needs to be changed to the remote location when the item is changed to the remote location. It is fine to have items with a different location from the holding. If one item has a remote location, the holding must have the same remote location:
- If a holding's permanent location matches the new item’s permanent location, the accession process successfully ends here.
- If a holding's permanent location doesn’t match the new item’s permanent location, then the accession flow continues.
2. FOLIO checks the items in the current holding and compares them with items from the Remote Storage System request.
- If all other items from the current holding have the same permanent location, as the accessioned item, or should have the same permanent location according to the barcodes in the request, then the current holding's permanent location is changed to the new remote location of the item. Accession process successfully ends here.
- If not all items from the current holding have or will have the same remote permanent location, then the accession flow continues.
3. FOLIO checks the current instance for the existence of a holdings record with a location which matches the new item’s permanent location.
- If such a holdings record is in place, the accessioned item is automatically moved to this holding.
- If there isn’t such a holdings record: a) current holdings record is automatically duplicated, b) holdings permanent location is changed to new item’s permanent location, c) item is automatically moved to created holdings record.
- Duplicate holdings record
MODRS-40(this isn't in the scope of this story).
- Endpoint: POST /accessions should be available
- Code should be covered by unit tests by at least 80%.