From 443c004bc64543b1755bf0579a68ef32aa36cee5 Mon Sep 17 00:00:00 2001 From: Nick Clemens 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 biblio 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 Signed-off-by: Victor Grousset/tuxayo Bug 25942: (follow-up) fix filters Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- .../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..98716fd7bf 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 @@ [% # Preserve the whitespace of the following textarea in order to format the values correctly %] - +
[% # Preserve the whitespace of the following textarea in order to format the values correctly %] - +
@@ -927,9 +931,21 @@ [% # Preserve the whitespace of the following textarea in order to format the values correctly %] - +
+ [% 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 ) %]

-- 2.39.5