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@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@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@esilibrary.com>
Koha is a free software integrated library system.
Koha is distributed under the GNU GPL version 3 or later.
Please read the file LICENSE for more details.
To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.
Report bugs at http://bugs.koha-community.org/
Visit the Koha Project website at http://www.koha-community.org/