Bugzilla – Attachment 153065 Details for
Bug 27824
Report batch operations break with space in placeholder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27824: Trim column headers
Bug-27824-Trim-column-headers.patch (text/plain), 1.50 KB, created by
Owen Leonard
on 2023-07-05 15:49:29 UTC
(
hide
)
Description:
Bug 27824: Trim column headers
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-07-05 15:49:29 UTC
Size:
1.50 KB
patch
obsolete
>From 5b997ed2d5f46e65c1017b0d1a340a7b3edd5119 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 5 Jul 2023 15:44:50 +0200 >Subject: [PATCH] Bug 27824: Trim column headers > >To support additional spaces. > >Using the system for defining a column name placeholder (Bug 23390), if >there is a space inside the column name placeholder it won't work. The >SQL example in Bug 5697: > >SELECT >i.itemnumber, >i.itemnumber as Exemplarnummber, >[[i.itemnumber| itemnumber for batch]], >CONCAT('<a >href=\"/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=', >i.biblionumber, '&itemnumber=', i.itemnumber, '#edititem', '\">', >i.itemnumber, '</a>' ) AS "itemnumber as edit link" >FROM items i > >"[[i.itemnumber| itemnumber for batch]]" has a space before "itemnumber >for batch." With that space removed it works as expected. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > Koha/Report.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Report.pm b/Koha/Report.pm >index 937f10e917..55daece836 100644 >--- a/Koha/Report.pm >+++ b/Koha/Report.pm >@@ -140,6 +140,7 @@ sub prep_report { > { #The placeholders are always the odd elements of the array > my ( $type, $name ) = split /\|/, > $split[ $i * 2 + 1 ]; # We split them on '|' >+ $name =~ s/^\s+|\s+$//; # Trim > $headers->{$name} = $type; # Store as a lookup for the template > $headers->{$name} =~ > s/^\w*\.//; # strip the table name just as in $sth->{NAME} array >-- >2.30.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 27824
:
153059
|
153060
|
153064
|
153065
|
153220
|
153221