Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports
Summary: Add ability for biblio_framework to be a dropdown in Guided Reports
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: M. Tompsett
QA Contact: Testopia
URL:
Whiteboard:
Keywords: rel_3_18_candidate
Depends on:
Blocks:
 
Reported: 2014-10-24 04:19 UTC by M. Tompsett
Modified: 2015-06-04 23:33 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports (4.09 KB, patch)
2014-10-24 04:31 UTC, M. Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports (4.23 KB, patch)
2014-10-24 13:34 UTC, Owen Leonard
Details | Diff | Splinter Review
[PASSED QA] Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports (4.24 KB, patch)
2014-10-24 14:24 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 13141 [QA Followup] - Update number of unit tests (721 bytes, patch)
2014-10-24 14:24 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13141 [QA Followup] - Update number of unit tests (1.48 KB, patch)
2014-10-24 18:20 UTC, M. Tompsett
Details | Diff | Splinter Review
[PASSED QA] Bug 13141: Add ability for biblio_framework to be a dropdown in Guided Reports (4.29 KB, patch)
2014-10-30 04:17 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 13141: (QA Followup) Update number of unit tests (1.53 KB, patch)
2014-10-30 04:18 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[PASSED QA] Bug 13141: Add ability for biblio_framework to be a dropdown in Guided Reports (4.34 KB, patch)
2014-10-30 21:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 13141: (QA Followup) Update number of unit tests (1.59 KB, patch)
2014-10-30 21:08 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description M. Tompsett 2014-10-24 04:19:55 UTC
By tweaking the GetReservedAuthorisedValues function in C4::Reports::Guided, biblio_framework can be added as a dropdown list into the guided reports parameters.
Comment 1 M. Tompsett 2014-10-24 04:31:10 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2014-10-24 13:34:23 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2014-10-24 14:24:17 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2014-10-24 14:24:29 UTC Comment hidden (obsolete)
Comment 5 M. Tompsett 2014-10-24 18:12:38 UTC
(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. :)
Comment 6 M. Tompsett 2014-10-24 18:20:39 UTC Comment hidden (obsolete)
Comment 7 M. Tompsett 2014-10-25 03:27:10 UTC
(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.
Comment 8 Tomás Cohen Arazi 2014-10-30 04:14:16 UTC
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).
Comment 9 Tomás Cohen Arazi 2014-10-30 04:17:49 UTC Comment hidden (obsolete)
Comment 10 Tomás Cohen Arazi 2014-10-30 04:18:02 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2014-10-30 21:08:27 UTC
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>
Comment 12 Katrin Fischer 2014-10-30 21:08:58 UTC
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>
Comment 13 Tomás Cohen Arazi 2014-10-31 16:16:15 UTC
Patches pushed to master.

Thanks Mark!