Bugzilla – Attachment 71639 Details for
Bug 20201
Silence warnings in admin/aqplan.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20201: Silence warnings triggered by admin/aqplan.pl
Bug-20201-Silence-warnings-triggered-by-adminaqpla.patch (text/plain), 2.78 KB, created by
Mark Tompsett
on 2018-02-14 20:25:32 UTC
(
hide
)
Description:
Bug 20201: Silence warnings triggered by admin/aqplan.pl
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-02-14 20:25:32 UTC
Size:
2.78 KB
patch
obsolete
>From baf2eccabd5f0519e61f7e40ddb8e4280ea2a9c0 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Wed, 14 Feb 2018 20:19:01 +0000 >Subject: [PATCH] Bug 20201: Silence warnings triggered by admin/aqplan.pl > >TEST PLAN >--------- >0) back up DB >1) Run the following commands on a kohadevbox: > reset_all > git bz apply 20185 > echo | sudo tee /var/log/koha/kohadev/plack-error.log > restart_all >2) Navigate in a staff client: > Home -> Administration -> Budgets -> Edit -> Planning by libraries > -- could be any of the planning, but by libraries is nicely visible > on screen. >3) Run the following commands: > cat /var/log/koha/kohadev/plack-error.log > -- several warnings. >4) Run the following commands: > git bz apply 20201 > echo | sudo tee /var/log/koha/kohadev/plack-error.log > restart_all >5) repeat step 2 and refresh the staff client page. > -- this time warnings related to aqplan.pl are not there. >6) run koha qa test tools >--- > admin/aqplan.pl | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/admin/aqplan.pl b/admin/aqplan.pl >index fd3f2e6..f01e5e8 100755 >--- a/admin/aqplan.pl >+++ b/admin/aqplan.pl >@@ -88,10 +88,10 @@ my $borrower_id = $template->{VARS}->{'USER_INFO'}->{'borrowernumber'}; > my $borrower_branchcode = $template->{VARS}->{'USER_INFO'}->{'branchcode'}; > > my $authcat = $input->param('authcat'); >-my $show_active = $input->param('show_active'); >+my $show_active = $input->param('show_active') // 0; > my $show_actual = $input->param('show_actual'); > my $show_percent = $input->param('show_percent'); >-my $output = $input->param("output"); >+my $output = $input->param("output") // q{}; > our $basename = $input->param("basename"); > our $del = $input->param("sep"); > >@@ -106,7 +106,7 @@ if ( $budget_period_locked == 1 && not defined $show_actual ) { > $authcat = 'Asort1' if not defined $authcat; # defaults to Asort if no authcat given > > my $budget_id = $input->param('budget_id'); >-my $op = $input->param("op"); >+my $op = $input->param("op") // q{}; > > my $budgets_ref = GetBudgetHierarchy( $budget_period_id, $show_mine?$template->{VARS}->{'USER_INFO'}->{'branchcode'}:'', $show_mine?$template->{VARS}->{'USER_INFO'}->{'borrowernumber'}:'' ); > >@@ -350,8 +350,8 @@ foreach my $budget (@budgets) { > ); > > my ( $actual, $estimated, $display ) = GetBudgetsPlanCell( \%cell, $period, $budget ); >- $cell{actual_amount} = sprintf( "%.2f", $actual ); >- $cell{estimated_amount} = sprintf( "%.2f", $estimated ); >+ $cell{actual_amount} = sprintf( "%.2f", $actual // 0 ); >+ $cell{estimated_amount} = sprintf( "%.2f", $estimated // 0 ); > $cell{display} = $authvals_row[$i]{display}; > $cell{colnum} = $i; > >-- >2.1.4
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 20201
:
71639
|
72269