diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index f793a256da..bb283fa458 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 9fe73871fd..981816daad 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 200dd86bef..e1116170cf 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();