Bug 17642: [QA Follow-up] Issues_stats.pl is not plack safe
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 18 Nov 2016 07:37:07 +0000 (08:37 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 18 Nov 2016 15:52:01 +0000 (15:52 +0000)
Resolve:
Variable "$ccodes" is not available at reports/issues_stats.pl line 358.
Variable "$locations" is not available at reports/issues_stats.pl line 359.
Variable "$ccodes" is not available at reports/issues_stats.pl line 358.
Variable "$locations" is not available at reports/issues_stats.pl line 359.

Test plan:
Run the script. Choose Collection or Shelving Location.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

reports/issues_stats.pl

index 63501be..4241393 100755 (executable)
@@ -90,8 +90,8 @@ $template->param(do_it => $do_it,
 our $itemtypes = GetItemTypes();
 our @patron_categories = Koha::Patron::Categories->search_limited({}, {order_by => ['description']});
 
-my $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) };
-my $ccodes = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' }, { order_by => ['description'] } ) };
+our $locations = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.location' }, { order_by => ['description'] } ) };
+our $ccodes = { map { ( $_->{authorised_value} => $_->{lib} ) } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => '', kohafield => 'items.ccode' }, { order_by => ['description'] } ) };
 
 our $Bsort1 = GetAuthorisedValues("Bsort1");
 our $Bsort2 = GetAuthorisedValues("Bsort2");