[Koha-bugs] [Bug 9915] Allow opac/svc/report to be passed sql parameters
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sun Apr 20 18:08:21 CEST 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9915
--- Comment #21 from Galen Charlton <gmcharlt at gmail.com> ---
Created attachment 27327
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27327&action=edit
Bug 9915: Allow sql_params to be passed to a report using the OPAC svc/report
interface
Test plan:
1/ Make a public report that contains SQL parameters
2/ Test it from the staff side
3/ Hit the url like
cgi-bin/koha/svc/report?id=1&sql_params=chris&sql_params=chris2
4/ Test you get JSON
Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Passes all tests and QA script.
Tested with a public report:
select * from items
- cgi-bin/koha/svc/report?id=6
- URL shows JSON and all items
select * from items where itype = <<itype>>
- cgi-bin/koha/svc/report?id=6&sql_params=BK
- URL shows JSON and only BK items
select * from items where itype = <<itype>> and homebranch = <<homebranch>>
- cgi-bin/koha/svc/report?id=6&sql_params=BK&sql_params=MPL
- URL shows JSON and only BK items in MPL
select * from items where itype = <<itype|itemtypes>> and homebranch =
<<homebranch|branches>>
- same as above
- URL shows JSON and only BK items in MPL
select * from items where dateaccessioned = 2013-12-15
-
cgi-bin/koha/svc/report?id=6&sql_params=BK&sql_params=MPL&sql_params=2013-12-15
- URL shows JSON and correct items
Note: This will currently only work for public reports!
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list