Bugzilla – Attachment 32664 Details for
Bug 13141
Add ability for biblio_framework to be a dropdown in Guided Reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports
SIGNED-OFF-Bug-13141---Add-ability-for-biblioframe.patch (text/plain), 4.23 KB, created by
Owen Leonard
on 2014-10-24 13:34:23 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 13141 - Add ability for biblio_framework to be a dropdown in Guided Reports
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-10-24 13:34:23 UTC
Size:
4.23 KB
patch
obsolete
>From 17dda6342cdba40b4346931c52633b65a124534c Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 24 Oct 2014 00:20:29 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 13141 - Add ability for biblio_framework to > be a dropdown in Guided Reports >Content-Type: text/plain; charset="utf-8" > >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. >--- > C4/Reports/Guided.pm | 3 ++- > reports/guided_reports.pl | 12 +++++++++++- > t/db_dependent/ReportsGuided.t | 3 ++- > 3 files changed, 15 insertions(+), 3 deletions(-) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index f793a25..bb283fa 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -962,7 +962,8 @@ sub GetReservedAuthorisedValues { > 'branches', > 'itemtypes', > 'cn_source', >- 'categorycode' ); >+ 'categorycode', >+ 'biblio_framework' ); > > return \%reserved_authorised_values; > } >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 9fe7387..981816d 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -29,7 +29,7 @@ use C4::Output; > use C4::Dates qw/format_date/; > use C4::Debug; > use C4::Branch; # XXX subfield_is_koha_internal_p >-use C4::Koha qw/IsAuthorisedValueCategory/; >+use C4::Koha qw/IsAuthorisedValueCategory GetFrameworksLoop/; > > =head1 NAME > >@@ -644,6 +644,16 @@ elsif ($phase eq 'Run this report'){ > $authorised_lib{$itemtype} = $description; > } > } >+ elsif ( $authorised_value eq "biblio_framework" ) { >+ my $frameworks = GetFrameworksLoop(); >+ my $default_source = ''; >+ push @authorised_values,$default_source; >+ $authorised_lib{$default_source} = 'Default'; >+ foreach my $framework (@$frameworks) { >+ push @authorised_values, $framework->{value}; >+ $authorised_lib{$framework->{value}} = $framework->{description}; >+ } >+ } > elsif ( $authorised_value eq "cn_source" ) { > my $class_sources = GetClassSources(); > my $default_source = C4::Context->preference("DefaultClassificationSource"); >diff --git a/t/db_dependent/ReportsGuided.t b/t/db_dependent/ReportsGuided.t >index 200dd86..e111617 100755 >--- a/t/db_dependent/ReportsGuided.t >+++ b/t/db_dependent/ReportsGuided.t >@@ -44,7 +44,8 @@ $koha->mock( > 'branches' => 1, > 'itemtypes' => 1, > 'cn_source' => 1, >- 'categorycode' => 1 >+ 'categorycode' => 1, >+ 'biblio_framework' => 1, > ); > > my $reserved_authorised_values = GetReservedAuthorisedValues(); >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13141
:
32650
|
32664
|
32677
|
32678
|
32688
|
32960
|
32961
|
33003
|
33004