]> git.koha-community.org Git - koha.git/commit
Bug 23390: Introduce placeholder syntax for report column names
authorNick Clemens <nick@bywatersolutions.com>
Sat, 27 Jul 2019 13:07:18 +0000 (13:07 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 13 Aug 2019 10:46:06 +0000 (11:46 +0100)
commit90d85eaeb9cd64b7d46078daef727e38d18cf5e1
tree906c861b3f9413668a522f8289fbfe210de95818
parent0a66d33d8c5d778e3a0961cb5953e2432d9ccb65
Bug 23390: Introduce placeholder syntax for report column names

This patch adds the ability to rename columns in MySQL reports using a syntax:
[[column|alias]]

To test:
 1 - Write a report like:
     SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9'
 2 - Run report
 3 - Note you can batch modify the patrons
 4 - Update report:
     SELECT cardnumber AS library_barcode FROM borrowers WHERE cardnumber LIKE '%9'
 5 - Run report
 6 - Note batch options are no longer present
 7 - Apply patch
 8 - Run report, no change
 9 - Update report like:
     SELECT [[cardnumber|library_barcode]] FROM borrowers WHERE cardnumber LIKE '%9'
10 - Run report
11 - Batch options work!
12 - Update report like:
    SELECT cardnumber FROM borrowers WHERE cardnumber LIKE '%9'
13 - Verify batch options still work
14 - Set report 'public'
15 - Verify report can be run via JSON URLs:
     http://kohadev.mydnsname.org:8080/cgi-bin/koha/svc/report?id=1
     http://kohadev.mydnsname.org:8081/cgi-bin/koha/svc/report?id=1

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
opac/svc/report
reports/guided_reports.pl
svc/report