Bugzilla – Attachment 97870 Details for
Bug 24305
Batch Item modification via item number in reports does not work with CONCAT in report
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24305: (QA follow-up) Strip table name in [[table.field|alias]]
Bug-24305-QA-follow-up-Strip-table-name-in-tablefi.patch (text/plain), 1.48 KB, created by
Marcel de Rooy
on 2020-01-24 11:27:54 UTC
(
hide
)
Description:
Bug 24305: (QA follow-up) Strip table name in [[table.field|alias]]
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-01-24 11:27:54 UTC
Size:
1.48 KB
patch
obsolete
>From 1ccb3360d40c693903f9ba56e49a9c4765a98316 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 24 Jan 2020 11:17:15 +0000 >Subject: [PATCH] Bug 24305: (QA follow-up) Strip table name in > [[table.field|alias]] >Content-Type: text/plain; charset=utf-8 > >When you would use the construct, you wont have batch features unless >we strip the table name. This is consistent with the $sth->{NAME} used >to fill the headers by default. > >Test plan: >Use [[items.biblionumber|bibno]] instead of items.biblionumber in a >reporting query. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > reports/guided_reports.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 5059e9502a..fa2817f1c7 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -1091,6 +1091,7 @@ sub get_prepped_report { > for(my $i=0;$i<$#split/2;$i++){ #The placeholders are always the odd elements of the array > my ($type,$name) = split /\|/,$split[$i*2+1]; # We split them on '|' > $headers->{$name} = $type; # Store as a lookup for the template >+ $headers->{$name} =~ s/^\w*\.//; # strip the table name just as in $sth->{NAME} array > $split[$i*2+1] =~ s/(\||\?|\.|\*|\(|\)|\%)/\\$1/g; #Quote any special characters so we can replace the placeholders > $name = C4::Context->dbh->quote($name); > $sql =~ s/\[\[$split[$i*2+1]\]\]/$type AS $name/; # Remove placeholders from SQL >-- >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 24305
:
96629
|
97302
|
97829
|
97866
|
97867
|
97868
|
97869
| 97870 |
98057