[Archivesspace_Users_Group] barcode validation for ASpace

Benn Joseph benn.joseph at northwestern.edu
Tue Jun 25 16:00:32 EDT 2019


Alex, Mark,
Thanks for this! We use 14 character barcodes, so I think for now our best immediate approach will be to modify our config.rb file so that the min and max values are both set to 14. That will at least keep us from going forward with entries that are the wrong length (we do have those, and they stand out pretty clearly in a list).

Mark, we just have the same Codabar (I think) labels that the rest of the library uses, like for books and such, for which we can use Mod 10 (Luhn algorithm) to determine the check digit. So yes, that XSLT process would be useful!

James Bullen at Hudson Molonglo also sent along this, as a proof of concept plugin for the same verification algorithm (thanks James!):
https://github.com/jambun/as_barcode_validator_poc<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jambun_as-5Fbarcode-5Fvalidator-5Fpoc&d=DwMFaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=fciHLC2ou0tXKp-JlPlsrEmslFw9tnR331DgXAhVLvo&m=vpyLOy3MnEb8EotnwIi_UMxBZzWZ670VSRacI00SSEg&s=5ypZGTRWLz3_1uvMH6IfQpbedcpu-kr8TMpNBwylQLQ&e=>

I’m not a programmer, but this may be something we can try out on our local sandbox.

--Benn

From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Custer, Mark
Sent: Monday, June 24, 2019 10:44 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] barcode validation for ASpace

Benn,

Alex is exactly right.

At Yale, we use the length configuration to help ensure a basic level of validity (one of our repositories has 9 character barcodes, and the rest have 14 character barcodes).  I can also add that during the development of the top container module, I was hopeful that we might be able to include the ability to validate check digits for a few different barcoding systems as additional configuration options.  It was decided not to pursue that option at the time, but I imagine that such a thing could definitely be handled in a plugin. I’m not entirely sure how it would be handled throughout the application, but I expect that it could be baked into the JSON and database schemas.

I wrote a process in XSLT to verify barcode check digits according to the Luhn algorithm (https://en.wikipedia.org/wiki/Luhn_algorithm<https://urldefense.proofpoint.com/v2/url?u=https-3A__en.wikipedia.org_wiki_Luhn-5Falgorithm&d=DwMGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=fciHLC2ou0tXKp-JlPlsrEmslFw9tnR331DgXAhVLvo&m=qyMJ0RQYnXnKZjg_URtn9-zzr0wjmj_UEmHV1bPi1Fg&s=QoU9rYm4RpRGlDbooUlUvZHG-XEpuQxwkonRgxC4E9Y&e=>), if that would be of interest.  What types of barcodes do you use?  I had been meaning to add the barcode-digit check to our EAD validation process at some point anyway, so this is a good reminder to do that 😊.  So far, I have just been using that check during a project to reconcile item records in our ILS with top container records in ArchivesSpace.  In each case, I’ve stumbled across a handful of barcodes with invalid check digits, so you’re right that those errors definitely will creep in when left unchecked.

Mark



From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Alexander Duryee
Sent: Monday, 24 June, 2019 10:22 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: Re: [Archivesspace_Users_Group] barcode validation for ASpace

Benn,

It's possible to validate barcodes for length via ASpace by modifying config.rb (ref. https://github.com/archivesspace/archivesspace/blob/master/docs/user/configuring-archivesspace.md<https://urldefense.proofpoint.com/v2/url?u=https-3A__nam05.safelinks.protection.outlook.com_-3Furl-3Dhttps-253A-252F-252Fgithub.com-252Farchivesspace-252Farchivesspace-252Fblob-252Fmaster-252Fdocs-252Fuser-252Fconfiguring-2Darchivesspace.md-26data-3D02-257C01-257Cmark.custer-2540yale.edu-257C3c207da319d44f12d2e608d6f8af5bbc-257Cdd8cbebb21394df8b4114e3e87abeb5c-257C0-257C0-257C636969829396148931-26sdata-3D7a4EoOyA3sfChlyeoaqLZbYgMyPDzXF9k7hQKrnIaQA-253D-26reserved-3D0&d=DwMGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=fciHLC2ou0tXKp-JlPlsrEmslFw9tnR331DgXAhVLvo&m=qyMJ0RQYnXnKZjg_URtn9-zzr0wjmj_UEmHV1bPi1Fg&s=rmJ5ttEdQwzwsYY4_RWMmhbAJqjtJc39J9RerXdGsyI&e=>).  If the min and max values are set to the same length, then barcodes will only validate if they're either 0 or that exact length.  You won't need to do anything elaborate to implement this - just add the correct values to config.rb and restart ASpace, and it'll immediately go into effect.

I'm not aware of anything in ASpace that will do more elaborate validation (e.g. verifying that a barcode's check digits are correct); this would likely require either a plugin or feature request.

