[Archivesspace_Users_Group] construct unique ref IDs

Chris Fitzpatrick Chris.Fitzpatrick at lyrasis.org
Fri Mar 14 05:40:05 EDT 2014


Hi Ben,


Yes, the refid rules have been implemented as a plugin. The documentation is here :


https://github.com/archivesspace/archivesspace/tree/master/plugins/refid_rules


So, to enable this, edit the config/config.rb file to load the plugin (about line 102) :


AppConfig[:plugins] = ['refid_rules', 'local']


Then, define the rule that you want to use in the config/config.rb.


For example:

AppConfig[:refid_rule] = "<%= repository['repo_code'] %>_<%= resource['formatted_id']  %>_<%= SecureRandom.hex %>"


This is using a templating languaged call ERB, so you can call variables with-in a  <%= %>  block. You can do something like:


AppConfig[:refid_rule] = "Bananas_<%= SecureRandom.hex %>"


Which would generate a RefID like "Bananas_" + a randomly generated hexadecimal.


Does this make sense?

Let me know if you have any questions...


best, chris.




Chris Fitzpatrick | chris.fitzpatrick at lyrasis.org
Developer, ArchivesSpace
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: Thursday, March 13, 2014 5:04 PM
To: archivesspace users group
Subject: [Archivesspace_Users_Group] construct unique ref IDs

Hello,

I see this made it into the newest release, https://www.pivotaltracker.com/s/projects/386247/stories/49569471, but after a cursory search of the staff interface, I am unclear how to actually go about using this feature. Any direction you can provide is appreciated.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20140314/1100ebe5/attachment.html>


More information about the Archivesspace_Users_Group mailing list