curationexperts / mahonia

Oregon Health & Science Repository
Apache License 2.0
6 stars 0 forks source link

ETD: Thumbnail and Representative should not change when I attach new files #99

Closed mark-dce closed 6 years ago

mark-dce commented 7 years ago

STORY As a curator, I do not want the thumbnail or representative of a work to change when I attach additional files, so that my explicit choices about representatives & thumbnails are persistent until I explicitly change them.

ACCEPTANCE

EXAMPLES 1) A new ETD is created and the user uploads a single JPEG with it. The JPEG should be set as the thumbnail and remain that way even if the user later attaches a PDF 2) A new ETD is created and the user selects a Spreadsheet, a PDF, and another PDF, in that order and uploader them, then the thumbnail should be the first page of the spreadsheet 3) A new ETD is created and the selects PDF4, PDFA, and PDFB in that order, then PDF4 should be the thumbnail and representative media

no-reply commented 7 years ago

Supercedes #86

jenlindner commented 6 years ago

I'm not sure how to test that the thumbnail is the first page of the spreadsheet, but I have a PR almost ready to go that might suffice for the rest, and would love a review to find out if does. It tests adding a pdf to a work with a jpg , and creating a work with an xlsx and two pdfs, and that the representative media settings are preserved in both cases.

mark-dce commented 6 years ago

I don't think we need to test the first page of the spreadsheet - that was me basically saying we should do a quick check that we're not passing any funky parameters to ImageMagick. I think the test is just that the spreadsheet is the thing used to generate the thumbnail - the "first sheet" part of the requirement is overkill.