Bug 17142

Summary: Don't show library group selection in advanced search if groups are not defined
Product: Koha Reporter: Jacek Ablewicz <abl>
Component: OPACAssignee: Jacek Ablewicz <abl>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: f.demians, jonathan.druart, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 15295    
Bug Blocks:    
Attachments: Bug 17142 - Don't show library group selection in advanced search if groups are not defined
[SIGNED-OF] Bug 17142 - Don't show library group selection in advanced search if groups are not defined
Bug 17142 - Don't show library group selection in advanced search if groups are not defined

Description Jacek Ablewicz 2016-08-17 16:44:07 UTC
Even if library groups/search domains are not defined in the system, (empty) select for "Groups of libraries" under "Location and availability" section in OPAC advanced search is still visible; it shouldn't. Side effect of Bug 15295 - 'searchdomainloop' variable in the template is now an object, it needs a different kind of statement (.count) to check if it's empty or not.
Comment 1 Jacek Ablewicz 2016-08-17 16:52:37 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2016-08-23 00:21:56 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-08-23 10:20:29 UTC
Created attachment 54760 [details] [review]
Bug 17142 - Don't show library group selection in advanced search if groups are not defined

Even if library groups/search domains are not defined in the system,
(empty) select for "Groups of libraries" under "Location and
availability" section in OPAC advanced search is still visible; it
shouldn't. Side effect of Bug 15295 - 'searchdomainloop' variable
in the template is now an object, it needs a different kind of statement
(.count) for checking if it's empty or not.

To test:

1) apply patch
2) when there are no groups of libraries defined in Administration ->
Libraries and Groups, "Groups of libraries" selection should be
no longer visible in OPAC adavanced search page
3) add library group or two: "Groups of libraries" selection should
reappear.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Kyle M Hall 2016-09-02 15:20:30 UTC
Pushed to master for 16.11, thanks Jacek!
Comment 5 Frédéric Demians 2016-09-08 19:46:39 UTC
Pushed in 16.05. Will be in 16.05.04.