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

SYS-1637: Remove master file URLs from OAI feed #134

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

akohler
Copy link
Member

@akohler akohler commented Jun 12, 2024

Implements SYS-1637. Bumps version to v1.1.11 for deployment.

This PR fixes a bug which allowed URLs for master files to be included in the OAI feed. These files are accessible only via the staff UI, so including URLs for them is not appropriate for OAI content or the public site.

The fix makes relevant methods in the OralHistoryMods class more specific, so only file URLs for submasters are included in the OAI feed's MODs records. A new test is added which confirms master file URLs are not included.

Testing

Confirm all 112 tests pass. No need for more specific testing.

Locally, I grabbed before and after versions of 2 records and compared them:

$ diff zz002kppdz_before.xml zz002kppdz_after.xml
3c3
<   <responseDate>2024-06-12T12:34:03Z</responseDate>
---
>   <responseDate>2024-06-12T12:49:14Z</responseDate>
67,69d66
<               <mods:url usage="timed log">/media/oh_masters/text/masters/21198-zz002kppg0-3-master.xml</mods:url>
<             </mods:location>
<             <mods:location>
72,74d68
<             <mods:location>
<               <mods:url usage="timed log">/media/oh_masters/text/masters/21198-zz002kppg0-4-master.xml</mods:url>
<             </mods:location>
84,86d77
<               <mods:url usage="timed log">/media/oh_masters/text/masters/21198-zz002kpphh-2-master.xml</mods:url>
<             </mods:location>
<             <mods:location>
98,100d88
<               <mods:url usage="timed log">/media/oh_masters/text/masters/21198-zz002kppj1-2-master.xml</mods:url>
<             </mods:location>
<             <mods:location>
114,116d101
<             <mods:location>
<               <mods:url usage="timed log">/media/oh_masters/text/masters/21198-zz002kppkj-2-master.xml</mods:url>
<             </mods:location>
129,131d113
<           </mods:location>
<           <mods:location displayLabel="Interview Full Transcript (PDF)">
<             <mods:url>/media/oh_masters/pdf/masters/21198-zz002kppdz-3-master.pdf</mods:url>
$ diff zz002kqf5d_before.xml zz002kqf5d_after.xml
3c3
<   <responseDate>2024-06-12T12:18:33Z</responseDate>
---
>   <responseDate>2024-06-12T12:49:08Z</responseDate>
73,75d72
<           <mods:location displayLabel="Interview Full Transcript (PDF)">
<             <mods:url>/media/oh_masters/pdf/masters/21198-zz002kqf5d-1-master.pdf</mods:url>
<           </mods:location>

@akohler akohler requested a review from kjallen June 12, 2024 19:57
Copy link
Member

@kjallen kjallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed:

  • Clean build, ran tests, all passed
  • Reviewed code
  • Reviewed config files
  • Imported data, added file, confirmed behaved as expected via oai feed

@kjallen kjallen merged commit 875bfd0 into main Jun 12, 2024
@kjallen kjallen deleted the SYS-1637/remove_master_urls_from_oai branch June 12, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants