Bugzilla – Attachment 169612 Details for
Bug 37188
Batch patron modification from report results should be an option when borrowernumber is selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37188: Allow batch modification of borrowers from reports with cardnumber or borrowernumber
Bug-37188-Allow-batch-modification-of-borrowers-fr.patch (text/plain), 4.03 KB, created by
Nick Clemens (kidclamp)
on 2024-07-25 17:58:00 UTC
(
hide
)
Description:
Bug 37188: Allow batch modification of borrowers from reports with cardnumber or borrowernumber
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-07-25 17:58:00 UTC
Size:
4.03 KB
patch
obsolete
>From db3047acbff5c03e8b70686a129dbc89d919ecf6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 25 Jul 2024 17:52:03 +0000 >Subject: [PATCH] Bug 37188: Allow batch modification of borrowers from reports > with cardnumber or borrowernumber > >Some libraries do not use cardnumbers for their patrons, but would still like to be able to batch >modify patrons from reports. > >Borrowernumber is going to be authoritative - every borrower will have one - so if this column is >included in the results we should offer batch modification. If we have cardnumber, we can use that. >If we have both, we should use borrowernumber > >To test: > 1 - Write a report like: > SELECT cardnumber FROM borrowers ORDER BY rand() LIMIT 35 > 2 - Run report > 3 - Click "Batch operations.." -> "Batch patron modification" > 4 - Confirm it works > 5 - Edit report: > SELECT borrowernumber FROM borrowers ORDER BY rand() LIMIT 35 > 6 - Run report > 7 - No option for batch modifying patrons > 8 - Apply patch > 9 - Run report >10 - The option for batch modificatoin now shows >11 - Confirm both batch operation types work from report >12 - Edit report: > SELECT cardnumber,borrowernumber FROM borrowers ORDER BY rand() LIMIT 35 >13 - Run report >14 - Confirm both batch operations work >--- > .../prog/en/modules/reports/guided_reports_start.tt | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index b039bd5cf95..66285c95283 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1003,8 +1003,15 @@ > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="op" value="cud-show" /> > [% # Preserve the whitespace of the following textarea in order to format the values correctly %] >+ [%- borrowernumbers = PROCESS batch_list results=results batch_type='borrowernumber' | trim | html -%] >+ [%- IF borrowernumbers -%] >+ [%- SET batch_borrowernumbers = 1 -%] >+ <textarea style="display:none;" name="borrowernumberlist" id="borrowernumberlist"> >+ [%- borrowernumbers | html -%] >+ </textarea> >+ [%- END -%] > [%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %] >- [% IF cardnumbers %] >+ [% IF !batch_borrowernumbers && cardnumbers %] > [% SET batch_cardnumbers = cardnumbers.length %] > [% FOR b IN cardnumbers.split("\n") %] > <input type="hidden" name="cardnumber" value="[% b | uri %]" /> >@@ -1067,7 +1074,7 @@ > [% END %] > [% IF show_cardnumber_ops || show_borrowernumber_ops %] > <li class="dropdown-header">Patron records</li> >- [% IF show_cardnumber_ops %] >+ [% IF show_cardnumber_ops || show_borrowernumber_ops %] > <li> > <a href="#" data-submit="batch_patron_modification" data-toggle="tooltip" data-placement="right" title="Send visible results to batch patron modification" class="batch_op send_to_patron_mod">Batch patron modification</a> > </li> >-- >2.39.2
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 37188
:
169612
|
169726
|
169814