Closed abelemlih closed 1 year ago
ASpace by default uses ISO-639-2b language codes.
Controlled vocabularies required in Curate: https://docs.google.com/spreadsheets/d/1tm7RDYWVcAWEZuA-lB3cbxxGI4qjn8uCn71X2EJPB50/edit#gid=854442392
For reference, this is the list I am using to map language, from the Library of Congress: https://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt. It is the list of the ISO-639-2 standard as requested.
with resource:
with error:
with form populated:
per discussion with Elizabeth, I'm going ahead and doing a PR with the work completed so far.
All of the ticket requirements have been satisfied, however, currently the fields with mutliple inputs, like subject topics or subject names, are all populating on one line, not triggering multiple line inputs. i will continue to work on that step.
Work completed: Added Populate from ArchivesSpace button to New Collection form:
Added modal for archivesSpace population that includes dropdown with repository select, call number input field, and search in ArchivesSpace button:
After searching, result from ArchivesSpace is displayed:
Or error message is displayed:
Finally, the "Populate from ArchivesSpace" button transfers the data into the form inputs:
the PR has been merged, but we need to get the environment variables set to access the api from test and arch.
TODO: Get two emails to use for bot users for pre-prod and prod api access.
I cannot set up bot accounts for API access until I have email addresses to link to the accounts.
Collin will reach to Elizabeth and Alex to discuss.
After conversations with @erussey and @AGCooper we're going to create api users under a different ticket.
API permissions now set by @lisahamlett , so this ticket should be good to go. Curate API user defined as: curate_api
I added the ArchivesSpace environment variables to Test and Arch. I also reached out to Lyrasis regarding API authorization for the two instances.
Once Test and Arch are authorized to access the Aspace API, the Aspace/Curate integration will be ready for testing.
Due to the networking configuration, ec2 instances on test and arch are contacting lyrasis using the nat gateway ip addresses rather than the elastic ips that have been whitelisted. I will work to address this.
The ec2 instances are currently deployed in a private subnet. The only way to really make this work I can think of is to stop the instances, create images from them, and redeploy in a public subnet, reallocating the IPs and updating all of our loadbalancer rules. This may take until tomorrow to complete.
I have moved both instances to a public subnet and Ayoub has verified this solved the issue. Reassigning.
This ticket is ready for testing on Curate Test.
Just created this collection in Curate test, and it worked really well! https://curate-test.library.emory.edu/dashboard/collections/389280gbgj-cor?locale=en
One issue: the required holding_repository was not populated and the form prompted me to fill it in. Since this is a required field, we should make sure it gets populated.
Hmmm, that field is included in what's supposed to be pulled over:
document.getElementById('collection_holding_repository').value = result_success.repository.holding_repository;
I will check into why it isn't.
For that particular item, Rose Manuscript No. 892, the data object doesn't include a value for the holding repository.
{"repository":{"repository_id":"7","name":"Stuart A. Rose Manuscript, Archives, and Rare Book Library\r\n","administrative_unit":"","holding_repository":"","institution":"Emory University","contact_information":"Stuart A. Rose Manuscript, Archives, and Rare Book Library\nEmory University Libraries\n540 Asbury Circle\nAtlanta, Georgia, 30322\nrose.library@emory.edu\n404-727-6887"},"resource":{"resource_id":"3432","title":"William Levi Dawson papers","description":"Papers of William Levi Dawson, African American composer, conductor, and educator from Anniston, Alabama, including correspondence, original scores of Dawson's works, personal and family papers, photographs, audio visual materials, and printed material.","creator":["Dawson, William Levi, 1899-1990."],"uri":"/repositories/7/resources/3432","call_number":"Manuscript Collection No. 892","primary_language":"English","subject_topics":["African American choral conductors.","African American composers.","African American conductors.","African American musicians.","African American students.","African American universities and colleges--Alabama.","African American women.","African Americans--Education (Higher)--Alabama.","African Americans--Music.","Copyright--United States.","Music publishing.","Spirituals (Songs)"],"subject_names":["Dawson, William Levi, 1899-1990.","Ellison, Ralph.","Krasilovsky, M. William.","Spady, James G.","Stokowski, Leopold, 1882-1977.","Fisk University.","Tuskegee Institute.","Tuskegee Institute. Choir.","Tuskegee Normal and Industrial Institute.","Tuskegee University."],"subject_geo":["Africa--Description and travel."],"subject_time_periods":[],"system_of_record_id":"aspace:/repositories/7/resources/3432","finding_aid_link":"https://archives-test.libraries.emory.edu/repositories/7/resources/3432"}}
So, that explains why it isn't populating.
Thanks @CB987, I'll try another example and see how it goes.
@CB987 I tried a different collection and the same thing happened. I'll follow up with @erussey to see what may be happening on the data side.
@eporter23 : We discovered a dependency with whitespaces and mapping tables. The devs are going to go back and change the mapping slightly so ASpace is only sending over an identifier from the repository to map to Curate data rather than pulling over the text to populate the repository fields (and it not matching what Curate expects).
@eporter23 : This ticket should be ready to test again. @abelemlih fixed the missing holding repository information. You can test with Dawson again (Manuscript No. 892) as well as a Health collection (Manuscript Collection No. 027), and an EUA collection with a slightly different call number (Series No. 234).
See bug fix to the above in #127.
These appear to have all populated successfully: Dawson: https://curate-test.library.emory.edu/dashboard/collections/5462547dkb-cor?locale=en Health: https://curate-test.library.emory.edu/dashboard/collections/590dv41p3c-cor?locale=en EUA: https://curate-test.library.emory.edu/dashboard/collections/6386hdr84d-cor?locale=en
Add a new button to the "add a new collection" page in curate that populates fields in the form from the ASpace API.
Tasks:
[x] Add "Populate from ArchivesSpace" button
[x] After button is clicked, display a modal with a dropdown of repositories from ArchivesSpace
[x] After repository is selected, display a call number field where user enters the call number of the resource they are searching for (exact match is required)
[x] After call number is entered, display the Aspace resource that matches the search or "collection not found" error message. If no resources match, or more than one resource matches, display error message.
[x] If resource is selected, populate all data associated with that resource on the collection creation form
[x] If an error occurred, display error to the user. An error message is included in the response provided by the Aspace controller if any error occurred.