Description
Paul Poulain
2011-01-19 20:47:10 UTC
Created attachment 3006 [details] [review] patch Patch pushed, please test This bug is mentioned in: Bug 5634: BZ5634 order branch list alphabetically, without taking care of uc/lc http://lists.koha-community.org/pipermail/koha-patches/2011-January/013676.html Created attachment 3213 [details]
Screenshot of incorrect sort
Created attachment 3214 [details]
Screenshot of correct sort
The accepted patch fixes instances where the branch list is generated by GetBranchesLoop. Other branch lists are unaffected and will still show an incorrect sort. I think this bug should remain open until all instances are consistent.
Created attachment 3215 [details]
Branch order on login page still incorrect
The order of branches on the login page is not only sorted incorrectly with regard to case but is ordered by branchcode instead of branch name (ALB, APL, COV, CPL, GPL, NPL, PPL, and goodwin in the example screenshot).
Created attachment 3216 [details]
Branch sort on patron entry screen still incorrect
Created attachment 14200 [details] [review] Follow-up Bug 5634: Ordering branches should be case independent This patch fix the order of branches in the log-in page, on Branch.pm we added the variable branchcode to the hash returned by GetBranchesLoop, and this function is used on Auth.pm to get a list of branches ordered by branchname To test 1) Use an installation with some branches 2) On login screen the branches are ordered by branchcode 3) apply the patch 4) On login screen the branches are now ordered by branchname Created attachment 14201 [details] [review] Follow-up Bug 5634: Ordering branches should be case independent This patch fix the order of branches in the log-in page, on Branch.pm we added the variable branchcode to the hash returned by GetBranchesLoop, and this function is used on Auth.pm to get a list of branches ordered by branchname To test 1) Use an installation with some branches 2) On login screen the branches are ordered by branchcode 3) apply the patch 4) On login screen the branches are now ordered by branchname Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> QA Comments: The odications in C4/Branch.pm are just in order to not use the default variable ($_). On the login page we call the GetBranchesLoop routine. Marked as Passed QA. Created attachment 14220 [details] [review] Follow-up Bug 5634: Ordering branches should be case independent This patch fix the order of branches in the log-in page, on Branch.pm we added the variable branchcode to the hash returned by GetBranchesLoop, and this function is used on Auth.pm to get a list of branches ordered by branchname To test 1) Use an installation with some branches 2) On login screen the branches are ordered by branchcode 3) apply the patch 4) On login screen the branches are now ordered by branchname Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> This patch works as expected. Before applying the patch the branches with lower case was at the end of the list. Now they are well ordered. This patch has been pushed to master. Created attachment 14505 [details] [review] Bug 5634 - Followup - Ordering branches should be case independent This followup replace use of CGI::scroll_list() to show list of branches. In two files, marc21_linking_section.pl and unimarc_field_4XX.pl, the scrolling list is created but not used in the template file, so the code is removed. Also minor renaming/normalizing of variables. To test: 1) Install with some branches, records and patrons 2.1) Select a record, click 'Place hold', select user, there is a pull-down next to 'Pickup at:', list is ordered case sensitive 2.2) Go to Reports > Average loan time, next to Library is a pull-down, list without order 2.3) Go to Reports > Catalog by item type, next to 'Select a library' is a pull-down, list is ordered case sensitive 2.4) This is tricky, go to Reports home, change last part of URL 'reports-home.pl' with 'manager.pl?report_name=issues_by_borrower_category' (can't find a direct link), next to 'Select a library' is a library pull-down, list without order 2.5) Edit/Add a patron, on section 'Library management' there is a library pull-down, case sensitive 2.6) OPAC, as logged user, make a suggestion or hold, there is library pull-down, correct order 3) Apply the patch 4.1) Repeat 2.1), correctly ordered list 4.2) Repeat 2.2), correctly ordered list 4.3) Repeat 2.3), correctly ordered list 4.4) Repeat 2.4), correctly ordered list 4.5) This is a bit more work There are 3 possible situations to test: A) No branches, must show a message that are no libraries defined B) New patron, must show a correctly ordered list of branches, current branch selected C) Edit patron, must show a correctly ordered list of branches, patron branch selected 4.6) Small changes on variable names, so retest 2.6) Hi Bernardo, Could you create a new bug and submit your patch in it please? Since this patch has been pushed to master, all new followups must be proposed in a new bug. Thanks. Ok, no problem for me. A new bug is cleaner, but this patch do not solve all cases. So, have to be several patches and/or bugs. Works on master Patch submitted on bug 9457 |