Bug 40939: Fix batch actions from report results

Batch patron operations are broken when using cardnumbers

From
  commit d659526b5a
  Bug 38664: Tidy the whole codebase

-                                                [%- 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 %]
+                                            [%- 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 %]

The auto tidy added the whitespaces back

This patch suggests to use TT to add the new lines.

+                                                [%- cells.cell | html -%][% "\n" | $raw %][%# We want 1 item per line, without whitespace %]

Test plan:
- save and run "SELECT cardnumber FROM borrowers"
- use the Batch Operations button to send all visible cardnumbers to batch patron modification
- see that all of your cardnumbers have been found

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d79cf5665d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Jonathan Druart 2025-10-06 09:31:47 +02:00 committed by Paul Derscheid
parent 17fb36122c
commit 37ca2fb91c
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 3 additions and 3 deletions

View File

@ -1075,9 +1075,9 @@
[%- 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 %]
[%- IF header_row.$place.cell == batch_type || header_types.item(header_row.$place.cell) == batch_type -%]
[%- cells.cell | html -%][% "\n" | $raw %][%# We want 1 item per line, without whitespace %]
[%- END -%]
[%- END %]
[%- END -%]
[% END %]