Bugzilla – Attachment 91422 Details for
Bug 13552
Add debar option to batch patron modification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13552: Add debar option to batch patron modification
Bug-13552-Add-debar-option-to-batch-patron-modific.patch (text/plain), 5.72 KB, created by
Alex Buckley
on 2019-07-09 06:19:05 UTC
(
hide
)
Description:
Bug 13552: Add debar option to batch patron modification
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2019-07-09 06:19:05 UTC
Size:
5.72 KB
patch
obsolete
>From e7320f5125027d4d12452bf01b556651ff105cab Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Tue, 9 Jul 2019 06:02:01 +0000 >Subject: [PATCH] Bug 13552: Add debar option to batch patron modification > >Test plan: >1. Go to Tools > Batch patron modification > >2. Input the cardnumbers of several (undebarred/unrestricted) patrons and submit > >3. Notice there is no input for setting a debarred until (restriction >expiration) date or debar comment > >Also notice in the list of matching borrowers at the top of the page >there is no display of the debarred or debarredcomment values for the >patron > >4. Apply patch > >5. Restart memcached and plack > >6. Refresh the page notice 'Debarred till' (a date picker input) and >'Debarred comment' are now input options > >Also notice in the table at the top of the page 'Debarred till' and >'Debarred comment' are shown on the far right of the table (you may need >to scroll to see this) > >7. Pick a date in the 'Debarred till' datepicker and write in text into >the 'Debarred comment' field and submit > >8. Notice in the next loaded page the selected patrons have the >'Debarred till' and 'Debarred comment' values you entered > >9. Click on the cardnumber link of one of the patrons and notice the red >text on their patron account page informing you they are restricted >until the date you set > >10. In the Koha home directory enter Koha shell: >sudo koha-shell <instancename> > >11. Run: prove xt > >12. Confirm all tests pass > >13. Sign off > >Sponsored-By: Brimbank Library, Australia >--- > .../intranet-tmpl/prog/en/modules/tools/modborrowers.tt | 8 ++++++++ > tools/modborrowers.pl | 16 ++++++++++++++-- > 2 files changed, 22 insertions(+), 2 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 f976bda..d68621d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -149,6 +149,8 @@ > <th class="title-string">Expiry date</th> > <th>Circulation note</th> > <th>Opac Note</th> >+ <th>Debarred till</th> >+ <th>Debarred comment</th> > [% FOREACH attrh IN attributes_header %] > <th>[% attrh.attribute | html %]</th> > [% END %] >@@ -173,6 +175,8 @@ > <td><span title="[% borrower.dateexpiry | html %]">[% borrower.dateexpiry | $KohaDates %]</span></td> > <td>[% borrower.borrowernotes | html %]</td> > <td>[% borrower.opacnote | html %]</td> >+ <td><span title="[% borrower.debarred | html %]">[% borrower.debarred | $KohaDates %]</span></td> >+ <td>[% borrower.debarredcomment | html %]</td> > [% FOREACH pa IN borrower.patron_attributes %] > [% IF ( pa.code ) %] > <td>[% pa.code | html %]=[% pa.value | html %]</td> >@@ -229,6 +233,10 @@ > Circulation note: > [% CASE 'opacnote' %] > OPAC note: >+ [% CASE 'debarred' %] >+ Debarred till: >+ [% CASE 'debarredcomment' %] >+ Debarred comment: > [% END %] > </label> > [% IF ( field.type == 'text' ) %] >diff --git a/tools/modborrowers.pl b/tools/modborrowers.pl >index fb672a6..e6796cd 100755 >--- a/tools/modborrowers.pl >+++ b/tools/modborrowers.pl >@@ -262,6 +262,18 @@ if ( $op eq 'show' ) { > type => "text", > mandatory => ( grep /opacnote/, @mandatoryFields ) ? 1 : 0, > } >+ , >+ { >+ name => "debarred", >+ type => "date", >+ mandatory => ( grep /debarred/, @mandatoryFields ) ? 1 : 0, >+ } >+ , >+ { >+ name => "debarredcomment", >+ type => "text", >+ mandatory => ( grep /debarredcomment/, @mandatoryFields ) ? 1 : 0, >+ }, > ); > > $template->param('patron_attributes_codes', \@patron_attributes_codes); >@@ -275,13 +287,13 @@ 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/ ) { >+ for my $field ( qw/surname firstname branchcode categorycode city state zipcode country sort1 sort2 dateenrolled dateexpiry borrowernotes opacnote debarred debarredcomment/ ) { > my $value = $input->param($field); > $infos->{$field} = $value if $value; > $infos->{$field} = "" if grep { /^$field$/ } @disabled; > } > >- for my $field ( qw( dateenrolled dateexpiry ) ) { >+ for my $field ( qw( dateenrolled dateexpiry debarred ) ) { > $infos->{$field} = dt_from_string($infos->{$field}) if $infos->{$field}; > } > >-- >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 13552
:
91422
|
91425
|
91433
|
91950
|
91951
|
92103
|
92104