Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valkyrie: Collection Metadata issues on existing collections #777

Open
4 of 10 tasks
Tracked by #768
KatharineV opened this issue Aug 27, 2024 · 10 comments
Open
4 of 10 tasks
Tracked by #768

Valkyrie: Collection Metadata issues on existing collections #777

KatharineV opened this issue Aug 27, 2024 · 10 comments
Assignees
Labels
M1 Milestone 1 Valkyrie

Comments

@KatharineV
Copy link
Collaborator

KatharineV commented Aug 27, 2024

Summary

DEV NOTE: Adding properties are done via yaml files now. You will not need to adjust models. Ping a dev on Team V for guidance.

This ticket tracks issues with existing collections as they appear post-Valkyrie and version 6.

  • Collections now require a Rights statement, and we can't have this be a required field for collections. We do need it to remain required for works, as we've had it established in production up to this point, but it can't apply to collections because in most cases we have collections with multiple rights statuses. Post-upgrade collection pages require copyright to be selected. Prior to the Valkyrie sprint, we only required Title on collections. The way we use collections to group periodical issues that span pre and post public domain makes it impossible to apply a single copyright statement to most of the collections in our repository, so we need the ability to make that field NOT required in collections, even though we have it required on work types (and I know we can modify this via dashboard settings).

  • It looks like a metadata field from previous versions of Hyku has not made it into version 6 collections. This is the "Department, School, or Faculty" field. We used this field in most of our collections in Hyku, and we do not want to lose this metadata when we upgrade to version 6. Can you map this field in our existing version 5 collections to the newly added Source field that is available in version 6 collections? The Source field wasn't present in collections before so I don't expect any issues if we map to Source.

Acceptance Criteria

  • Rights statement should not be a required field for Collections
  • Add Department, School or Faculty property to Collection
    • map this field in our existing version 5 collections to the newly added Source field that is available in version 6 collections
    • We mapped it to the department field (like prod does) otherwise converting the works would be at risk of losing data
  • In general, the Collection form's metadata and required fields should match what is seen in Prod

Screenshots or Video

Staging (rights statement should not be required)

Image

Department, School, or Faculty field

Example of a production collection that uses that field:
https://adl.b2.adventistdigitallibrary.org/collections/0ed83a24-3553-48bf-8216-eca875cbc48b?

Image

Screenshot of Source field in version 6 post-Valkyrie staging collection:
https://adl.s2.adventistdigitallibrary.org/dashboard/collections/9c5feb14-7c90-499f-aa4e-ea5cf40baf2d

Image

Testing Instructions

  • Newly created collection should fulfill all acceptance criteria
  • Collection can be edited

Additionally, metadata was also modified to fix work models so:

  • All work types should be able to be created & modified

Notes

@KatharineV should create a new ticket for metadata changes based on comment regarding metadata on forms & show page. Ticket passes and this issue is complete as long as the above tests are satisfied.

@KatharineV KatharineV converted this from a draft issue Aug 27, 2024
@ShanaLMoore ShanaLMoore added the M1 Milestone 1 label Sep 3, 2024
@ShanaLMoore ShanaLMoore changed the title Valkyrie: Existing collections Valkyrie: Collection Metadata issues on existing collections Sep 4, 2024
@AKFosterDev
Copy link

AKFosterDev commented Sep 6, 2024

Files:
config/metadata/collection_resource.yaml
hyrax-webapp/app/models/collection_resource.rb config/metadata/collection_resource.yaml
config/metadata/basic_metadata.yaml

Need pairing time. LaRita

@AKFosterDev AKFosterDev self-assigned this Sep 6, 2024
@AKFosterDev AKFosterDev removed their assignment Sep 6, 2024
@ShanaLMoore ShanaLMoore self-assigned this Sep 11, 2024
@ShanaLMoore ShanaLMoore moved this from Ready for Development to In Development in Adventist Knapsack Sep 11, 2024
ShanaLMoore pushed a commit that referenced this issue Sep 11, 2024
This change moves basic_metadata into collect_resource.yaml to allow for customizations.

Issue:
- #777
@ShanaLMoore ShanaLMoore moved this from In Development to Code Review in Adventist Knapsack Sep 11, 2024
ShanaLMoore pushed a commit that referenced this issue Sep 12, 2024
# Story

In production, only the title is required for Collection but in staging
(valkyrie) rights_statement was also being required.

This change required other work types to be updated as well. For the
works, this PR moved basic_metadata properties into adl_metadata.yml,
which is a schema included in all of the custom work types. Since all
the work types share the same properties, they're able to share
adl_metadata with this adjustment.

