pulibrary / bibdata

Local API for retrieving bibliographic and other useful data from Alma (Ruby 3.2.0, Rails 7.1.3.4)
BSD 2-Clause "Simplified" License
16 stars 7 forks source link

583 action notes from holdings need to be shown in the Details section of the record show page #2077

Closed mzelesky closed 1 year ago

mzelesky commented 1 year ago

Current display

Currently, only subfield a is indexed from the 583 fields in https://github.com/pulibrary/bibdata/blob/7824d1bc1acfc97a7ef5dd79314085e9357a7787/marc_to_solr/lib/traject_config.rb#L789

Desired display

This is the initial format of showing 583s that was agreed to by Patty Gaspari-Bridges and Heidi Fisher.

[$3]: [Upcase first letter of $a] [$d] – [concatenate all $f with a space between the subfields] ([$5]) [hyperlink entire field to the value in $u]

Sample field: 583 1# $3 Vol. 1 $a committed to retain $d in perpetuity $f ReCAP$f Italian Language Imprints Collaborative Collection $5 NjP $u http://arks.princeton.edu/ark:/88435/dcxg94j1575 $8 22746776150006421

Sample output:

Action note(s): Vol. 1: Committed to retain in perpetuity -- ReCAP Italian Language Imprints Collaborative Collection (NjP)

Implementation notes

see comment https://github.com/pulibrary/bibdata/issues/2077#issuecomment-1443759094

Acceptance criteria

Notes

See https://github.com/pulibrary/orangelight/issues/3478 for Orangelight display

mzelesky commented 1 year ago

To be conservative in rolling this out for PUL records, you could make a filter to only display the 583 if there is a $8 in the field to identify it as coming from a holding. There was some concern before about showing 583 fields in records. Currently, the 583 is only shown if it is a PULFA record. But for partner records from SCSB, we will not have such ability to filter.

mzelesky commented 1 year ago

Sample record in the sandbox is 99126831126106421.

mzelesky commented 1 year ago

I updated the publishing profile DACS Test Record Export in the sandbox to include the 583s from holdings and the item retention info.

The Committed to Retain flag will be in 876$w. The Retention Reason will be in 876$x.

maxkadel commented 1 year ago

Right now we record PULFA notes both when the first indicator is null (meaning privacy is not indicated), or if the first indicator is 1 (meaning the the record is public).

If we're expanding the notes we're publishing to all Princeton notes, should we only publish the ones that have been explicitly marked as public?

mzelesky commented 1 year ago

I think what I would want to do is to look at the PULFA records and see how many of them have blank indicators in 583 fields. Due to all the PULFA records loading every day, I could create a 'normalization rule' that changes the indicator to 1 if it's blank, and that would likely update all the records with blank indicators. @regineheberlein Would it be appropriate for the PULFA records to have the first indicator of the 583 field to be changed to a 1 if it is blank?

I would think having one rule for the action notes would be better than doing one thing for PULFA records and another for everything else.

regineheberlein commented 1 year ago

This will not affect records produced by the daily aspace2alma process, as aspace2alma explicitly skips the 583s.

It was requested in https://github.com/pulibrary/aspace_helpers/issues/205 and is implemented on https://github.com/pulibrary/aspace_helpers/blob/main/reports/aspace2alma/get_MARCxml.rb#L204.

maxkadel commented 1 year ago

@mzelesky Would it be possible to get a couple more examples? I'd especially like an example with a repeated 583 (since I believe it is repeatable), and another example of the somewhat more complex 583 (most of the examples in the sandbox seem to only have subfield a)

maxkadel commented 1 year ago

@mzelesky Also, do we really want the double dash, or should it be an em dash, since it's not being used as a delimeter?

mzelesky commented 1 year ago

There are likely not many more examples with the more complex 583 (most of the plans have not yet gone into effect), but I will look. I will also look for multiple 583s. Any other use cases?

As for the em dash, yes, I tried to represent the em dash as two small dashes. Thank you for confirming.

mzelesky commented 1 year ago

I will not be able to provide examples until tomorrow, most likely, since it requires creating a full dump with the 583 fields from holdings merged into the bibs. But I will run a search once the publishing job finishes.

maxkadel commented 1 year ago

@mzelesky - there should already be that file on the file server, but I wasn't able to find good examples (but I was just doing string searches)

mzelesky commented 1 year ago

There are no files with the 583s merged from the holdings that I'm aware of. The Incremental and General Publishing jobs do not currently include them.

maxkadel commented 1 year ago

@mzelesky Look on lib-sftp.princeton.edu/alma/sandbox/DACS_test_records_24427547550006421_new.xml.tar.gz - I ran the DACS Test Record Export with the records with 583 set yesterday (as well as that single record) - but maybe it's missing something?

mzelesky commented 1 year ago

Ah, I didn't see that. But that set (583_test_records) only had 1 record. I'm going to be running over a full dump.

maxkadel commented 1 year ago

Ah, sorry, yeah, looks like the file I was thinking of was the one from the 24th. But carry on!