EAD mainagencycode attribute contains countrycode value

34 views
Skip to first unread message

Vicky Phillips

unread,
Mar 7, 2019, 4:47:47 AM3/7/19
to AtoM Users
Hello

Before caching all EAD and DC for our site I would like to fix the following issue. Whereby the countrycode which comes from the Country name in the Archival institution record is pulled into both the countrycode and mainagencycode attributes in the EAD.

countrycode="GB" mainagencycode="GB-0210"

Looking at the EAD standard the countrycode should not be included in the mainagencycode

https://www.loc.gov/ead/tglib/elements/eadid.html

i.e. it should be

countrycode="GB" mainagencycode="0210"

How do we prevent the countrycode from being included in the mainagencycode attribute? Just to note we’re running version 2.4 of AtoM and don’t have Inherit reference code enabled.

Thanks,

Vicky

Dan Gillean

unread,
Mar 7, 2019, 11:02:51 AM3/7/19
to ICA-AtoM Users
Hi Vicky, 

You're right! I've filed an issue here: 
I've also added it to a list of community-reported bugs for review when we prepare the 2.5 release. If this is something you would like to sponsor to prioritize for inclusion in the 2.5 release to ensure it is fixed, feel free to contact me off-list. 

In the meantime, you can either work around the issue, or if you are feeling brave, you could try to modify the code yourself. 

The workaround would be to temporarily remove the country from your repository's address, then generate and cache your EAD before adding it back. Unfortunately

I'm not a developer, but after searching around our code repository, I think I have found where the country code is getting appended to the main agency code: 
I haven't had the opportunity to test it, but I *think* if you removed the nested if condition from lines 196-200 this might solve the issue. 

Remember if you do decide to try this, make a back up first, do not test on your production system, and proceed at your own risk! And let us know how it goes! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/ea09ee22-cf40-4064-915d-9f65fccd66dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vicky Phillips

unread,
Mar 11, 2019, 5:27:41 AM3/11/19
to AtoM Users
Hi Dan
Thanks for pointing us in the right direction. I got the Dan the programmer who works with me on AtoM to tweak the code and it works.  I'm wondering can anyone make a pull request to fix this issue? If so I'll see if I can get Dan (NLW) to make a pull request, fix and submit this.
Thanks,
Vicky

Dan Gillean

unread,
Mar 11, 2019, 10:22:24 AM3/11/19
to ICA-AtoM Users
Hi Vicky, 

Yes, we would welcome a pull request! Please have your developer review the following pages:
The first link includes information on a Contributor's Agreement that we would request be signed and sent to us prior to us accepting the code. I also recommend that the pull request reference the issue I've opened, with a subject something like the following: 
  • Remove country code from mainagencycode in EAD export, refs #12869
Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
Reply all
Reply to author
Forward
0 new messages