Bugzilla – Attachment 72347 Details for
Bug 20323
Batch patron modification tool broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20323: Fix batch patron modification tool
Bug-20323-Fix-batch-patron-modification-tool.patch (text/plain), 1.44 KB, created by
Josef Moravec
on 2018-03-02 10:18:29 UTC
(
hide
)
Description:
Bug 20323: Fix batch patron modification tool
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-03-02 10:18:29 UTC
Size:
1.44 KB
patch
obsolete
>From 68742160c4cbe91ba12b7dfddfaa2af0ec011182 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Fri, 2 Mar 2018 10:13:00 +0000 >Subject: [PATCH] Bug 20323: Fix batch patron modification tool > >Test plan: >1) Go to Tools -> Batch patrons modification >2) Select some patrons and try to change any field >--> without patch - it exploads with log: >Can't call method "category" on unblessed reference at /home/vagrant/kohaclone/tools/modborrowers.pl >--> with patch - the modification is properly made >--- > tools/modborrowers.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl >index 7e51a5a..586ae53 100755 >--- a/tools/modborrowers.pl >+++ b/tools/modborrowers.pl >@@ -339,8 +339,9 @@ if ( $op eq 'do' ) { > for my $borrowernumber ( @borrowernumbers ) { > my $patron = Koha::Patrons->find( $borrowernumber ); > if ( $patron ) { >+ my $category_description = $patron->category->description; > $patron = $patron->unblessed; >- $patron->{category_description} = $patron->category->description; >+ $patron->{category_description} = $category_description; > $patron->{patron_attributes} = C4::Members::Attributes::GetBorrowerAttributes( $patron->{borrowernumber} ); > $max_nb_attr = scalar( @{ $patron->{patron_attributes} } ) > if scalar( @{ $patron->{patron_attributes} } ) > $max_nb_attr; >-- >2.1.4
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 20323
:
72347
|
72384
|
72541