Bugzilla – Attachment 97890 Details for
Bug 20847
Add main address, phone, and mobile fields to the Batch patron modification tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20847 - Add more fields to the Batch Patron Modification tool
Bug-20847---Add-more-fields-to-the-Batch-Patron-Mo.patch (text/plain), 9.67 KB, created by
ByWater Sandboxes
on 2020-01-24 15:46:31 UTC
(
hide
)
Description:
Bug 20847 - Add more fields to the Batch Patron Modification tool
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-01-24 15:46:31 UTC
Size:
9.67 KB
patch
obsolete
>From 2faa7867ffd468403d9217c3d13b7dd71bb7758f Mon Sep 17 00:00:00 2001 >From: David Roberts <david@koha-ptfs.co.uk> >Date: Fri, 24 Jan 2020 02:15:46 +0000 >Subject: [PATCH] Bug 20847 - Add more fields to the Batch Patron Modification > tool > >This patch adds streetnumber, address, address2, phone and mobile to the >Batch Patron Modify form, also moves Primary email to a more logical >place on the page > >To test: > >1) Install patch >2) Open Batch Patron Modification tool, and input a borrowernumber to >edit >3) Add some data into the streetnumber, address, address2, phone and >mobile fields and click Save >4) These fields in the user record should now contain your data >5) Test that running the tool again with the option to delete the data >clears the fields correctly >6) Repeat steps 1-5 with a file of user borrowernumbers > >Signed-off-by: Daniel J <daniel.jones@cheshiresharedservices.gov.uk> >--- > .../prog/en/modules/tools/modborrowers.tt | 28 ++++++++++++-- > tools/modborrowers.pl | 44 ++++++++++++++++++---- > 2 files changed, 61 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index 63ad371456..adcb860fb3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -141,15 +141,20 @@ > <th>First name</th> > <th>Library</th> > <th>Patron category</th> >+ <th>Street number</th> >+ <th>Address</th> >+ <th>Address 2</th> > <th>City</th> > <th>State</th> > <th>ZIP/Postal code</th> > <th>Country</th> >+ <th>Primary email</th> >+ <th>Phone</th> >+ <th>Mobile</th> > <th class="title-string">Registration date</th> > <th class="title-string">Expiry date</th> > <th>Circulation note</th> > <th>OPAC note</th> >- <th>Primary email</th> > <th>Restriction expiration</th> > <th>Restriction comment</th> > [% FOREACH attrh IN attributes_header %] >@@ -168,15 +173,20 @@ > <td>[% borrower.firstname | html %]</td> > <td>[% Branches.GetName( borrower.branchcode ) | html %]</td> > <td>[% Categories.GetName(borrower.categorycode) | html %]</td> >+ <td>[% borrower.streetnumber | html %]</td> >+ <td>[% borrower.address | html %]</td> >+ <td>[% borrower.address2 | html %]</td> > <td>[% borrower.city | html %]</td> > <td>[% borrower.state | html %]</td> > <td>[% borrower.zipcode | html %]</td> > <td>[% borrower.country | html %]</td> >+ <td>[% borrower.email | html %]</td> >+ <td>[% borrower.phone | html %]</td> >+ <td>[% borrower.mobile | html %]</td> > <td><span title="[% borrower.dateenrolled | html %]">[% borrower.dateenrolled | $KohaDates %]</span></td> > <td><span title="[% borrower.dateexpiry | html %]">[% borrower.dateexpiry | $KohaDates %]</span></td> > <td>[% borrower.borrowernotes | html %]</td> > <td>[% borrower.opacnote | html %]</td> >- <td>[% borrower.email | html %]</td> > <td><span title="[% borrower.debarred | html %]">[% borrower.debarred | $KohaDates %]</span></td> > <td>[% borrower.debarredcomment | html %]</td> > [% FOREACH pa IN borrower.patron_attributes %] >@@ -215,6 +225,12 @@ > Library: > [% CASE 'categorycode' %] > Patron category: >+ [% CASE 'streetnumber' %] >+ Street number: >+ [% CASE 'address' %] >+ Address: >+ [% CASE 'address2' %] >+ Address 2: > [% CASE 'city' %] > City: > [% CASE 'state' %] >@@ -223,6 +239,12 @@ > ZIP/Postal code: > [% CASE 'country' %] > Country: >+ [% CASE 'email' %] >+ Primary email: >+ [% CASE 'phone' %] >+ Phone: >+ [% CASE 'mobile' %] >+ Mobile: > [% CASE 'sort1' %] > Sort 1: > [% CASE 'sort2' %] >@@ -235,8 +257,6 @@ > Circulation note: > [% CASE 'opacnote' %] > OPAC note: >- [% CASE 'email' %] >- Primary email: > [% CASE 'debarred' %] > Restriction expiration: > [% CASE 'debarredcomment' %] >diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl >index 4809362fa4..af430f5945 100755 >--- a/tools/modborrowers.pl >+++ b/tools/modborrowers.pl >@@ -203,6 +203,24 @@ if ( $op eq 'show' ) { > } > , > { >+ name => "streetnumber", >+ type => "text", >+ mandatory => ( grep /streetnumber/, @mandatoryFields ) ? 1 : 0, >+ } >+ , >+ { >+ name => "address", >+ type => "text", >+ mandatory => ( grep /address/, @mandatoryFields ) ? 1 : 0, >+ } >+ , >+ { >+ name => "address2", >+ type => "text", >+ mandatory => ( grep /address2/, @mandatoryFields ) ? 1 : 0, >+ } >+ , >+ { > name => "city", > type => "text", > mandatory => ( grep /city/, @mandatoryFields ) ? 1 : 0, >@@ -227,6 +245,24 @@ if ( $op eq 'show' ) { > } > , > { >+ name => "email", >+ type => "text", >+ mandatory => ( grep /email/, @mandatoryFields ) ? 1 : 0, >+ } >+ , >+ { >+ name => "phone", >+ type => "text", >+ mandatory => ( grep /phone/, @mandatoryFields ) ? 1 : 0, >+ } >+ , >+ { >+ name => "mobile", >+ type => "text", >+ mandatory => ( grep /mobile/, @mandatoryFields ) ? 1 : 0, >+ } >+ , >+ { > name => "sort1", > type => @sort1_option ? "select" : "text", > option => \@sort1_option, >@@ -265,12 +301,6 @@ if ( $op eq 'show' ) { > } > , > { >- name => "email", >- type => "text", >- mandatory => ( grep /email/, @mandatoryFields ) ? 1 : 0, >- } >- , >- { > name => "debarred", > type => "date", > mandatory => ( grep /debarred/, @mandatoryFields ) ? 1 : 0, >@@ -294,7 +324,7 @@ if ( $op eq 'do' ) { > > my @disabled = $input->multi_param('disable_input'); > my $infos; >- for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote email/ ) { >+ for my $field ( qw/surname firstname branchcode categorycode streetnumber address address2 city state zipcode country email phone mobile sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote/ ) { > my $value = $input->param($field); > $infos->{$field} = $value if $value; > $infos->{$field} = "" if grep { /^$field$/ } @disabled; >-- >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 20847
:
97853
|
97890
|
98022