Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm Updating SRS record with new OCLC number will trigger a FOLIO Instance Update #987

Closed
jermnelson opened this issue May 15, 2024 · 2 comments
Assignees
Labels
data export Related to Data Export out of FOLIO to external vendors

Comments

@jermnelson
Copy link
Collaborator

jermnelson commented May 15, 2024

From this code:

def __put_folio_record__(self, srs_uuid: str, record: pymarc.Record) -> bool:
"""
Updates FOLIO SRS with updated MARC record with new OCLC Number
in the 035 field
"""
marc_json = record.as_json()
if self.snapshot is None:
self.__generate_snapshot__()
put_result = self.httpx_client.put(
f"{self.folio_client.okapi_url}source-storage/records/{srs_uuid}",
headers=self.folio_client.okapi_headers,
json={
"snapshotId": self.snapshot,
"matchedId": srs_uuid,
"recordType": "MARC_BIB",
"rawRecord": {"content": json.dumps(marc_json)},
"parsedRecord": {"content": marc_json},
},
)
if put_result.status_code != 200:
logger.error(f"Failed to update FOLIO for SRS {srs_uuid}")
return False
return True

After running the tests for ticket #988, confirm whether the instance record in folio is automatically updated or not.

If not, consider changing the code block above to use the change manager API endpoint instead, and then consider the resourcing implications of that (1 pod vs multiple pods being used).

@jermnelson jermnelson added the data export Related to Data Export out of FOLIO to external vendors label May 15, 2024
@jgreben jgreben changed the title Confirm Updating SRS record with new OCLC number trigger FOLIO Instance Update Confirm Updating SRS record with new OCLC number will trigger a FOLIO Instance Update May 17, 2024
@jermnelson jermnelson self-assigned this May 20, 2024
@jermnelson
Copy link
Collaborator Author

After running a couple of tests, unfortunately the SRS Okapi endpoint source-storage/records/{srs_uuid} does not automatically update the Instance.

@jgreben
Copy link
Contributor

jgreben commented May 21, 2024

See #1010

@jgreben jgreben closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data export Related to Data Export out of FOLIO to external vendors
Projects
None yet
Development

No branches or pull requests

2 participants