Summary: | Framework sorting in addbook | ||
---|---|---|---|
Product: | Koha | Reporter: | Chris Cormack <chris> |
Component: | Cataloging | Assignee: | Galen Charlton <gmcharlt> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | bgkriegel, jonathan.druart, mathsabypro, nengard |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
bugfix
Bug 3549 - Framework sorting in addbook [SIGNED-OFF] Bug 3549 - Framework sorting in addbook Bug 3549 -[Revised]- Framework sorting in addbook Bug 3549 -[Revised]- Framework sorting in addbook |
Description
Chris Cormack
2010-05-21 01:12:01 UTC
This is in master, please test The original patch changes this: foreach my $thisframeworkcode ( keys %$frameworks ) { to this: foreach my $thisframeworkcode ( sort keys %$frameworks ) { ...which worka to have the framework list sorted by framework code, but since the description is what is displayed sorting by code doesn't make much sense. The actual commit made this change: foreach my $thisframeworkcode ( sort {$frameworks->{$a} cmp $frameworks->{$b}}keys %{$frameworks} ) { ...but this doesn't seem to work at all. Sorting appears random to me. Comment on attachment 1407 [details] [review] bugfix 3.0.x is no longer maintained. Marking bug obsolete. *** Bug 5469 has been marked as a duplicate of this bug. *** Created attachment 15592 [details] [review] Bug 3549 - Framework sorting in addbook Reviewing Bug 9649, this bug comes up. This patch correctly sort frameworks by description. To test: 1) Go to Cataloguing home, button 'New record' shows unordered list of frameworks 2) Apply the patch 3) refresh, the list must be correctly sorted. Created attachment 15594 [details] [review] [SIGNED-OFF] Bug 3549 - Framework sorting in addbook Reviewing Bug 9649, this bug comes up. This patch correctly sort frameworks by description. To test: 1) Go to Cataloguing home, button 'New record' shows unordered list of frameworks 2) Apply the patch 3) refresh, the list must be correctly sorted. Signed-off-by: Owen Leonard <oleonard@myacpl.org> QA comment: This patch changes the order only for 1 page. It is easy to change the sort order for all pages changing the sql query in C4::Koha::getframeworks Marked as Failed QA. Forget that, the routine returns a hashref! However the sort order is not case insensitive (uppercases are sorted before lowercase). Created attachment 15761 [details] [review] Bug 3549 -[Revised]- Framework sorting in addbook Reviewing Bug 9649, this bug comes up. This patch correctly sort frameworks by description. To test: 1) Go to Cataloguing home, button 'New record' shows unordered list of frameworks 2) Apply the patch 3) refresh, the list must be correctly sorted. Revised to sort using uppercase. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Silly mistake. Fixed Thanks Bernardo. Simple patch, it sorts framework by description. I am convinced that a rewrite of C4::Koha::getframeworks would be a good thing. It would return a arrayref (instead of a hashref) with a sorted frameworks list. But it is a bigger patch than this one. Marked as Passed QA. Created attachment 15762 [details] [review] Bug 3549 -[Revised]- Framework sorting in addbook Reviewing Bug 9649, this bug comes up. This patch correctly sort frameworks by description. To test: 1) Go to Cataloguing home, button 'New record' shows unordered list of frameworks 2) Apply the patch 3) refresh, the list must be correctly sorted. Revised to sort using uppercase. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> This patch has been pushed to master. I don't see that as an enhancement. Should be a bugfix. M. Saby |