UCSCLibrary / ucsc-library-digital-collections

A rails app based on Hyrax to be used as a repository for UCSC library digital collections.
1 stars 2 forks source link

(2) resourceType value displays as URI #570

Closed rmjaffe closed 1 year ago

rmjaffe commented 1 year ago

Describe the bug

In the QA of the aerials collection, it was observed that the URI supplied for resourceType is displaying instead of the label.

Screenshots

Screen Shot 2023-02-15 at 12 33 21 PM

Type displays as: http://purl.org/dc/dcmitype/Image Type should display as: Image

Acceptance criteria

Done means:

Related work

418

rschwab commented 1 year ago

Note that the fix in the PR above does not fix existing labels. There are two ways for doing that: 1) Round tripping the works that have purl.org labels for resource Type 2) Deleting from ld_buffers database table all the records with label like '%purl%', then re-indexing or re-saving the works.

rmjaffe commented 1 year ago

@rschwab Perhaps is Monday's standup can you walk me through what option #2 entails? Option #1 would basically involve round tripping everything in the DAMS.

rschwab commented 1 year ago

Both methods involve updating all the records that have an incorrect label, ie instead of "Image" displaying to users its displaying "http://purl.org/dc/dcmitype/Image".

In production and staging the incorrect labels aren't in the database. I'm pretty certain this was introduced in code only during the past few months when nothing was ingested into production or staging.

It's likely we don't need to fix the broken labels, as they are only in sandbox.

rschwab commented 1 year ago

This needs more work. This test work does not display the type appropriately, though the ID looks correct. This other test work created labels just fine.

It seems as if local authorities are not working in some circumstances. This PR attempted to solve a slightly different issue, but may be related to this problem.

Here is an example URL for viewing all terms in a local vocab: http://digitalcollections-staging-sandbox.library.ucsc.edu/authorities/terms/local/dcmi_types

Other notes I took regarding all the existing local vocabs on sandbox:

"licenses"      not used in metadata.yml, legacy type
"resource_types"    not used in metadata.yml, legacy type
"rights_statements" not used in metadata.yml, legacy type
"dcmi_types"        empty in sandbox, weird id's in prod
"agents"        works
"places"        works
"time_periods"      empty in sandbox, 2 tests in prod
"topics"        works? (not currently used in metadata.yml)
"formats"       works?
"genres"        empty on prod, tests in sandbox

legacy:  ie: {id: "Article", label: "Article", active: true}

The Questioning Authority wiki might be helpful for resolving: https://github.com/samvera/questioning_authority/wiki/Creating-custom-controlled-vocabularies

rmjaffe commented 1 year ago

@rschwab I'm thinking that this, like the dates, merits a fuller conversation. Getting and understanding of how the local vocabularies work, are arranged and how they might be managed by non-developers(or not) has long been of interest. So many of these decisions were Ned-led and implemented without consultation. Thank you so much for surfacing these black box issues are they crop up. I'm grateful that you're willing to walk me and others through what is going on, have a conversation, and to make shared decisions about these things.

rschwab commented 1 year ago

@rmjaffe this is ready for sandbox QA.

rmjaffe commented 1 year ago

@rschwab Just loaded a [small test set ](http://digitalcollections-staging-sandbox.library.ucsc.edu/collections/sb3978902?locale=en in sandbox with the following resourceType values: http://purl.org/dc/dcmitype/Collection http://purl.org/dc/dcmitype/Text http://purl.org/dc/dcmitype/Image http://purl.org/dc/dcmitype/MovingImage http://purl.org/dc/dcmitype/Sound http://purl.org/dc/dcmitype/StillImage

None of the URIs are displaying; all the records display the appropriate labels.

Followed up by roundtripping the test set with labels vs. URLs as values in resourceTypes: Those are displaying nicely too. I think this is ready for production.

rmjaffe commented 1 year ago

This looks good in production too.