For the collection, basic_metadata was moved into
collection_resource.yml in order to make the customization to not
require the rights_statement. (thanks for the suggestion @laritakr)

Image and GenericWork are unique though; they don't use adl_metadata.
basic_metadata was moved to their respective metadata yaml files as
well.

This PR also fixes an issue where labels were not right. The knapsack's
locale files were not taking precedence over hyku's, thus labeling the
Author form fields as Creator.

Additionally, I compared each work form to production to expose
additional primary terms where desired. Now, besides the order of the
terms (which I'd argue could be a separate ticket driven by the client),
the form has feature parity with production.

Refs

- #777

# Screenshots / Video

<details>
<summary>Collection form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/b9ea44e2-641d-4fed-8665-7464ecb9ef61)


# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/32198e87-4046-4b26-8a73-0ee9edb91841)


# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/89f420cb-5161-4735-8090-5357de89b8a3)


</details>

<details>
<summary>Generic Work form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/de354583-edea-4423-a5a0-bcbf396ecf64)


# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/6d0a8356-21a9-4c51-9dc1-e86917df87d2)



# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/67ebcd42-8ed4-4a3e-908a-acdf192044eb)


</details>

<details>
<summary>Image form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/ad7b057d-bde8-4112-a456-3bf12438497e)


# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/690763a1-19cd-431e-b0a3-59e4fc81d65f)



# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/30040aab-ae39-452d-b1cf-f03009ea38e4)

</details>

<details>
<summary>Conference Item form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/d6455eb8-33e6-40ed-8721-edfddc596237)


# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/3ccc7f13-89c9-4c5a-82d9-5f2a5c4775b2)


# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/90e3602b-ecaa-41eb-b5ec-9472d73c7840)


</details>

<details>
<summary>Dataset form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/fbbd6b99-203f-4fbb-8597-b4347fc0389c)


# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/1a15c80c-56d2-4de2-b169-2f0811e8dc92)


# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/f350ad49-294e-492e-82e3-4e8b9ffd4395)


</details>

<details>
<summary>Exam Paper form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/b2d40b4d-21db-4e9e-a77e-ba2eb84ea192)

# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/6df4369f-5e6d-4ba1-b8c3-8705ad6462d5)

# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/0c08f611-1a22-4d77-b89f-2f553191eab3)

</details>

<details>
<summary>Journal Article form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/36178ca6-3094-4f44-8bd3-4d799153c1e8)



# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/c9d49d17-ae6c-4cff-9211-41d3fffdcc3d)



# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/91602198-5183-4029-9048-ead9481744b4)



</details>

<details>
<summary>Published Work form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/baff0a8c-fec5-4109-a97e-2a1f6844c086)


# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/ad461c36-4d92-4d4b-8392-ac1335bc81a0)


# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/763176d3-c223-42ba-9e66-4c1ecac46592)


</details>

<details>
<summary>Thesis form</summary>

## PRODUCTION

