Bugzilla – Attachment 116461 Details for
Bug 27454
Additional patron attributes change sequence on every reload of edit page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27454: Add sorting of patron attributes
Bug-27454-Add-sorting-of-patron-attributes.patch (text/plain), 1.65 KB, created by
Katrin Fischer
on 2021-02-07 11:35:22 UTC
(
hide
)
Description:
Bug 27454: Add sorting of patron attributes
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-02-07 11:35:22 UTC
Size:
1.65 KB
patch
obsolete
>From 7ba562e4a2a9e57f5568574bc99f86c52cd31bec Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 18 Jan 2021 10:21:28 +0000 >Subject: [PATCH] Bug 27454: Add sorting of patron attributes > >This patch adds sorting on class code for the patrons attributes forms >on the memberentry page. > >Test plan >1) Create a couple of different patron attributes >2) Go to the patron add page >3) Note the order in which the patron attributes load at the bottom of > the page. >4) Reload the page and note the order of those attribues may change (if > it doesn't, try reloading again.. it's random) >5) Apply the patch >6) Reload the page a few times and confirm the attributes are now > ordered. >7) Signoff > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > members/memberentry.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 3fe2e97aa6..852f402bb5 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -957,12 +957,12 @@ sub patron_attributes_form { > push @{$items_by_class{$attr_type->class()}}, $newentry; > } > } >- while ( my ($class, @items) = each %items_by_class ) { >+ for my $class ( sort keys %items_by_class ) { > my $av = Koha::AuthorisedValues->search({ category => 'PA_CLASS', authorised_value => $class }); > my $lib = $av->count ? $av->next->lib : $class; > push @attribute_loop, { > class => $class, >- items => @items, >+ items => @{$items_by_class{$class}}, > lib => $lib, > } > } >-- >2.11.0
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 27454
:
115238
|
116244
|
116254
|
116291
|
116292
| 116461 |
116462