When we fetch the list of valid pickup locations for placing a hold on the staff client, we grab a separate list of valid locations for each item on that bib, put each of those sub-lists in alphabetical order, and then string them together. We need to alphabetize the entire list at the end.
Created attachment 112995 [details] [review] Bug 26925: Sort pickup locations for biblio Currently we fetch the pickup locations for each item on the biblio, then we remove duplicates. Each items locations are sorted alphabetically, however, we don't ensure the final list is ordered To test: 1 - Find a title with items from two different libraries 2 - Create two library groups and select 'is local hold group' 3 - Place the libraries of the items in separate groups with differing libraries 4 - Attempt to place a hold for the title in the staff client 5 - Note the "Pickup at" list is not in alphabetical order 6 - Apply patch 7 - Restart all and reload 8 - Pickup locations are now sorted correctly
Created attachment 113005 [details] [review] Bug 26925: Sort pickup locations for biblio Currently we fetch the pickup locations for each item on the biblio, then we remove duplicates. Each items locations are sorted alphabetically, however, we don't ensure the final list is ordered To test: 1 - Find a title with items from two different libraries 2 - Create two library groups and select 'is local hold group' 3 - Place the libraries of the items in separate groups with differing libraries 4 - Attempt to place a hold for the title in the staff client 5 - Note the "Pickup at" list is not in alphabetical order 6 - Apply patch 7 - Restart all and reload 8 - Pickup locations are now sorted correctly Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Oh, missing a step in the test plan. One must set one's hold pickup branch policy to Item's Hold Group.
a jQuery bandaid in the meantime: if ( $('#circ_request').length ) { var select = $('#pickup'); select.html(select.find('option').sort(function(x, y) { return $(x).text() > $(y).text() ? 1 : -1; })); }
Created attachment 113017 [details] [review] Bug 26925: Sort pickup locations for biblio Currently we fetch the pickup locations for each item on the biblio, then we remove duplicates. Each items locations are sorted alphabetically, however, we don't ensure the final list is ordered To test: 1 - Find a title with items from two different libraries 2 - Create two library groups and select 'is local hold group' 3 - Place the libraries of the items in separate groups with differing libraries 4 - Attempt to place a hold for the title in the staff client 5 - Note the "Pickup at" list is not in alphabetical order 6 - Apply patch 7 - Restart all and reload 8 - Pickup locations are now sorted correctly Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Patch no longer applies, please rebase!
*** This bug has been marked as a duplicate of bug 28202 ***