Bugzilla – Attachment 46950 Details for
Bug 15354
item types aren't showing in default hold policies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page
PASSED-QA-Bug-15354-Sort-itemtypes-by-translated-d.patch (text/plain), 1.83 KB, created by
Katrin Fischer
on 2016-01-19 22:27:38 UTC
(
hide
)
Description:
[PASSED QA] Bug 15354: Sort itemtypes by translated description everywhere on circ rules admin page
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-01-19 22:27:38 UTC
Size:
1.83 KB
patch
obsolete
>From 7cae809aa26c1f1ac92fb3eb979c38b22fb95d52 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 4 Jan 2016 10:02:06 +0000 >Subject: [PATCH] [PASSED QA] Bug 15354: Sort itemtypes by translated > description everywhere on circ rules admin page > >It's better to cmp on lc. > >Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> >Passes QA tools. Fixes sorting of dropdown for translated itemtype >descriptions. > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/smart-rules.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 8221a0d..5be4c0a 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -440,6 +440,7 @@ while (my $data=$sth->fetchrow_hashref){ > $sth->finish; > my @row_loop; > my @itemtypes = @{ GetItemTypes( style => 'array' ) }; >+@itemtypes = sort { lc $a->{translated_description} cmp lc $b->{translated_description} } @itemtypes; > > my $sth2 = $dbh->prepare(" > SELECT issuingrules.*, >@@ -543,7 +544,7 @@ my @branch_item_rules = (); > while (my $row = $sth_branch_item->fetchrow_hashref) { > push @branch_item_rules, $row; > } >-my @sorted_branch_item_rules = sort { $a->{translated_description} cmp $b->{translated_description} } @branch_item_rules; >+my @sorted_branch_item_rules = sort { lc $a->{translated_description} cmp lc $b->{translated_description} } @branch_item_rules; > > # note undef holdallowed so that template can deal with them > foreach my $entry (@sorted_branch_item_rules) { >@@ -622,6 +623,6 @@ sub by_itemtype { > } elsif ($b->{'default_translated_description'}) { > return -1; > } else { >- return $a->{'translated_description'} cmp $b->{'translated_description'}; >+ return lc $a->{'translated_description'} cmp lc $b->{'translated_description'}; > } > } >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15354
:
45609
|
45632
|
45633
|
45716
|
46222
|
46281
|
46282
|
46283
|
46949
| 46950 |
46951