By tweaking the GetReservedAuthorisedValues function in C4::Reports::Guided, biblio_framework can be added as a dropdown list into the guided reports parameters.
Created attachment 32650 [details] [review] Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports By tweaking the GetReservedAuthorisedValues function in C4::Reports::Guided, biblio_framework can be added as a dropdown list into the guided reports parameters. The change in C4/Reports/Guided.pm required a test, which is found in t/db_dependent/ReportsGuided.t Code was then added to reports/guided_reports.pl to build the appropriate hash to trigger the proper dropdown list. TEST PLAN --------- 1) Apply patch 2) prove -v t/db_dependent/ReportsGuided.t -- all should pass, this confirms that both C4/Reports/Guided.pm and this test file work. 3) Log into staff client 4) Reports 5) Create from SQL 6) Enter appropriate information like: Report name: Test 13141 -- no need to change Report group or Report is public or Notes or Type SQL: SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=',biblio.biblionumber,'\">',biblio.biblionumber,'</a>') AS BiblioNumbers, title, author, frameworkcode FROM biblio WHERE frameworkcode=<<Enter the frameworkcode|biblio_framework>> 7) Save report 8) Run report -- The parameter entry page should have a drop down of framework codes. 9) Select a framework code, and click Run the report -- The displayed SQL should have a "frameworkcode=" portion matching the selected framework. 10) Run the koha qa test tool.
Created attachment 32664 [details] [review] [SIGNED-OFF] Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports By tweaking the GetReservedAuthorisedValues function in C4::Reports::Guided, biblio_framework can be added as a dropdown list into the guided reports parameters. The change in C4/Reports/Guided.pm required a test, which is found in t/db_dependent/ReportsGuided.t Code was then added to reports/guided_reports.pl to build the appropriate hash to trigger the proper dropdown list. TEST PLAN --------- 1) Apply patch 2) prove -v t/db_dependent/ReportsGuided.t -- all should pass, this confirms that both C4/Reports/Guided.pm and this test file work. 3) Log into staff client 4) Reports 5) Create from SQL 6) Enter appropriate information like: Report name: Test 13141 -- no need to change Report group or Report is public or Notes or Type SQL: SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=', biblio.biblionumber,'\">',biblio.biblionumber,'</a>') AS BiblioNumbers, title, author, frameworkcode FROM biblio WHERE frameworkcode=<<Enter the frameworkcode|biblio_framework>> 7) Save report 8) Run report -- The parameter entry page should have a drop down of framework codes. 9) Select a framework code, and click Run the report -- The displayed SQL should have a "frameworkcode=" portion matching the selected framework. 10) Run the koha qa test tool. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Test plan followed successfully.
Created attachment 32677 [details] [review] [PASSED QA] Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports By tweaking the GetReservedAuthorisedValues function in C4::Reports::Guided, biblio_framework can be added as a dropdown list into the guided reports parameters. The change in C4/Reports/Guided.pm required a test, which is found in t/db_dependent/ReportsGuided.t Code was then added to reports/guided_reports.pl to build the appropriate hash to trigger the proper dropdown list. TEST PLAN --------- 1) Apply patch 2) prove -v t/db_dependent/ReportsGuided.t -- all should pass, this confirms that both C4/Reports/Guided.pm and this test file work. 3) Log into staff client 4) Reports 5) Create from SQL 6) Enter appropriate information like: Report name: Test 13141 -- no need to change Report group or Report is public or Notes or Type SQL: SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=', biblio.biblionumber,'\">',biblio.biblionumber,'</a>') AS BiblioNumbers, title, author, frameworkcode FROM biblio WHERE frameworkcode=<<Enter the frameworkcode|biblio_framework>> 7) Save report 8) Run report -- The parameter entry page should have a drop down of framework codes. 9) Select a framework code, and click Run the report -- The displayed SQL should have a "frameworkcode=" portion matching the selected framework. 10) Run the koha qa test tool. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Test plan followed successfully. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 32678 [details] [review] [PASSED QA] Bug 13141 [QA Followup] - Update number of unit tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(In reply to Kyle M Hall from comment #4) > Created attachment 32678 [details] [review] [review] > [PASSED QA] Bug 13141 [QA Followup] - Update number of unit tests > > Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Sorry, but your patch needs fixing. Try testing it on a system without DBD::Mock of the right version. -- like under Ubuntu. :) I was trying to figure out why Ubuntu was 12, and Debian was 13. Then I realized the skip count was wrong. :)
Created attachment 32688 [details] [review] Bug 13141 [QA Followup] - Update number of unit tests While updating the number of unit tests from 12 to 13, the number of tests to skip due to a outdated version of DBD::Mock was missed. This patch retains the test number change, and corrects the number of tests. TEST PLAN --------- 1) prove -v t/db_dependent/ReportsGuided.t -- on an UBUNTU git (lacks DBD::Mock >= 1.45) 2) prove -v t/db_dependent/ReportsGuided.t -- on a DEBIAN git (has DBD::Mock >= 1.45) 3) compare results. -- skipped tests should be 8 (2 individual tests + 6 in the loop) under Ubuntu. -- non-skipped tests should align. -- everything should be 13 tests. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(In reply to M. Tompsett from comment #6) > Created attachment 32688 [details] [review] [review] > Bug 13141 [QA Followup] - Update number of unit tests > [SNIP] > > Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> It's not really signed off by Kyle. I forgot to remove that. I did a git commit --amend with the skip fix. That's why it needs testing and a sign of as per comment #6.
I think the small mistake on the tests count/skip shouldn't prevent this patch from being passed-qa. Kyle, would you agree it is passed qa? (Mark just amended your QA followup).
Created attachment 32960 [details] [review] [PASSED QA] Bug 13141: Add ability for biblio_framework to be a dropdown in Guided Reports By tweaking the GetReservedAuthorisedValues function in C4::Reports::Guided, biblio_framework can be added as a dropdown list into the guided reports parameters. The change in C4/Reports/Guided.pm required a test, which is found in t/db_dependent/ReportsGuided.t Code was then added to reports/guided_reports.pl to build the appropriate hash to trigger the proper dropdown list. TEST PLAN --------- 1) Apply patch 2) prove -v t/db_dependent/ReportsGuided.t -- all should pass, this confirms that both C4/Reports/Guided.pm and this test file work. 3) Log into staff client 4) Reports 5) Create from SQL 6) Enter appropriate information like: Report name: Test 13141 -- no need to change Report group or Report is public or Notes or Type SQL: SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=', biblio.biblionumber,'\">',biblio.biblionumber,'</a>') AS BiblioNumbers, title, author, frameworkcode FROM biblio WHERE frameworkcode=<<Enter the frameworkcode|biblio_framework>> 7) Save report 8) Run report -- The parameter entry page should have a drop down of framework codes. 9) Select a framework code, and click Run the report -- The displayed SQL should have a "frameworkcode=" portion matching the selected framework. 10) Run the koha qa test tool. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Test plan followed successfully. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Created attachment 32961 [details] [review] Bug 13141: (QA Followup) Update number of unit tests While updating the number of unit tests from 12 to 13, the number of tests to skip due to a outdated version of DBD::Mock was missed. This patch retains the test number change, and corrects the number of tests. TEST PLAN --------- 1) prove -v t/db_dependent/ReportsGuided.t -- on an UBUNTU git (lacks DBD::Mock >= 1.45) 2) prove -v t/db_dependent/ReportsGuided.t -- on a DEBIAN git (has DBD::Mock >= 1.45) 3) compare results. -- skipped tests should be 8 (2 individual tests + 6 in the loop) under Ubuntu. -- non-skipped tests should align. -- everything should be 13 tests. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Created attachment 33003 [details] [review] [PASSED QA] Bug 13141: Add ability for biblio_framework to be a dropdown in Guided Reports By tweaking the GetReservedAuthorisedValues function in C4::Reports::Guided, biblio_framework can be added as a dropdown list into the guided reports parameters. The change in C4/Reports/Guided.pm required a test, which is found in t/db_dependent/ReportsGuided.t Code was then added to reports/guided_reports.pl to build the appropriate hash to trigger the proper dropdown list. TEST PLAN --------- 1) Apply patch 2) prove -v t/db_dependent/ReportsGuided.t -- all should pass, this confirms that both C4/Reports/Guided.pm and this test file work. 3) Log into staff client 4) Reports 5) Create from SQL 6) Enter appropriate information like: Report name: Test 13141 -- no need to change Report group or Report is public or Notes or Type SQL: SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=', biblio.biblionumber,'\">',biblio.biblionumber,'</a>') AS BiblioNumbers, title, author, frameworkcode FROM biblio WHERE frameworkcode=<<Enter the frameworkcode|biblio_framework>> 7) Save report 8) Run report -- The parameter entry page should have a drop down of framework codes. 9) Select a framework code, and click Run the report -- The displayed SQL should have a "frameworkcode=" portion matching the selected framework. 10) Run the koha qa test tool. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Test plan followed successfully. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 33004 [details] [review] [PASSED QA] Bug 13141: (QA Followup) Update number of unit tests While updating the number of unit tests from 12 to 13, the number of tests to skip due to a outdated version of DBD::Mock was missed. This patch retains the test number change, and corrects the number of tests. TEST PLAN --------- 1) prove -v t/db_dependent/ReportsGuided.t -- on an UBUNTU git (lacks DBD::Mock >= 1.45) 2) prove -v t/db_dependent/ReportsGuided.t -- on a DEBIAN git (has DBD::Mock >= 1.45) 3) compare results. -- skipped tests should be 8 (2 individual tests + 6 in the loop) under Ubuntu. -- non-skipped tests should align. -- everything should be 13 tests. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patches pushed to master. Thanks Mark!