https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16219
Bug ID: 16219
Summary: Runreport.pl should allow sql paramters to be passed
on the command line.
Change sponsored?: ---
Product: Koha
Version: 3.18
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Command-line Utilities
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
Runreport.pl has a major limitation in that it is not capable of running
reports that use sql parameters:
Runreport will run this:
SELECT p.surname, p.firstname, p.email, p.cardnumber,
h.waitingdate AS 'hold date', i.barcode, b.title
FROM reserves h
LEFT JOIN borrowers p USING (borrowernumber)
LEFT JOIN items i USING (itemnumber)
LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber)
WHERE h.waitingdate IS NOT NULL AND h.branchcode='ABC'
but if your report looks like this:
SELECT p.surname, p.firstname, p.email, p.cardnumber,
h.waitingdate AS 'hold date', i.barcode, b.title
FROM reserves h
LEFT JOIN borrowers p USING (borrowernumber)
LEFT JOIN items i USING (itemnumber)
LEFT JOIN biblio b ON (i.biblionumber=b.biblionumber)
WHERE h.waitingdate IS NOT NULL AND h.branchcode=<<Waiting at|branches>>
We should be able to supply a --sql_params argument one or more times to
provide the sql parameters.
runreport.pl --to="[email protected]" --subject="Patrons with Holds Waiting
at Library" --format=csv --sql_params="ABC" 1
--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/