[Archivesspace_Users_Group] ref_ID plug-in
Ben Goldman
bmg17 at psu.edu
Wed Jun 18 16:33:43 EDT 2014
Hi Chris,
Thanks for this. Looks like we missed that space, and it's working as expected now.
We used the ASpace-provided migration tools to migrate our data prior to implementing the refID plugin, so we won't be able to answer on our end whether the plugin auto-generates these values during migration until we attempt our next migration later this summer. If you could verify this, it would be extremely helpful to know in advance whether this is an option.
In case this helps answer the question, I did test the EAD import function, and so long as <c0X> tags do not contain id attributes, the plugin will assign them. But it could be problematic to institutions that plan to make ample use of the importer to populate ASpace. It might be nice to have the option to override these on import if the plugin is enabled.
Thanks,
Ben
Ben Goldman
Digital Records Archivist
Penn State University Libraries
University Park, PA
814-863-8333
http://www.libraries.psu.edu/psul/speccolls.html
----- Original Message -----
From: "Chris Fitzpatrick" <Chris.Fitzpatrick at lyrasis.org>
To: "Archivesspace Users Group" <archivesspace_users_group at lyralists.lyrasis.org>
Sent: Wednesday, June 18, 2014 5:47:02 AM
Subject: Re: [Archivesspace_Users_Group] ref_ID plug-in
Hi Ben,
Hm, this is working for me, but I bet there's something ( like a space? ) in your repo_code?
Try this:
AppConfig[:refid_rule] = "<%= ( repository['repo_code'] + '_' + resource['formatted_id'] + '_' + SecureRandom.hex).gsub(/[^a-zA-Z0-9\-_:\.]/, '_') %>"
This should convert all the bad characters ( like spaces) into _'s.
I think all the ref_ids should be generated using this rule, even those imported from AT. The archival_object model has the auto_generate hook added to it, so anything that is created via the backend will have this hook executed on create...however, I could be wrong about this...
b,chris.
Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat | Phone: 918.236.6048
http://archivesspace.org/
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Ben Goldman <bmg17 at psu.edu>
Sent: Monday, June 16, 2014 10:42 PM
To: Archivesspace Users Group
Subject: [Archivesspace_Users_Group] ref_ID plug-in
Hi All,
We installed the ref_ID plug-in that was included (I believe) in the 1.07 release of ASpace, and we're currently running 1.09. We configured the plug-in like this:
AppConfig[:plugins] = ['refid_rules','local', 'aspace_feedback', 'lcnaf']
AppConfig[:refid_rule] = "<%= repository['repo_code'] %>_<%= resource['formatted_id'] %>_<%= SecureRandom.hex %>"
And I was just testing out some things in ASpace and noticed that when I tried to add a new component in a resource record, I was getting this error:
Ref ID - Did not match regular expression \A[a-zA-Z0-9\-_:\.]*\z
Looks like the plug-in is causing this error. Any ideas?
On a related note, can someone clarify whether this plug-in only applies the custom refID format to new components created in the admin interface? In other words, components migrated into ASpace using the migration tools, or imported from EAD files won't have the custom refID format applied?
Thanks,
Ben
Ben Goldman
Digital Records Archivist
Penn State University Libraries
University Park, PA
814-863-8333
http://www.libraries.psu.edu/psul/speccolls.html
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140618/8d0267bb/attachment.html>
More information about the Archivesspace_Users_Group
mailing list