Bugzilla – Attachment 92429 Details for
Bug 23291
Patron batch modification based on SMS number
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23291: Retrieve all patrons with given SMS number
Bug-23291-Retrieve-all-patrons-with-given-SMS-numb.patch (text/plain), 1.58 KB, created by
Alex Buckley
on 2019-08-22 01:29:27 UTC
(
hide
)
Description:
Bug 23291: Retrieve all patrons with given SMS number
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2019-08-22 01:29:27 UTC
Size:
1.58 KB
patch
obsolete
>From f77216df15706f61f2c6eadfdbaaa5816a6972c0 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 19 Aug 2019 19:24:16 +1200 >Subject: [PATCH] Bug 23291: Retrieve all patrons with given SMS number > >--- > tools/modborrowers.pl | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl >index 8fa625b..b038214 100755 >--- a/tools/modborrowers.pl >+++ b/tools/modborrowers.pl >@@ -118,10 +118,22 @@ if ( $op eq 'show' ) { > } > } else { > for my $smsnumber (@smsnumbers ) { >- my $patron = Koha::Patrons->find( { smsalertnumber => $smsnumber } ); >+ my @patrons = Koha::Patrons->search( { smsalertnumber => $smsnumber } ); >+ my $patron; >+ my $borrowernumber; >+ my $value; >+ foreach $patron (@patrons) { >+ $patron = $patron->unblessed; >+ $value = $patron->{userid} || $patron->{borrowernumber}; >+ } >+ warn scalar @patrons; >+ >+ warn $patron; >+ > if ( $patron ) { > if ( $logged_in_user->can_see_patron_infos( $patron ) ) { > $patron = $patron->unblessed; >+ warn $patron->{borrowernumber}; > $patron->{patron_attributes} = C4::Members::Attributes::GetBorrowerAttributes( $patron->{borrowernumber} ); > $max_nb_attr = scalar( @{ $patron->{patron_attributes} } ) if scalar( @{ $patron->{patron_attributes} } ) > $max_nb_attr; > push @borrowers, $patron; >-- >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 23291
:
91436
|
92429
|
92430
|
92666
|
92667
|
93859
|
101931
|
101932
|
101933
|
112469
|
112470
|
112471
|
128641
|
128876
|
128877