Bug 17142 - Don't show library group selection in advanced search if groups are not defined
Summary: Don't show library group selection in advanced search if groups are not defined
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jacek Ablewicz
QA Contact: Testopia
URL:
Keywords:
Depends on: 15295
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-17 16:44 UTC by Jacek Ablewicz
Modified: 2017-12-07 22:16 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17142 - Don't show library group selection in advanced search if groups are not defined (1.88 KB, patch)
2016-08-17 16:52 UTC, Jacek Ablewicz
Details | Diff | Splinter Review
[SIGNED-OF] Bug 17142 - Don't show library group selection in advanced search if groups are not defined (1.94 KB, patch)
2016-08-23 00:21 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 17142 - Don't show library group selection in advanced search if groups are not defined (2.00 KB, patch)
2016-08-23 10:20 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.