Angular catalog advanced search filters are not configurable

Bug #1922273 reported by Jeff Davis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

In the TPAC, advanced search filters can be modified in several ways:

- You can add, remove, or modify the order of search filters. For example, if you don't want to use the "Video Format" filter, you can easily hide it via config.tt2.

- For any given filter, you can move an option to the top of the list my setting "Is Simple Selector" to "true" for that option. For example, you may want English to show at the top of the Language filter.

The TPAC configuration options are documented here:
https://docs.evergreen-ils.org/eg/docs/latest/admin/search_interface.html

Equivalent options are not available in the Angular catalog: is_simple is ignored, and there's no way to remove unwanted search filters.

tags: added: staffcatalog
tags: added: regression
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1922273-staffcat-adv-search-filters has two commits that restore the missing behavior:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeffdavis/lp1922273-staffcat-adv-search-filters

(1) The first commit moves simple selectors to the top of the list of options. To test, run this SQL command:

UPDATE config.coded_value_map
SET is_simple = true
WHERE ctype = 'item_lang' AND code = 'eng';

That should move "English" to the top of the language search filter.

(2) The second commit adds an org unit setting, eg.staffcat.search_filters, which lets you specify a list of search filters to display. After running the upgrade script, you can modify the list of search filters like so:

INSERT INTO actor.org_unit_setting (name, org_unit, value)
VALUES ('eg.staffcat.search_filters',1,'["item_lang","audience","lit_form"]');

This could also be implemented as a workstation setting by adding the setting to config.workstation_setting_type, but in our environment it's something we want to manage globally.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 3.7.1
Changed in evergreen:
milestone: 3.7.1 → 3.7.2
Changed in evergreen:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Terran McCanna (tmccanna) wrote :

I tested this with the SQL suggested above, but also tested it through the admin interfaces and both patches worked well.

(1) The order of the values in the advanced search filters was successfully updated through Administration > Server Administration > MARC Coded Value Maps by checking the "Is Simple Selector" box. I tested this with languages and with Literary Forms. (Note that this affects the Bootstrap OPAC Advanced Search page as well as the Angular Staff Catalog Filters.)

(2) This is controlled by the new "Staff Catalog Search Filters" library setting. Although Jeff mentioned setting it globally, I tested it at different org unit levels and it worked well. Note that while it does specify which filter boxes to display, it doesn't appear to change the order they are displayed in. I think that's fine, I was just confused at first because I expected the order to change. I also noticed that when I edited it through the staff interface, it escaped the characters when it saved it to the database table, but it still seemed to work fine.

Also noting that this setting does *not* affect which search filters display in the OPAC advanced search - that seems self-evident because "Staff Catalog" is in the name of the setting, but noting it anyway since it might be worth considering adding a similar setting for the OPAC at some point.

My sign off is at:
https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mccanna/lp1922273-staffcat-adv-search-filters-signoff

tags: added: signedoff
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Galen Charlton (gmc)
Changed in evergreen:
importance: Medium → Wishlist
milestone: 3.7.2 → 3.8-beta
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master for inclusion in 3.8. Thanks, Jeff and Terran!

Some notes:

- I pushed this as a wishlist item because of the new library setting. That said, if some other committers to wishes to backport it, I would have no objection provided that it's ensured that the 3.7 release notes note the new setting.
- I tweaked the positioning of the filters so that hiding some of them wouldn't result in the ones that remain being unnecessarily displayed on two rows.
- I added a release notes entry that documents the entire list of available filter codes.

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Galen Charlton (gmc) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.