Islandora-Devops / islandora-starter-site

A Drupal site demonstrating Islandora features. Use it as a starting point for customization.
https://sandbox.islandora.ca
GNU General Public License v2.0
3 stars 17 forks source link

Add separate Publisher field. #138

Closed rosiel closed 6 months ago

rosiel commented 6 months ago

Issue #137

This PR should create a new field for Publisher, as requested by the metadata Interest Group.

To test: Spin up a fresh site with this set of configs.

Please add a comment if there are places I've forgotten!

rosiel commented 6 months ago

It occurs to me that Citation Select is a place I did forget, where we could* set this. However, Citation Select only lets us map one field, for all content, to (csl) publisher. Right now it's using Linked Agent but we could switch it over, resulting in nodes that use Contributors (Linked Agent) for publisher not having a publisher in the citation.

rosiel commented 6 months ago

discussed in the tech call. Decided to go all-in on the Publisher field, and remove relators:pbl from the Contributors field.

rosiel commented 6 months ago

I've gone "all in" on publisher. I removed it from the linked agent options.

I also added and placed a facet, both to the main and the collection search views.

I also configured it as an option in the "fielded search" dropdown, since it's fulltext.

joecorall commented 6 months ago

This is a great change! e.g. our Contributor facet was getting pretty heavily weighted by publishers. Now that publishers are their own field/facet the search/browse is much better!

I haven't full tested this PR (I just made the changes manually), but did write a script to move the publisher linked agents to the new field_publisher storage for existing sites: https://github.com/lehigh-university-libraries/lehigh_islandora/commit/cbd30e5120ebf28bda605fc79a72a1158115e791

alxp commented 6 months ago

Tested by spinning up[ a new ISLE-DC and replacing the Git URL in the make starter_dev command.

The field is in the node add form, and there's a helpful note under the contributors widget to add publisher to its own field.

JSON-LD has the field as expected:

{"@graph":[{"@id":"https:\/\/islandora.traefik.me\/node\/1","@type":["http:\/\/pcdm.org\/models#Object","https:\/\/schema.org\/Book"],"http:\/\/schema.org\/author":[{"@id":"https:\/\/islandora.traefik.me\/user\/1"}],"http:\/\/purl.org\/dc\/terms\/title":[{"@value":"Test object with  publisher field","@language":"en"}],"http:\/\/schema.org\/dateCreated":[{"@value":"2024-04-02T22:27:25+00:00","@type":"http:\/\/www.w3.org\/2001\/XMLSchema#dateTime"}],"http:\/\/schema.org\/dateModified":[{"@value":"2024-04-02T22:27:25+00:00","@type":"http:\/\/www.w3.org\/2001\/XMLSchema#dateTime"}],"http:\/\/purl.org\/dc\/elements\/1.1\/publisher":[{"@value":"Words on Paper","@type":"http:\/\/www.w3.org\/2001\/XMLSchema#string"}],"http:\/\/schema.org\/sameAs":[{"@id":"https:\/\/islandora.traefik.me\/node\/1"}]},{"@id":"https:\/\/islandora.traefik.me\/user\/1","@type":["http:\/\/schema.org\/Person"]}]}

It's indexed in Solr

image

It shows up as a citation:

Test Object With Publisher Field. Words on Paper.

Review all citations for accuracy.

rosiel commented 6 months ago

@joecorall this is hot on the heels of another pull request that lets you exclude/include relators from a facet. So double fix!

I too wrote a script and made a video about it. I'll link them all from the release notes.