Bug 35372

Summary: Support for empty AdvancedSearchTypes
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: SearchingAssignee: Aleisha Amohia <aleisha>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 33186, 12478    
Bug Blocks:    
Attachments: Bug 35372: Add support for AdvancedSearchTypes to be empty and disabled
Bug 35372: Add support for OpacAdvancedSearchTypes to be empty and disabled
Bug 35372: Add support for AdvancedSearchTypes to be empty and disabled
Bug 35372: Add support for OpacAdvancedSearchTypes to be empty and disabled

Description Aleisha Amohia 2023-11-20 20:40:30 UTC
Some organisations using Koha do not have holdings/items, and would like to be able to hide the advanced search 'items' panels, controlled by the AdvancedSearchTypes system preference. However if this is left empty, item types filters still show by default.
Comment 1 Aleisha Amohia 2023-11-20 20:52:48 UTC
Created attachment 159149 [details] [review]
Bug 35372: Add support for AdvancedSearchTypes to be empty and disabled

This enhancement makes it possible to leave the AdvancedSearchTypes system preference empty if your library would like to disable the item filter tabs available on the staff interface advanced search. It also adds a message to the system preference description to describe this.

To test:

1. Go to Koha Administration -> system preferences. Search for the AdvancedSearchTypes system preference and remove its contents, so it is saved empty.
2. Go to advanced search in the staff interface. Notice the item types tab still shows as a filter option.
3. Apply the patch, restart services and refresh the advanced search
4. Confirm the item types tab no longer shows.
5. Add something back to the AdvancedSearchTypes system preference i.e. itemtypes, ccode
6. Go back to advanced search and confirm your expected tabs show as normal

Sponsored-by: Education Services Australia SCIS
Comment 2 Owen Leonard 2023-11-21 17:37:37 UTC
We should make the same change in the OPAC shouldn't we?
Comment 3 Aleisha Amohia 2023-11-22 02:35:38 UTC
Created attachment 159189 [details] [review]
Bug 35372: Add support for OpacAdvancedSearchTypes to be empty and disabled

This enhancement makes it possible to leave the OpacAdvancedSearchTypes system preference empty if your library would like to disable the item filter tabs available on the OPAC advanced search. It also adds a message to the system preference description to describe this.

To test:

1. Go to Koha Administration -> system preferences. Search for the OpacAdvancedSearchTypes system preference and remove its contents, so it is saved empty.
2. Go to advanced search in the OPAC. Notice the item types tab still shows as a filter option.
3. Apply the patch, restart services and refresh the advanced search
4. Confirm the item types tab no longer shows.
5. Add something back to the OpacAdvancedSearchTypes system preference i.e. itemtypes, ccode
6. Go back to advanced search and confirm your expected tabs show as normal

Sponsored-by: Education Services Australia SCIS
Comment 4 Nick Clemens (kidclamp) 2023-11-27 12:09:07 UTC
Created attachment 159266 [details] [review]
Bug 35372: Add support for AdvancedSearchTypes to be empty and disabled

This enhancement makes it possible to leave the AdvancedSearchTypes system preference empty if your library would like to disable the item filter tabs available on the staff interface advanced search. It also adds a message to the system preference description to describe this.

To test:

1. Go to Koha Administration -> system preferences. Search for the AdvancedSearchTypes system preference and remove its contents, so it is saved empty.
2. Go to advanced search in the staff interface. Notice the item types tab still shows as a filter option.
3. Apply the patch, restart services and refresh the advanced search
4. Confirm the item types tab no longer shows.
5. Add something back to the AdvancedSearchTypes system preference i.e. itemtypes, ccode
6. Go back to advanced search and confirm your expected tabs show as normal

Sponsored-by: Education Services Australia SCIS
Comment 5 Nick Clemens (kidclamp) 2023-11-27 12:09:09 UTC
Created attachment 159267 [details] [review]
Bug 35372: Add support for OpacAdvancedSearchTypes to be empty and disabled

This enhancement makes it possible to leave the OpacAdvancedSearchTypes system preference empty if your library would like to disable the item filter tabs available on the OPAC advanced search. It also adds a message to the system preference description to describe this.

To test:

1. Go to Koha Administration -> system preferences. Search for the OpacAdvancedSearchTypes system preference and remove its contents, so it is saved empty.
2. Go to advanced search in the OPAC. Notice the item types tab still shows as a filter option.
3. Apply the patch, restart services and refresh the advanced search
4. Confirm the item types tab no longer shows.
5. Add something back to the OpacAdvancedSearchTypes system preference i.e. itemtypes, ccode
6. Go back to advanced search and confirm your expected tabs show as normal

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2024-01-12 10:00:34 UTC
1. Change in behaviour. Should we adjust pref's value for existing installs?

2. +                [% IF advancedsearchesloop %]
You are adding a new block, adjust the indentation.