Bug 21910 - Koha::Library::Groups->get_search_groups should return the groups, not the children
Summary: Koha::Library::Groups->get_search_groups should return the groups, not the ch...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 20157
Blocks: 21911
  Show dependency treegraph
 
Reported: 2018-11-29 13:40 UTC by Nick Clemens
Modified: 2018-12-19 13:33 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups (3.75 KB, patch)
2018-11-29 14:14 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups (3.82 KB, patch)
2018-11-29 15:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups (3.86 KB, patch)
2018-11-29 21:07 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups (3.94 KB, patch)
2018-12-06 15:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21910: Remove duplicated lines in tests (1.55 KB, patch)
2018-12-06 15:53 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21910: Does not deal with call context, ->search does already (911 bytes, patch)
2018-12-06 15:54 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 Nick Clemens 2018-11-29 13:40:31 UTC
To recreate the issue:
1 - Add a library group (Admin->Library groups)
2 - Enable use as an opac and staff search limit
3 - Add some libraries to the group
4 - Visit advanced search on staff and opac
5 - Note the dropdown has as many empty rows as there are libraries in the group
Comment 1 Nick Clemens 2018-11-29 14:14:50 UTC
Created attachment 82741 [details] [review]
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups

To test:
 1 - Add a library group (Admin->Library groups)
 2 - Enable use as an opac and staff search limit
 3 - Add some libraries to the group
 4 - Visit advanced search on staff and opac
 5 - Note the dropdown has as many empty rows as there are libraries
  in the group
 6 - Apply patch, restart all the things
 7 - Visit staff and opac advanced search
 8 - Confirm the group dropdowns are correct
 9 - Enable OpacMastheadLibraryPulldown
10 - Ensure the dropdown on opac shows groups correctly
11 - Confirm earchign groups works from all three locations
12 - prove -v t/db_dependent/LibraryGroups.t
Comment 2 Martin Renvoize 2018-11-29 15:41:27 UTC
Created attachment 82755 [details] [review]
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups

To test:
 1 - Add a library group (Admin->Library groups)
 2 - Enable use as an opac and staff search limit
 3 - Add some libraries to the group
 4 - Visit advanced search on staff and opac
 5 - Note the dropdown has as many empty rows as there are libraries
  in the group
 6 - Apply patch, restart all the things
 7 - Visit staff and opac advanced search
 8 - Confirm the group dropdowns are correct
 9 - Enable OpacMastheadLibraryPulldown
10 - Ensure the dropdown on opac shows groups correctly
11 - Confirm earchign groups works from all three locations
12 - prove -v t/db_dependent/LibraryGroups.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2018-11-29 15:41:58 UTC
Works as expected and has tests.. Signing Off
Comment 4 Josef Moravec 2018-11-29 21:07:49 UTC
Created attachment 82766 [details] [review]
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups

To test:
 1 - Add a library group (Admin->Library groups)
 2 - Enable use as an opac and staff search limit
 3 - Add some libraries to the group
 4 - Visit advanced search on staff and opac
 5 - Note the dropdown has as many empty rows as there are libraries
  in the group
 6 - Apply patch, restart all the things
 7 - Visit staff and opac advanced search
 8 - Confirm the group dropdowns are correct
 9 - Enable OpacMastheadLibraryPulldown
10 - Ensure the dropdown on opac shows groups correctly
11 - Confirm earchign groups works from all three locations
12 - prove -v t/db_dependent/LibraryGroups.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Jonathan Druart 2018-12-06 15:53:51 UTC
Created attachment 82915 [details] [review]
Bug 21910: Koha::Library::Groups->get_search_groups should return the groups

To test:
 1 - Add a library group (Admin->Library groups)
 2 - Enable use as an opac and staff search limit
 3 - Add some libraries to the group
 4 - Visit advanced search on staff and opac
 5 - Note the dropdown has as many empty rows as there are libraries
  in the group
 6 - Apply patch, restart all the things
 7 - Visit staff and opac advanced search
 8 - Confirm the group dropdowns are correct
 9 - Enable OpacMastheadLibraryPulldown
10 - Ensure the dropdown on opac shows groups correctly
11 - Confirm earchign groups works from all three locations
12 - prove -v t/db_dependent/LibraryGroups.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2018-12-06 15:53:55 UTC
Created attachment 82916 [details] [review]
Bug 21910: Remove duplicated lines in tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2018-12-06 15:54:00 UTC
Created attachment 82917 [details] [review]
Bug 21910: Does not deal with call context, ->search does already

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Nick Clemens 2018-12-11 20:56:30 UTC
Awesome work all!

Pushed to master for 19.05
Comment 9 Martin Renvoize 2018-12-12 10:44:36 UTC
Pushed to 18.11.x for 18.11.01
Comment 10 Jesse Maseto 2018-12-18 19:24:22 UTC
Pushed to 18.05.x for 18.05.07
Comment 11 Fridolin SOMERS 2018-12-19 13:33:33 UTC
Depends on Bug 20157 not in 17.11.x