[Archivesspace_Users_Group] making custom Advanced Search fields available in PUI using Extended Advanced Search plugin

Andrew Morrison andrew.morrison at bodleian.ox.ac.uk
Thu Jul 27 04:08:15 EDT 2023


The documentation is wrong. Calling the define_field method 
automagically adds fields to the drop-downs in staff interface advanced 
search. But the fields in the drop-downs in the public user interface 
are hardcoded in the following locations:

https://github.com/search?q=%3Afield_options+repo%3Aarchivesspace%2Farchivesspace+path%3A%2F%5Epublic%5C%2Fapp%5C%2F%2F+&type=code

You either need to override those templates in your plug-in, or override 
the shared/search template to ignore the field_options variable that 
those templates pass to it. Those templates might change in future 
releases, so overriding them now means having to review them whenever 
you upgrade in the future.

Andrew.


On 25/07/2023 18:24, Norton, Channing wrote:
>
> All,
>
> Our institution is attempting to use some of the fields in the 
> Extended Advanced Search plugin 
> (https://github.com/hudmol/extended_advanced_search) in the PUI in 
> addition to the staff interface. As it stands, we have the plugin 
> working fine in a test environment for the staff interface. We’ve 
> edited a few stanzas in the main file to include public visibility:
>
> AdvancedSearch.define_field(:name => 'use_restrictions', :type => 
> :boolean, :visibility => [:staff,:public], :solr_field => 
> 'use_restrictions')
>
> That said, this does not appear to have the desired effect. Namely, 
> this field will not be visible in the PUI, though it remains visible 
> in the staff interface. If I’m understanding the documentation here:
> https://archivesspace.github.io/tech-docs/customization/plugins.html
>
> It SHOULD be. Does anyone have any insight here?
>
> Channing Norton (He/Him/They/Them)
>
> Senior Programmer Analyst
>
> Digital Initiatives
>
> University of Rochester
>
> On Campus Tues, Thurs
>
>
> _______________________________________________
> 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/20230727/14531079/attachment.html>


More information about the Archivesspace_Users_Group mailing list