Bug 13950

Summary: Sort Item search home library list by branch name
Product: Koha Reporter: HB-NEKLS <gwilliams>
Component: SearchingAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: chris, indradg, jonathan.druart, jschmidt, katrin.fischer, kholten, liz, mtj, nick, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15807
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 13950: Sort Item search home library list by branch name
[Signed-off] Bug 13950: Sort Item search home library list by branch name
Bug 13950 - Sort Item search home library list by branch name
Bug 13950 - Sort Item search home library list by branch name
Bug 13950 - Sort Item search home library list by branch name

Description HB-NEKLS 2015-04-03 02:00:43 UTC
The home library option in the new item search feature needs to be alphabetized. Our system displays the options: 
All Libraries
Leavenworth...
Carbondale...
Prairie Hills Schools -- Sabetha...
Lyndon...

and so on.
Comment 1 Katrin Fischer 2015-06-09 01:47:50 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-06-09 16:24:57 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-06-16 15:29:11 UTC
It does not work, this patch makes the items sorted by branch codes, not branch names. Which is what we want, I guess.
Comment 4 Katrin Fischer 2015-06-16 22:52:14 UTC
I was struggling a bit with this one and copied the wrong bit of code from somewhere I think - can you take a look and provide a better patch or some hints?
Comment 5 Nick Clemens 2015-06-17 01:52:28 UTC Comment hidden (obsolete)
Comment 6 Indranil Das Gupta 2015-06-17 05:36:42 UTC Comment hidden (obsolete)
Comment 7 Katrin Fischer 2015-06-17 06:18:34 UTC
Thx Nick and Indranil :)
Comment 8 Jonathan Druart 2015-06-17 07:58:20 UTC
Created attachment 40213 [details] [review]
Bug 13950 - Sort Item search home library list by branch name

On the item search form the list of home libraries isn't sorted
alphabetically by their descrption.

To test:
- Ensure that you have libraries whose code/name are sorted in a different alphabetical order (e.g. Aardvark/ZZZ & Zebra/AAA)
- Staff: Advanced search - item search
- See that libraries are sorted in code order
- Apply patch
- Verify selection block for home library is correctly sorted after
  applying the patch.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 9 Tomás Cohen Arazi 2015-07-08 18:19:10 UTC
Patch pushed to master.

Thanks Nick!
Comment 10 Chris Cormack 2015-07-14 20:08:52 UTC
Pushed to 3.20.x will be in 3.20.2
Comment 11 Liz Rea 2015-07-20 22:16:39 UTC
Pushed to 3.18.x will be in 3.18.09
Comment 12 Mason James 2015-07-25 07:09:38 UTC
Patch not pushed 3.16.x branch, due to conflicts