[Bug 11491] New: Extending report service to have header
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Bug ID: 11491 Summary: Extending report service to have header Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: mtompset@hotmail.com QA Contact: testopia@bugs.koha-community.org The report service URL generates JSON, but has no header information. It would be nice to have: https://.../cgi-bin/koha/svc/report?id=15 Return just the JSON with no header entry, and: https://.../cgi-bin/koha/svc/report?id=15&header=1 Return the JSON with the first entry as a header entry. And while I'm at it, I'll update the license and strict/warnings to Modern::Perl. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24000 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24000&action=edit Bug 11491 - Old License and strict, warnings Replaced License text with latest one from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence and tweaked copyright lines accordingly. Also changed use strict and use warnings into use Modern::Perl as per PERL2 from the coding guidelines. TEST PLAN --------- 1) less ~/kohaclone/opac/svc/report - The license does not reflect the current license - This will have use strict and use warnings 2) Apply patch - The license should be corrected 3) It should still run https://.../cgi-bin/koha/svc/report?id=## https://.../cgi-bin/koha/svc/report?id=##&header=blah Where ## reflects a public report available. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |mtompset@hotmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24001 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24001&action=edit Bug 11491 - Missing header fields in JSON data Added a header parameter, which when non-empty will add the header fields of the query in question as the first element of the JSON array. TEST PLAN --------- 1) Log into staff client 2) Reports 3) Used save reports 4) Click the Action button on any report 5) Click Edit 6) Make the report public 7) Update the SQL 8) Note the ID number of the report 9) In a new tab https://.../cgi-bin/koha/svc/report?id=## 10) The returned JSON should not have a header. 11) Go to https://.../cgi-bin/koha/svc/report?id=##&header=1 12) The returned JSON should have a header. 13) ~/qa-test-tools/koha-qa.pl -v 2 -c 2 NOTE: There are two patches, but you could just test 1. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24000|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24002 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24002&action=edit Bug 11491 - Old License and strict, warnings Replaced License text with latest one from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence and tweaked copyright lines accordingly. Also changed use strict and use warnings into use Modern::Perl as per PERL2 from the coding guidelines. TEST PLAN --------- 1) less ~/kohaclone/opac/svc/report - The license does not reflect the current license - This will have use strict and use warnings 2) Apply patch - The license should be corrected 3) It should still run https://.../cgi-bin/koha/svc/report?id=## https://.../cgi-bin/koha/svc/report?id=##&header=blah Where ## reflects a public report available. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |h.meissner.82@web.de --- Comment #4 from Holger Meißner <h.meissner.82@web.de> --- In the test plans, did you mean: https://.../cgi-bin/koha/opac/svc/report?id=## Not: https://.../cgi-bin/koha/svc/report?id=## ? Or should kohaclone/svc/report also add headers? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- The ... is the OPAC reference, so the svc maps accordingly based on the Apache configuration. There is no reason to do it for the staff client, since I don't expect people to try to make public reports run from the staff client. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Is there a reason that private reports should not have headers? :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, I just double checked - it's possible to run the report from the staff URL, so you will only get access to the data when you are logged in. I can see use cases for that when you want to make sensitive data available to another service. I think it would make sense to add the headers to both. Example URL: <staffurl>/cgi-bin/koha/svc/report?id=3 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24001|0 |1 is obsolete| | --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24909 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24909&action=edit Bug 11491 - Missing header fields in JSON data Added a header parameter, which when non-empty will add the header fields of the query in question as the first element of the JSON array. Added header ability to staff svc/report as well. Moved code around to make diffs between svc/report and opac/svc/report smaller. TEST PLAN --------- 1) Log into staff client 2) Reports 3) Used save reports 4) Click the Action button on any report 5) Click Edit 6) Make the report public 7) Update the SQL 8) Note the ID number of the report 9) In a new tab https://.../cgi-bin/koha/svc/report?id=## 10) The returned JSON should not have a header. 11) Go to https://.../cgi-bin/koha/svc/report?id=##&header=1 12) The returned JSON should have a header. 13) ~/qa-test-tools/koha-qa.pl -v 2 -c 2 NOTE: There are two patches, but you could just test 1. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24002|0 |1 is obsolete| | --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24910 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24910&action=edit Bug 11491 - Old License and strict, warnings Replaced License text with latest one from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence and tweaked copyright lines accordingly. Also changed use strict and use warnings into use Modern::Perl as per PERL2 from the coding guidelines. TEST PLAN --------- 1) less ~/kohaclone/opac/svc/report - The license does not reflect the current license - This will have use strict and use warnings 2) Apply patch - The license should be corrected 3) It should still run https://.../cgi-bin/koha/svc/report?id=## https://.../cgi-bin/koha/svc/report?id=##&header=blah Where ## reflects a public report available (for OPAC). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |chris@bigballofwax.co.nz --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- I think changing it to be my $lines = $sth->fetchall_arrayref({}); Which hands back an array of hashrefs is nicer, the JSON output of it is also a lot nicer and a lot easier to deal with in Javascript. Shall I do a counter patch? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24909|0 |1 is obsolete| | --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24911 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24911&action=edit Bug 11491 - Missing field names in JSON data Added a parameter (annotated), which when non-empty will generate an array of hashes that include the field names as keys, not the typical array of field values, for the JSON output. Added functionality to staff svc/report as well. Moved code around to make diffs between svc/report and opac/svc/report smaller. TEST PLAN --------- 1) Apply the patch 2) ~/qa-test-tools/koha-qa.pl -v 2 -c 2 NOTE: There are two patches, but you could just test 1. 3) Log into staff client 4) Reports 5) Used save reports 6) Click the Action button on any report WITHOUT PARAMETERS. -- with parameters blows up in master and this. 7) Click Edit 8) Make the report public 9) Update the SQL 10) Note the ID number of the report 11) Note the ID number of a non-public report 12) In a new tab use the number from step 9. https://OPAC/cgi-bin/koha/svc/report?id=## -- matches default master report. https://OPAC/cgi-bin/koha/svc/report?id=##&annotated=1 -- has hash where the keys are the field name. https://STAFF/cgi-bin/koha/svc/report?id=## -- matches default master report. https://STAFF/cgi-bin/koha/svc/report?id=##&annotated=1 -- has hash where the keys are the field name. 13) In a new tab use the number from step 10. https://OPAC/cgi-bin/koha/svc/report?id=## -- matches the warning from master. https://OPAC/cgi-bin/koha/svc/report?id=##&annotated=1 -- matches the warning from master. https://STAFF/cgi-bin/koha/svc/report?id=## -- matches default master report. https://STAFF/cgi-bin/koha/svc/report?id=##&annotated=1 -- has hash where the keys are the field name. 14) In a new tab use a crazy number like 9675309 such that the report does not exist. https://OPAC/cgi-bin/koha/svc/report?id=## -- tells you the report doesn't exist vs. master giving a Software error. https://OPAC/cgi-bin/koha/svc/report?id=##&annotated=1 -- tells you the report doesn't exist vs. master giving a Software error. https://STAFF/cgi-bin/koha/svc/report?id=## -- tells you the report doesn't exist vs. master giving a Software error. https://STAFF/cgi-bin/koha/svc/report?id=##&annotated=1 -- tells you the report doesn't exist vs. master giving a Software error. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24910|0 |1 is obsolete| | --- Comment #12 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24912 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24912&action=edit Bug 11491 - Old License and strict, warnings Replaced License text with latest one from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence and tweaked copyright lines accordingly. Also changed use strict and use warnings into use Modern::Perl as per PERL2 from the coding guidelines. TEST PLAN --------- 1) less ~/kohaclone/opac/svc/report - The license does not reflect the current license - This will have use strict and use warnings 2) Apply patch - The license should be corrected 3) It should still run https://.../cgi-bin/koha/svc/report?id=## https://.../cgi-bin/koha/svc/report?id=##&header=blah Where ## reflects a public report available (for OPAC). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24911|0 |1 is obsolete| | --- Comment #13 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24913 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24913&action=edit Bug 11491 - Missing field names in JSON data Added a parameter (annotated), which when non-empty will generate an array of hashes that include the field names as keys, not the typical array of field values, for the JSON output. Added functionality to staff svc/report as well. Moved code around to make diffs between svc/report and opac/svc/report smaller. TEST PLAN --------- 1) Log into staff client 2) Reports 3) Used save reports 4) Click the Action button on any report WITHOUT PARAMETERS. -- with parameters blows up in master and this. 5) Click Edit 6) Make the report public 7) Update the SQL 8) Note the ID number of the report 9) Note the ID number of a non-public report 10) Make up a crazy ID number for a non-existant report 11) In a new tab (with the appropriate edits) https://OPAC/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 9 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: Sorry this report is not public https://STAFF/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154. 12) Apply the patch 13) ~/qa-test-tools/koha-qa.pl -v 2 -c 2 -- There should be no problems. All OK. 14) In a new tab (with the appropriate edits) https://OPAC/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 9 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: Sorry this report is not public https://STAFF/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24912|0 |1 is obsolete| | --- Comment #14 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24914 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24914&action=edit Bug 11491 - Old License and strict, warnings Replaced License text with latest one from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence and tweaked copyright lines accordingly. Also changed use strict and use warnings into use Modern::Perl as per PERL2 from the coding guidelines. TEST PLAN --------- 1) less ~/kohaclone/opac/svc/report - The license does not reflect the current license - This will have use strict and use warnings 2) Apply patch - The license should be corrected 3) It should still run https://.../cgi-bin/koha/svc/report?id=## https://.../cgi-bin/koha/svc/report?id=##&header=blah Where ## reflects a public report available (for OPAC). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24913|0 |1 is obsolete| | --- Comment #15 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24915 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24915&action=edit Bug 11491 - Missing field names in JSON data Added a parameter (annotated), which when non-empty will generate an array of hashes that include the field names as keys, not the typical array of field values, for the JSON output. Added functionality to staff svc/report as well. Moved code around to make diffs between svc/report and opac/svc/report smaller. TEST PLAN --------- 1) Log into staff client 2) Reports 3) Used save reports 4) Click the Action button on any report WITHOUT PARAMETERS. -- with parameters blows up in master and this. 5) Click Edit 6) Make the report public 7) Update the SQL 8) Note the ID number of the report 9) Note the ID number of a non-public report 10) Make up a crazy ID number for a non-existant report 11) In a new tab (with the appropriate edits) https://OPAC/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 9 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: Sorry this report is not public https://STAFF/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154. 12) Apply the patch 13) ~/qa-test-tools/koha-qa.pl -v 2 -c 2 -- There should be no problems. All OK. 14) In a new tab (with the appropriate edits) https://OPAC/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of hashes with field names as keys https://OPAC/cgi-bin/koha/svc/report?id=# from step 9 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: There is no such report. https://OPAC/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: There is no such report. https://STAFF/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of hashes with field names as keys https://STAFF/cgi-bin/koha/svc/report?id=# from step 9 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- JSON data has arrays of hashes with field names as keys https://STAFF/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: There is no such report. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: There is no such report. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24914|0 |1 is obsolete| | --- Comment #16 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24916 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24916&action=edit Bug 11491 - Old License and strict, warnings Replaced License text with latest one from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence and tweaked copyright lines accordingly. Also changed use strict and use warnings into use Modern::Perl as per PERL2 from the coding guidelines. TEST PLAN --------- 1) less ~/kohaclone/opac/svc/report - The license does not reflect the current license - This will have use strict and use warnings 2) Apply patch - The license should be corrected 3) It should still run https://.../cgi-bin/koha/svc/report?id=## https://.../cgi-bin/koha/svc/report?id=##&header=blah Where ## reflects a public report available (for OPAC). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24916|0 |1 is obsolete| | --- Comment #17 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 24917 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24917&action=edit Bug 11491 - Old License and strict, warnings Replaced License text with latest one from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence and tweaked copyright lines accordingly. Also changed use strict and use warnings into use Modern::Perl as per PERL2 from the coding guidelines. TEST PLAN --------- 1) less ~/kohaclone/opac/svc/report - The license does not reflect the current license - This will have use strict and use warnings 2) Apply patch - The license should be corrected 3) It should still run https://.../cgi-bin/koha/svc/report?id=## https://.../cgi-bin/koha/svc/report?id=##&annotated=blah Where ## reflects a public report available (for OPAC). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 --- Comment #18 from M. Tompsett <mtompset@hotmail.com> --- Test plans for each patch are in the patch. See comment 15 and comment 17. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24915|0 |1 is obsolete| | --- Comment #19 from Holger Meißner <h.meissner.82@web.de> --- Created attachment 24923 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24923&action=edit Bug 11491 - Missing field names in JSON data Added a parameter (annotated), which when non-empty will generate an array of hashes that include the field names as keys, not the typical array of field values, for the JSON output. Added functionality to staff svc/report as well. Moved code around to make diffs between svc/report and opac/svc/report smaller. TEST PLAN --------- 1) Log into staff client 2) Reports 3) Used save reports 4) Click the Action button on any report WITHOUT PARAMETERS. -- with parameters blows up in master and this. 5) Click Edit 6) Make the report public 7) Update the SQL 8) Note the ID number of the report 9) Note the ID number of a non-public report 10) Make up a crazy ID number for a non-existant report 11) In a new tab (with the appropriate edits) https://OPAC/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 9 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: Sorry this report is not public https://STAFF/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this) at /usr/share/perl5/JSON.pm line 154. 12) Apply the patch 13) ~/qa-test-tools/koha-qa.pl -v 2 -c 2 -- There should be no problems. All OK. 14) In a new tab (with the appropriate edits) https://OPAC/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://OPAC/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of hashes with field names as keys https://OPAC/cgi-bin/koha/svc/report?id=# from step 9 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- Software error: Sorry this report is not public https://OPAC/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: There is no such report. https://OPAC/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: There is no such report. https://STAFF/cgi-bin/koha/svc/report?id=# from step 8 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 8&annotated=1 -- JSON data has arrays of hashes with field names as keys https://STAFF/cgi-bin/koha/svc/report?id=# from step 9 -- JSON data has arrays of field values. https://STAFF/cgi-bin/koha/svc/report?id=# from step 9&annotated=1 -- JSON data has arrays of hashes with field names as keys https://STAFF/cgi-bin/koha/svc/report?id=# from step 10 -- Software error: There is no such report. https://STAFF/cgi-bin/koha/svc/report?id=# from step 10&annotated=1 -- Software error: There is no such report. Signed-off-by: Holger Meißner <h.meissner.82@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24917|0 |1 is obsolete| | --- Comment #20 from Holger Meißner <h.meissner.82@web.de> --- Created attachment 24924 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24924&action=edit Bug 11491 - Old License and strict, warnings Replaced License text with latest one from http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence and tweaked copyright lines accordingly. Also changed use strict and use warnings into use Modern::Perl as per PERL2 from the coding guidelines. TEST PLAN --------- 1) less ~/kohaclone/opac/svc/report - The license does not reflect the current license - This will have use strict and use warnings 2) Apply patch - The license should be corrected 3) It should still run https://.../cgi-bin/koha/svc/report?id=## https://.../cgi-bin/koha/svc/report?id=##&annotated=blah Where ## reflects a public report available (for OPAC). Signed-off-by: Holger Meißner <h.meissner.82@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 --- Comment #21 from Holger Meißner <h.meissner.82@web.de> --- Works as described. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24923|0 |1 is obsolete| | CC| |kyle@bywatersolutions.com --- Comment #22 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 24960 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24960&action=edit 24923: Bug 11491 - Missing field names in JSON data -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24924|0 |1 is obsolete| | --- Comment #23 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 24961 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24961&action=edit 24924: Bug 11491 - Old License and strict, warnings -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24960|0 |1 is patch| | Attachment #24960|application/mbox |text/plain mime type| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #24 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Mark! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11491 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Extending report service to |Extending report service to |have header |be annotated -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org