scientist-softserv / atla-hyku

Other
0 stars 0 forks source link

Controlled Vocabularies - Format #27

Open summer-cook opened 1 year ago

summer-cook commented 1 year ago

Summary

Set up for Atla Hyku format field controlled vocabulary - add to all 3 work types & set up like the DL

Related

EPIC: #8

Acceptance Criteria

Testing Instructions

Create a work for each worktype.

Generic

ETD

Paper or Report

Notes

labradford commented 1 year ago

It's kind of weird how format has duplicate "PDF" selected on the multiple fields

labradford commented 1 year ago

This will be ready for QA once ETD is merged and deployed to staging

DiemBTran commented 1 year ago

This passes SoftServ QA: See attached screenshots.

tested on:

Formats can be selected from a dropdown menu on the new work form ![Generic Work generic work - controlled vocab - format ID d0f7e924-df1e-4a12-8488-a61a8ffba079 Hyku 2023-05-10 at 5 58 50 PM (1)](https://github.com/scientist-softserv/atla-hyku/assets/29311858/1262f8fe-49eb-4193-9bf6-e381a147e82e) ![Etd etd - controlled vocab - format ID 3ffda985-b640-4756-b849-d54820beff44 Hyku 2023-05-10 at 5 58 39 PM (1)](https://github.com/scientist-softserv/atla-hyku/assets/29311858/4cf2766c-9a5f-4ad9-8038-bd1f681f056b) ![Paper Or Report paper or report - controlled vocab - format ID cafd5908-218a-4d58-a40f-2c20890c39d6 Hyku 2023-05-10 at 5 55 52 PM (1)](https://github.com/scientist-softserv/atla-hyku/assets/29311858/5f7884da-f292-4a61-aa89-9a9940f59518)
ckarpinski commented 1 year ago
ckarpinski commented 1 year ago

do you know what MPEG would be used for if not MP4 or MP3?

ckarpinski commented 1 year ago

This is how the field is set up on the DL and how we want it here - https://docs.google.com/document/d/1Ubn7DHb5Ay33zlHR-tE07T8WUF-q4s4PJf2xtswTrWc/edit

It shows all the variations that can be input into the field, but all should show on the front end as just PDF, JPG etc.

We have a drop down for when someone adds a work manually, but ideally for the CSV import it would be the same as the DL where you could have any variation and it be correct.

ckarpinski commented 1 year ago

Curiously right now i tried to do a CSV import with the format set to URL and it failed. This is in the drop down list so I have no clue what the system is expecting for this value since our dropdown only shows the URL bit.

summer-cook commented 1 year ago

I just made the necessary changes for this:

this field should now behave the same way as in the DL for imports and for elsewhere in the app.

summer-cook commented 1 year ago

Softserv QA

Format can be entered in the work edit page, it does not have pdf as a default and instead has a blank option ![Image](https://github.com/scientist-softserv/atla-hyku/assets/73361970/3664d962-7cb9-4446-9134-f06cd9de2567)
when saved in the UI it shows up correctly ![Image](https://github.com/scientist-softserv/atla-hyku/assets/73361970/5b599e14-6ff4-45cc-aa3f-907f8845add3)
formats are alphabetized in the form, MOV is added & duplicates are hidden ![Image](https://github.com/scientist-softserv/atla-hyku/assets/73361970/aaa672a6-a7b3-44fc-9e93-0a04d43817e7)
ckarpinski commented 1 year ago

Question - if someone were to input application/pdf or vary the capitalization in a CSV import - will it work? So all variation from that google doc if put into the CSV would out put on the work show page as PDF or whatever?

summer-cook commented 1 year ago

@ckarpinski I just tested it locally, the import worked for me when i put application/pdf in the format field. Heres a screenshot of the work show page, and the csv i used

Image

format-test.csv

ckarpinski commented 1 year ago

Our expectation on this field was that it would be set up similar to how the Digital Library is set up. This google doc is the list we shared https://docs.google.com/document/d/1Ubn7DHb5Ay33zlHR-tE07T8WUF-q4s4PJf2xtswTrWc/edit

An example: application/pdf, pdf, PDF - all show as PDF

That means if any of those 3 values are input, the work show page will show PDF. To me this means the CSV should be able to accept those variations

an acceptable alternative would be if it can accept either PDF or pdf

BUT if you look through that list there are others that have more variation like image/jpeg, image/jpg, jpeg, jpg, JPEG, JPG - all show as JPEG - for that it would be acceptable to have it accept jpet, jpg, JPEG, JPG

etc.

summer-cook commented 1 year ago

@ckarpinski this has been changed to be set up like you mentioned above.

You should now be able to import formats that match any of the "alts" from this file: https://github.com/scientist-softserv/atla-hyku/blob/main/config/authorities/formats.yml