Skip to end of banner
Go to start of banner

Folijet - Design updating of MARC records and related instances.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

MODSOURMAN-262 - Getting issue details... STATUS

Requirements

Purpose: MARC Bibliographic records can be updated in a variety of ways - through an Import that updates it, or through quickMARC, or through MARCcat. Whenever/however an SRS MARC Bib record is updated, then the corresponding changes need to be made in the Instance fields that are controlled by the tenant's default map.

As a staff person
I want to see an updated Instance when the underlying SRS MARC Bib has been updated
So that I can have access to that updated information

Scenarios

  1. Scenario 1
    • Given the Inventory Instance View/Edit screens
    • When the underlying SRS MARC record is updated
    • And the updates affect fields that are part of the Tenant's default MARC Bib-Inventory Instance map
    • Then make the corresponding updates to the affected fields of the Instance automatically
    • NOTE: Changes could be adding fields, changing data in an existing field, or removing fields.
  2. Scenario 2
    • Ensure automated testing coverage for this new code is 80% plus

Acceptance testing:

  • Add some fields to an existing SRS MARC (e.g. add a 7xx contributor, or a 6xx subject heading, or a 5xx note), and check the related Instance to see if the new fields show up.
  • Change the data in some fields in an existing SRS MARC (e.g. change the 245 title, or change the publication date in 260/264 c, or change the 336 $b), and check the related Instance to see if the update data shows
  • Remove some fields from an existing SRS MARC (e.g. remove a 6xx subject heading, or a 5xx note, or 336/337/338), and check the related Instance to see if the removed data has disappeared
  • Add, change, and remove some fields in an existing SRS MARC record, and check the related Instance to ensure all corresponding changes have been made

NOTE: The default MARC Bib-Inventory Instance map may vary from tenant to tenant. Updates should be made based on the Instance fields mapped/controlled by the specific Tenant's default map.

The FOLIO-supplied default MARC-Instance map: https://github.com/folio-org/mod-source-record-manager/blob/master/mod-source-record-manager-server/src/main/resources/rules/rules.json

Approach & Design

Endpoints:

MethodPathProvided permissionsRequestResponseDescriptionNotes
PUT/change-manager/parsedRecords/{id}change-manager.parsed-records.putcompatible parsed record204 UPDATED (compatible-parsed-record)Update parsed record{id} - parsed record id
GET/source-storage/records/{id}source-storage.records.getNA200 OK (compatible-record)Retrieve rcord by id{id} - record id
POST/source-storrage/snapshotssource-storage.snapshots.postcompatible snapshot201 CREATEDCreate new snapshot
POST/source-storage/recordssource-storage.records.postcompatible record201 CREATEDCreate new record
POST/inventory/handlers/quick-markinventory.events.postevent200 OKEvent handler

Tickets for implementing endpoints which are not exists yet:

  1. PUT /change-manager/parsedRecords/{id} -  MODSOURMAN-268 - Getting issue details... STATUS
  2. GET /source-storage/records/{id} -  MODSOURCE-115 - Getting issue details... STATUS
  3. POST /inventory/handlers/quick-mark -  MODINV-207 - Getting issue details... STATUS

Schema:

Step-by-step guide:

  1. Updated MARC-record sends to the "mod-source-record-manager" on the specific endpoint for updating MARC-records: PUT /change-manager/parsedRecords/{id}
  2. "mod-source-record-manager" retrieves record by its id (using generationId-mechanism): GET /source-storage/records/{id}
  3. "mod-source-record-manager"  creates new snapshot: POST /source-storage/snapshots
  4. "mod-source-record-manager" creates this MARC-record in the "mod-source-record-storage" using generationId-mechanism as new record: POST /source-storage/records
  5. "mod-source-record-manager" publishes new event with eventType: "QM_SRS_MARC_BIB_RECORD_UPDATED". Event payload contains updated MARC-record and "rules.json"-file.
  6. "mod-pubsub" receives this event and "mod-inventory" catches it as "subscriber" for this eventType via: POST /inventory/handlers/quick-mark event handler.
  7. "mod-inventory" retrieves eventPayload and builds new Instance based on its data using "data-import-processing-core". After that, "mod-inventory" updates this instance.

Finally, the instance updated.






  • No labels