![image](https://github.com/user-attachments/assets/9e8ce861-0140-463a-a34a-9fd53d522f11)


# Expected Behavior Before Changes

![image](https://github.com/user-attachments/assets/6f88373e-d1c8-468d-8c11-c93b6a0329a6)


# Expected Behavior After Changes

![image](https://github.com/user-attachments/assets/ebdaa09b-bd0d-4800-9821-930da40d5128)


</details>

# Notes
@ShanaLMoore ShanaLMoore moved this from Code Review to Deploy to Staging in Adventist Knapsack Sep 12, 2024
@jillpe jillpe moved this from Deploy to Staging to SoftServ QA in Adventist Knapsack Sep 16, 2024
@ShanaLMoore
Copy link

ShanaLMoore commented Sep 17, 2024

QA RESULTS: ❌ NEEDS REWORK

tested on STAGING

Acceptance Criteria

  • Rights statement should not be a required field for Collections ✅
  • Add Department, School or Faculty property to Collection ❌ this field is missing
    • map this field in our existing version 5 collections to the newly added Source field that is available in version 6 collections
  • In general, the Collection form's metadata and required fields should match what is seen in Prod

PROD

Required fields:

Image

STAGING

Required fields:

Image

@ShanaLMoore ShanaLMoore added the needs rework issue needs additional work label Sep 17, 2024
@ShanaLMoore ShanaLMoore moved this from SoftServ QA to Ready for Development in Adventist Knapsack Sep 17, 2024
@ShanaLMoore
Copy link

ShanaLMoore commented Sep 18, 2024

TODO:

make sure collection_resource.yaml contains all of these metadata properties:

["aark_id", "abstract", "access_control_id", "access_right", "alt", "alternative_title", "altlabel", "based_near", "bibliographic_citation", "collection_type_gid", "contributor", "creator", "date", "date_accepted", "date_available", "date_created", "date_issued", "date_modified", "date_published", "date_submitted", "date_uploaded", "department", "depositor", "description", "doi", "former_identifier", "funder", "head", "identifier", "import_url", "issue_number", "keyword", "label", "language", "language_code", "lat", "license", "location", "long", "managing_organisation", "note", "official_url", "orcid", "output_of", "output_of_resource_ids", "pagination", "part_of", "place_of_publication", "preflabel", "publication_status", "publisher", "rdfs_label", "refereed", "related_url", "relative_path", "remote_url", "representative_id", "resource_type", "rights_description", "rights_holder", "rights_notes", "rights_statement", "slug", "slug_for_upgrade", "source", "subject", "tail", "thumbnail_id", "title", "volume_number"] => count: 70

We need to for sure at least add department and map the label name to "Department, Faculty, School". Add AdlMetadata back to collection resource however we need to make rights_statement false for collection resource.

OR

should we add to the script? copy department to source, if department is no longer a needed metadata field?

ShanaLMoore pushed a commit to samvera/hyku that referenced this issue Sep 18, 2024
- updates styling to make labels bold in the collection form
- updates locale helper method to account for collection resources

Issue:
- notch8/adventist_knapsack#777
ShanaLMoore pushed a commit that referenced this issue Sep 18, 2024
Issue:
- #777

- Adds department property to CollectionResource
- Adds a locale label for department.

TODO: update submodule
@ShanaLMoore ShanaLMoore moved this from Ready for Development to Code Review in Adventist Knapsack Sep 18, 2024
@ShanaLMoore ShanaLMoore removed the needs rework issue needs additional work label Sep 19, 2024
ShanaLMoore pushed a commit that referenced this issue Sep 19, 2024
Issue:
- #777

- Adds department property to CollectionResource
- Adds a locale label for department.

# TODO: 
- [x] update submodule

# Acceptance Criteria

- [x] Rights statement should not be a required field for Collections
- [x] Add Department, School or Faculty property to Collection
- [x] In general, the Collection form's metadata and required fields
should match what is seen in
[Prod](https://adl.b2.adventistdigitallibrary.org/dashboard/collections/new?locale=en&collection_type_id=1)


![image](https://github.com/user-attachments/assets/216e1433-aead-43ec-a5f0-5c87cf11283c)


![image](https://github.com/user-attachments/assets/67bf2adb-a294-42e2-be31-1fc0913c5e9a)
@ShanaLMoore ShanaLMoore moved this from Code Review to Deploy to Staging in Adventist Knapsack Sep 19, 2024
@ShanaLMoore ShanaLMoore moved this from Deploy to Staging to SoftServ QA in Adventist Knapsack Sep 20, 2024
@sjproctor
Copy link
Contributor

sjproctor commented Sep 20, 2024

✅ Passes QA

Tested on staging

Acceptance Criteria

  • Rights statement should not be a required field for Collections
    Image
  • Add Department, School or Faculty property to Collection
    Image
  • In general, the Collection form's metadata and required fields should match what is seen in Prod
    • NOTE: all fields on prod appear in staging with the addition of the following fields on staging:
      • Orcid
      • Peer reviewed?
      • Remote URL
      • Rights Holder
      • Rights description
      • Preflabel
      • Altlabel
      • Volume
      • Access Rights
      • Alternative Title
      • Arkivo checksum
      • Bibliographic citation
      • Label
      • Rights notes
      • Rights statement
      • Source
      • Owner
      • On behalf of
      • State
      • Depositor

@sjproctor sjproctor moved this from SoftServ QA to Client QA in Adventist Knapsack Sep 20, 2024
@KatharineV
Copy link
Collaborator Author

I created a new collection and tested the metadata. https://adl.s2.adventistdigitallibrary.org/collections/851b4393-f9d1-4fa1-b1d9-31bf589c8fff?locale=en

I filled in a few fields that did not display on the public view after I saved:

  • Rights Statement (with dropdown options)
  • Source

Then I tried to fill in ever field to test all appearances, and I got an error message. I reopened the edit screen, tried to save again, and the error message repeated.
Image

Now the backend shows metadata in all the fields just as I entered it, but only the ones I filled the first time are showing on the public side, minus the two that never showed the first time (Rights Statement & Source).

Image

@ShanaLMoore ShanaLMoore added the needs rework issue needs additional work label Sep 25, 2024
@ShanaLMoore ShanaLMoore moved this from Client QA to Ready for Development in Adventist Knapsack Sep 25, 2024
@ShanaLMoore ShanaLMoore moved this from Ready for Development to In Development in Adventist Knapsack Sep 25, 2024
@ShanaLMoore ShanaLMoore assigned laritakr and unassigned ShanaLMoore Sep 25, 2024
@ShanaLMoore
Copy link

ShanaLMoore commented Sep 25, 2024

Staging logs/error from Katharine's comment:

2024-09-25T22:39:58.658842776Z Error: ERROR: [doc=851b4393-f9d1-4fa1-b1d9-31bf589c8fff] Error adding field 'issue_number_isim'='Issue' msg=For input string: "Issue"

this may be related to #822 , PR

TODO:

revert this change?

@ShanaLMoore ShanaLMoore added blocked other work must be completed first and removed needs rework issue needs additional work labels Sep 26, 2024
@ShanaLMoore
Copy link

blocked until #822 is resolved

@ShanaLMoore ShanaLMoore moved this from In Development to Client QA in Adventist Knapsack Sep 26, 2024
@ShanaLMoore ShanaLMoore moved this from Client QA to SoftServ QA in Adventist Knapsack Sep 26, 2024
@laritakr laritakr moved this from SoftServ QA to In Development in Adventist Knapsack Sep 26, 2024
@laritakr
Copy link
Contributor

Metadata spreadsheet link… https://docs.google.com/spreadsheets/d/1Xc-QRpCEw0vNwcK6yxvBlTR6uEH-xrPWxTatRWCJ070/edit?usp=sharing

I went through all of the create forms to identify what I was seeing in my development environment, alphabetized them by their form label text, and added their attribute since some weren’t clear by the label. For each one, I then marked what shows in the prod environment create forms (I did not document what is on the show page). Hopefully this spreadsheet gives you the information you need to make the decisions on what you want on the forms and show pages. Please review it and let me know what you want changed.

Based on what I found, I did some minimal cleanup to try to bring things back to being in synch (such as moving the dates back to only allowing single dates). I can’t say which ones you will want to be on your forms, or showing on the show pages. Some of the terms may have been hidden before, and some are totally new due to the Hyrax updates.

Additionally, keep in mind that if you don’t add a metadata item to a work, it won’t appear on the show page. So there is no need to remove items that are removed from the form unless you think they could come in via bulkrax imports and you don't want them showing.

laritakr added a commit that referenced this issue Sep 30, 2024
# Story

Metadata yaml files were audited and edited to:
- Change dates to be single rather than multiple
- Add multiple: false on form when term is not multiple... form defaults
to multiple and term defaults to singular.
- Remove unnecessary state & arkivo_checksum
- remove dc_access_rights, which shares the same predicate in fedora
with access_rights. (the shared predicate means they do the same thing,
and the term is not accessed except in indexing.)

Refs

- #777
- #822

# Expected Behavior Before Changes

Many works types could be created but not edited.
Metadata single or multiple on form did not match production.

# Expected Behavior After Changes

- All work types and collection can be created.
- All work types and collection can be edited.
- All fields [with the exception of based_near location
dropdown](#212)
can be used.

# Screenshots / Video

<details>
<summary></summary>

**All work types and collection were tested, and can be both created and
edited.**

![Screenshot 2024-09-30 at 4 09
38 PM](https://github.com/user-attachments/assets/69cd75bc-7323-48e6-9a16-a17b6f6eab56)

</details>

# Notes

OER and ETD do not currently work. These come in via Hyku and are not
used in Adventist, so they have not been adequately set up. At this
point, they should be deactivated in all tenants to avoid any potential
issues.
@laritakr laritakr removed the blocked other work must be completed first label Sep 30, 2024
@ShanaLMoore ShanaLMoore moved this from In Development to SoftServ QA in Adventist Knapsack Oct 1, 2024
@kirkkwang
Copy link
Contributor

kirkkwang commented Oct 18, 2024

QA PASS

I was able to create and edit a collection (without based_near which is a known issue in a separate ticket)
Image

@kirkkwang kirkkwang moved this from SoftServ QA to Client QA in Adventist Knapsack Oct 18, 2024
@KatharineV
Copy link
Collaborator Author

I created a new collection, and the metadata fields show as expected.
https://testing.s2.adventistdigitallibrary.org/collections/1341148d-5ec5-49d0-a6ad-4d64c3cd2bd9?locale=en

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M1 Milestone 1 Valkyrie
Projects
Status: Deploy to Production
Development

No branches or pull requests

7 participants