openlibraryenvironment / reshare-analytics

Community query repository for ReShare analytics based on Metadb/LDP
Apache License 2.0
3 stars 2 forks source link

Call number field is blank on requesting turnaround time report #35

Open kristenwilson opened 2 years ago

kristenwilson commented 2 years ago

The requesting turnaround time report turnaround_req_7.sql is displaying "none" in the call number field for all requests. The corresponding supplying report displays call numbers properly, so I suspect there is just an error in this one.

kristenwilson commented 2 years ago

@scwiek Can you take a look at this issue once you've finished with the discrepancies?

scwiek commented 2 years ago

@kristenwilson If you run the following query, do you get any results?

SELECT * FROM reshare_rs.patron_request pr WHERE pr.pr_is_requester IS TRUE AND pr.pr_local_call_number IS NOT NULL;

kristenwilson commented 2 years ago

No, it's empty for me. I was looking at the JSON version of some requests in the UI, and it appears that the local call number field is only present on the supplier record. I'm not sure if that's an oversight or something not supported by the ILL protocol. I can check into that.

I know that the call number is present in the bibRecord field on the request, which essentially contains the whole bib. I don't know if that's practical to use in this case or not. This what it looks like in the JSON document:

"bibRecord": "{\"@context\":\"http://si-cardinal-okapi.folio-dev.indexdata.com/inventory/instances/context\",\"id\":\"e21b3df3-e3be-4dc4-b987-ef7a82901190\",\"hrid\":\"in00000001430\",\"source\":\"MARC\",\"title\":\"All rivers run to the sea : memoirs\",\"matchKey\":\"all_rivers_run_to_the_sea___memoirs___________________________________1995432_1__knopf_____t________________________________________wiesel__elie__1928_2016_______________p\",\"indexTitle\":\"all_rivers_run_to_the_sea___memoirs___________________________________1995432_1__knopf_____t________________________________________wiesel__elie__1928_2016_______________p\",\"parentInstances\":[],\"childInstances\":[],\"alternativeTitles\":[],\"editions\":[\"[1st American ed.].\"],\"series\":[],\"identifiers\":[{\"identifierTypeId\":\"47a65482-f104-45e8-aead-1f12d70dcf32\",\"value\":\"9937906103569\"},{\"identifierTypeId\":\"c858e4f2-2b6b-4385-842b-60732ee14abb\",\"value\":\" 95017607 \"},{\"identifierTypeId\":\"8261054f-be78-422d-bd51-4ed9f33c3422\",\"value\":\"0679439161\"},{\"identifierTypeId\":\"7e591197-f335-4afb-bc6d-a6d76ca3bace\",\"value\":\"ocm32429215\"},{\"identifierTypeId\":\"7e591197-f335-4afb-bc6d-a6d76ca3bace\",\"value\":\"3790\"},{\"identifierTypeId\":\"7e591197-f335-4afb-bc6d-a6d76ca3bace\",\"value\":\"(PMilS)3790-millerdb-Voyager\"},{\"identifierTypeId\":\"9db07825-8035-4d9a-8a41-d59a5f1c337b\",\"value\":\"9937906103569\"}],\"contributors\":[{\"contributorNameTypeId\":\"2b94c631-fca9-4892-a730-03ee529ffe2a\",\"name\":\"Wiesel, Elie, 1928-2016\",\"contributorTypeId\":null,\"contributorTypeText\":null,\"primary\":true}],\"subjects\":[\"Wiesel, Elie--1928-2016\",\"Authors, French--Biography\",\"Jewish authors--Biography\",\"Holocaust, Jewish (1939-1945)--Personal narratives\",\"Holocaust survivors--Biography\"],\"classifications\":[{\"classificationNumber\":\"PQ2683.I32; Z52313 1995\",\"classificationTypeId\":\"ce176ace-a53e-4b4d-aa89-725ed7b2edac\"},{\"classificationNumber\":\"813/.54; B\",\"classificationTypeId\":\"42471af9-7d25-4f3a-bf78-60d29dcf463b\"}],\"publication\":[{\"publisher\":\"Knopf :\",\"place\":\"New York :\",\"dateOfPublication\":\"1995.\",\"role\":null}],\"publicationFrequency\":[],\"publicationRange\":[],\"electronicAccess\":[],\"instanceTypeId\":\"6312d172-f0cf-40f6-b27d-9fa8feaf332f\",\"instanceFormatIds\":[],\"physicalDescriptions\":[\"432 pages, 8 unnumbered pages of plates\"],\"languages\":[],\"notes\":[],\"discoverySuppress\":false,\"statisticalCodeIds\":[],\"metadata\":{\"createdDate\":\"2020-12-09T16:32:40.838+00:00\",\"createdByUserId\":\"8f41720f-8694-5375-a9e3-1c796378ff2c\",\"updatedDate\":\"2020-12-09T17:29:40.177+00:00\",\"updatedByUserId\":\"8f41720f-8694-5375-a9e3-1c796378ff2c\"},\"tags\":{\"tagList\":[]},\"natureOfContentTermIds\":[],\"precedingTitles\":[],\"succeedingTitles\":[],\"links\":{\"self\":\"http://si-cardinal-okapi.folio-dev.indexdata.com/inventory/instances/e21b3df3-e3be-4dc4-b987-ef7a82901190\"}}",

scwiek commented 2 years ago

Correct, that's what I noticed in the dev environment, but wasn't sure if that was just because of its low volume. I think the issue with the bib record is that it can contain multiple call numbers so if we chose one it may not match the item's call number. If you find out that leaving the call number out of the requester side was intentional, I can look into a way to pull the info in from the supplier side.

julienye commented 2 years ago

Uninformed observation - doesn't it make sense to leave the supplier call number out of the requester side? it's not relevant (or accurate for) the requester.

kristenwilson commented 2 years ago

I can ask the SME Team this week how important it is for the requester and where it would ideally come from.