Bugzilla – Attachment 113783 Details for
Bug 25942
Batch biblio and borrower operations on report results should not concatenate biblio/cardnumbers into a single string
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25942: Fix batch report operations for cardnumbers and biblionumbers
Bug-25942-Fix-batch-report-operations-for-cardnumb.patch (text/plain), 5.79 KB, created by
Andrew Fuerste-Henry
on 2020-11-18 13:44:35 UTC
(
hide
)
Description:
Bug 25942: Fix batch report operations for cardnumbers and biblionumbers
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2020-11-18 13:44:35 UTC
Size:
5.79 KB
patch
obsolete
>From 5f0976e71c9476b5e38d8fcfc957d302bff5779e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 18 Nov 2020 13:29:33 +0000 >Subject: [PATCH] Bug 25942: Fix batch report operations for cardnumbers and > biblionumbers > >This patch moves the processing for these to a block and adds a comment >in place of whitespace and uses template directives to chomp newlines to improve readability > >To test: > 1 - Create a report like: > SELECT biblionumber FROM biblios > 2 - Run it > 3 - Try the various options from the 'Batch operations' button > (You will need to define a marc modification template) > 4 - The operations don't find the biblios > 5 - Create a report like: > SELECT cardnumber FROM borrowers > 6 - Run it > 7 - Test the batch operations > 8 - They fail > 9 - Apply patch >10 - Run each report again and test batch operations >11 - They work! > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > .../en/modules/reports/guided_reports_start.tt | 22 +++++++++++++++++++--- > 1 file changed, 19 insertions(+), 3 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 b6e99a8fd1..fca990ac20 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 >@@ -869,14 +869,18 @@ > <input type="hidden" name="recordtype" value="biblio" /> > <input type="hidden" name="op" value="list" /> > [% # Preserve the whitespace of the following textarea in order to format the values correctly %] >- <textarea style="display:none" name="recordnumber_list" id="recordnumber_list">[% FOREACH result IN results %][% FOREACH cells IN result.cells %][% place = loop.index %][% IF header_row.$place.cell == 'biblionumber' || header_types.item(header_row.$place.cell) == 'biblionumber' %][% cells.cell | html %][% END %][% END %][% END %]</textarea> >+ <textarea style="display:none" name="recordnumber_list" id="recordnumber_list"> >+ [%- recordnumbers = PROCESS batch_list results=results batch_type='biblionumber' | trim %][% IF recordnumbers %][% SET batch_biblionumbers = 1 %][% recordnumbers %][% END -%] >+ </textarea> > </form> > > <form method="POST" action="/cgi-bin/koha/tools/batch_delete_records.pl" id="batch_record_deletion"> > <input type="hidden" name="recordtype" value="biblio" /> > <input type="hidden" name="op" value="list" /> > [% # Preserve the whitespace of the following textarea in order to format the values correctly %] >- <textarea style="display:none" name="recordnumber_list" id="recordnumber_list">[% FOREACH result IN results %][% FOREACH cells IN result.cells %][% place = loop.index %][% IF header_row.$place.cell == 'biblionumber' || header_types.item(header_row.$place.cell) == 'biblionumber' %][% cells.cell | html %][% END %][% END %][% END %]</textarea> >+ <textarea style="display:none" name="recordnumber_list" id="recordnumber_list"> >+ [%- recordnumbers = PROCESS batch_list results=results batch_type='biblionumber' | trim %][% IF recordnumbers %][% SET batch_biblionumbers = 1 %][% recordnumbers %][% END -%] >+ </textarea> > </form> > > <form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="batch_item_modification"> >@@ -927,9 +931,21 @@ > <form method="POST" action="/cgi-bin/koha/tools/modborrowers.pl" id="batch_patron_modification"> > <input type="hidden" name="op" value="show" /> > [% # Preserve the whitespace of the following textarea in order to format the values correctly %] >- <textarea style="display:none" name="cardnumberlist" id="cardnumberlist">[% FOREACH result IN results %][% FOREACH cells IN result.cells %][% place = loop.index %][% IF header_row.$place.cell == 'cardnumber' || header_types.item(header_row.$place.cell) == 'cardnumber' %][% SET batch_cardnumbers = 1 %][% cells.cell | html %][% END %][% END %][% END %]</textarea> >+ <textarea style="display:none" name="cardnumberlist" id="cardnumberlist"> >+ [%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim %][% IF cardnumbers %][% SET batch_cardnumbers = 1 %][% cardnumbers %][% END -%] >+ </textarea> > </form> > >+ [% BLOCK batch_list %] >+ [%- FOREACH result IN results %] >+ [%- FOREACH cells IN result.cells %] >+ [%- place = loop.index %] >+ [%- IF header_row.$place.cell == $batch_type || header_types.item(header_row.$place.cell) == $batch_type %] >+[%# We must not add whitespace to the cardnumbers %][% cells.cell | html %] >+ [%- END %] >+ [%- END %] >+ [%- END -%] >+ [% END %] > [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %] > <p> > <div class="btn-group"> >-- >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 25942
:
113782
|
113783
|
113916
|
113924
|
113931
|
113932
|
113972