pulibrary / orangelight

PUL Blacklight Project (Ruby 3.1.0, Rails 7.1.4)
21 stars 7 forks source link

Trigger Figgy's harmful content warning display automatically via record metadata #3560

Closed tpendragon closed 1 year ago

tpendragon commented 1 year ago

User story

As a cataloguer I want to identify records which have harmful content and display a pop-up in the viewer to warn our patrons about what they might see.

Acceptance criteria

Concrete example

This is the MARC equivalent of https://findingaids.princeton.edu/catalog/C1372_c47202-68234

Implementation notes, if any

When importing metadata records, Figgy looks for a key in the jSON-LD that is "content_warning", and if found automatically marks the viewer to display that content. An example:

https://findingaids.princeton.edu/catalog/C1372_c47202-68234.json

According to some prior discussion, this field would get pulled from 520 first indicator 4. We need to map this value into the "content_warning" field we expose.

Relevant Tickets

https://github.com/pulibrary/figgy/issues/5090

mzelesky commented 1 year ago

Here are 6 records with 520 fields with a first indicator of 4. 9990795563506421 99125167742806421 99125167742406421 99125167741906421 99125167726506421 99125167672406421

kevinreiss commented 1 year ago

@escowles will follow-up with Jennifer for more details on the conventions catalogers will follow for creating these notes.

escowles commented 1 year ago

Thanks for finding examples @mzelesky — I took a look at those, and the 520 notes are all more general summary notes than harmful content warnings. Here are links for easy review:

https://catalog.princeton.edu/catalog/9990795563506421/staff_view https://catalog.princeton.edu/catalog/99125167742806421/staff_view https://catalog.princeton.edu/catalog/99125167742406421/staff_view https://catalog.princeton.edu/catalog/99125167741906421/staff_view https://catalog.princeton.edu/catalog/99125167726506421/staff_view https://catalog.princeton.edu/catalog/99125167672406421/staff_view

So I think the key question for DSSG is: How would we like to unambiguously identify our harmful content notes? We could include the URL of the harmful content statement in $u, and/or we could include NjP in $c.

jbaxmeyer commented 1 year ago

How many records are in Alma already that use first indicator 4?

We should first see what is recorded in these fields in Alma and clean up the indicators accordingly because as Esmé noted above, those examples are not properly coded.

Are we able to use the first indicator values of the 520 fields to generate the labels in Blacklight, so that instead of the generic "Summary" label we could display "Content warning"?

I think if we use the combination of 1st indicator 4 + $u with the link to the statement + $c NjP we should be able to identify those records unambiguously and eliminate any randomly miscoded fields.

mzelesky commented 1 year ago

Would DSSG only want the 520 1st indicator 4 fields to show on PUL records, or also on SCSB records?

Here is a report of all 520|4 fields: https://docs.google.com/spreadsheets/d/1X5-slibmZU0s7aqnVpYNjS0RUh9S-KozMF2Vhn-Z32U/edit?usp=sharing

jbaxmeyer commented 1 year ago

I'm happy to see that most of the records with 520 4_ are coded correctly!

escowles commented 1 year ago

DSSG discussed this and decided:

escowles commented 1 year ago

After further review, Jennifer reported that there were not any PUL-added content warnings in Alma. She will consult with ADAPT on this and CaMS will establish guidelines for when they would add (initial discussion leaned towards adding them when users report issues, not doing it proactively).

I'm closing this ticket because we don't have this situation currently. We can reopen or make a new ticket when we have examples to work from.