- MODQM-311Getting issue details... STATUS
Goals
- Determine complexity of allowing for configuration of 001 generation (prefix + starting value)
- Adding the ability to select the desired authority source file at point of creation of new record (so the system would know how to generate the 001 per the configuration)
Approach
- Create new endpoint to retrieve HRID by authority file id
- Implement sequence number generation mechanism for authority local files
- On the UI user will select file name. And before creation UI should put to 001 field value from the HRID endpoint.
Tickets
Overview | Approach | Module | Ticket |
---|---|---|---|
Extend authority source file schema to store local files |
| mod-inventory-storage | 2 sp |
Implement sequence number generation mechanism for authority local files |
| mod-inventory-storage | 5 sp |
Ability to store authority local files
Settings application UI preview:
Endpoints:
GET: /authority-source-files/{id}/hrid
Description: Endpoint returns current hrid value and increment it. Should be called once user clicked on the "create" button to put value in the 001 field.
POST: /authority-source-files
New query parameter: startNumber (default = 1)
Sequence number generation mechanism for authority local files
Sequences Approach
There is a similar approach that works already in the mod-inventory-storage. It generates Hrid numbers for Instances, Holdings, and Item records, and can be configured from UI (Settings → Inventory → Hrid handling);
The problem here is that we will create new sequences in Runtime for each new authority file. (format: "hrid_authority_local_file_{prefix}_seq")
Table with counter Approach
New table should be created:
To work with table it's better to use SERIALIZABLE Isolation:
@Transactional(isolation = Isolation.SERIALIZABLE)
Select local authority file on the UI
- User should select local file for 001 field
- We also need to warn the user that field 001 may be overwritten by field 010.