[Archivesspace_Users_Group] yale accessions plugin & defaults + preferences
Majewski, Steven Dennis (sdm7g)
sdm7g at eservices.virginia.edu
Wed Dec 16 16:03:27 EST 2015
Is Yale (or anyone else) actively using the humdol/aspace_yale_accessions plugin ?
Initially, I forked this plugin and simplified the code somewhat for our use.
( mainly, eliminated keeping prefixes in the database, as we’re using the Repository org codes: “viu”, “viuh”, “viul” … )
However, I’ve discovered that this method is both overly complicated and doesn’t play particularly well with the other methods of setting defaults and “Pre-populate Records?” preference.
I’ve been testing a different way of doing the same thing: auto generating a set of ids ( id_0, id_1, id_2 ) with repo org-code, year, and sequence #, that uses and works with the existing backend defaults API ( GET /repositories/:repo_id/default_values/:record_type ). This could be a more general method that could work for other defaults, so I’m wondering if anyone has any other use cases for this sort of feature.
The main remaining issue is how to either override the route for GET /repositories/:repo_id/default_values/:record_type in Sinatra from a plugin, or else how to add a hook in that controller to call a function on that JSON before it’s returned.
The simpler and cleaner method than monkey patching might require a change to that controller in the base code: if DefaultValues has a post processing method ( possibly added in a plugin ), then call that method on the JSON before
json_response(json) return. So I’m interested if there is a more general interest in adding this feature.
Also a comment on the User experience of the admin frontend with these default & preference settings:
The frontend interface follows the internal model, but this makes it pretty awkward to use, as these settings are spread over several different pages, and it’s not immediately obvious what the current state is without checking the settings on ALL of those pages. i.e. there are Global, Repository and User settings and the record defaults aren’t applied unless that “Pre-Populate Records?” is set on yet another page. It would be a lot nicer if these options could be aggregated in some way. ( If not for setting the state, at least for telling you the current state: i.e. maybe showing you whether the pre-populate is set on the defaults page(s). ) Also, initially I found those settings difficult to find, as I was looking for them from the Create pages rather the the Browse pages, since those defaults are applied in creating a new resource.
— Steve Majewski / UVA Alderman Library
More information about the Archivesspace_Users_Group