Thanks,
--Alex

On Fri, Jun 21, 2019 at 1:39 PM Benn Joseph <benn.joseph at northwestern.edu<mailto:benn.joseph at northwestern.edu>> wrote:
Good afternoon,
Over the past few years, our standard procedure when processing a new collection has been to barcode the finished boxes and assign those barcodes to their Top Containers in ASpace.

ArchivesSpace does a great job of keeping a user from assigning a barcode that has already been assigned elsewhere--which we recently discovered after mistakenly being given a sheet of piggyback barcodes that had already been assigned to various other collections. The system reports an error: “Barcode – A barcode must be unique within a repository”. Great!

One thing it doesn’t do is check for valid barcodes against a schema. For instance, we try to be very careful about only using barcode scanners to enter barcodes into ArchivesSpace, but every now and then one will get entered by hand, or there will be an accidental keystroke after scanning. In those cases, it would be ideal if ASpace were able to validate this number to ensure that it’s correct (I understand that Alma does this using a Codabar 13 validation routine, though there are other validation options that would also look for a check digit). Would this be a plugin? A feature request? Would it even be possible?

The reason it’s important for us to ensure barcode accuracy is that a large volume of our collections get sent offsite to a facility that uses GFA as their inventory system. So, if we enter the barcode for a box that is incorrect in ASpace and GFA records it differently, it ends up being very difficult to recall that box if a researcher requests it.

Thanks!
--Benn

Benn Joseph
Head of Archival Processing
Northwestern University Libraries
Northwestern University
www.library.northwestern.edu<https://urldefense.proofpoint.com/v2/url?u=https-3A__nam05.safelinks.protection.outlook.com_-3Furl-3Dhttp-253A-252F-252Fwww.library.northwestern.edu-26data-3D02-257C01-257Cmark.custer-2540yale.edu-257C3c207da319d44f12d2e608d6f8af5bbc-257Cdd8cbebb21394df8b4114e3e87abeb5c-257C0-257C0-257C636969829396158926-26sdata-3DC9sj3YAaZjki5ritzmUdBTYMN1ncT7rvMA7B7LRotYI-253D-26reserved-3D0&d=DwMGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=fciHLC2ou0tXKp-JlPlsrEmslFw9tnR331DgXAhVLvo&m=qyMJ0RQYnXnKZjg_URtn9-zzr0wjmj_UEmHV1bPi1Fg&s=eLhr2rx_eg4Vr1fe4MlQ-96VuFYR-qd5KAWJ1xMzqLM&e=>
benn.joseph at northwestern.edu<mailto:benn.joseph at northwestern.edu%0d>
847.467.6581
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group<https://urldefense.proofpoint.com/v2/url?u=https-3A__nam05.safelinks.protection.outlook.com_-3Furl-3Dhttp-253A-252F-252Flyralists.lyrasis.org-252Fmailman-252Flistinfo-252Farchivesspace-5Fusers-5Fgroup-26data-3D02-257C01-257Cmark.custer-2540yale.edu-257C3c207da319d44f12d2e608d6f8af5bbc-257Cdd8cbebb21394df8b4114e3e87abeb5c-257C0-257C0-257C636969829396158926-26sdata-3DkUMdoCxPj3F3zc3QIfInjShvGGAW-252BZA-252Fe438NVHZJLw-253D-26reserved-3D0&d=DwMGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=fciHLC2ou0tXKp-JlPlsrEmslFw9tnR331DgXAhVLvo&m=qyMJ0RQYnXnKZjg_URtn9-zzr0wjmj_UEmHV1bPi1Fg&s=tah25MMdScA3QiwLjqD6j5RV74xOE7A8Bogj4IgMJkQ&e=>


--
Alexander Duryee
Metadata Archivist
New York Public Library
(917)-229-9590
alexanderduryee at nypl.org<mailto:alexanderduryee at nypl.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20190625/df0dfcff/attachment.html>


More information about the Archivesspace_Users_Group mailing list