Bugzilla – Attachment 37534 Details for
Bug 4502
Perl error in acq budget planning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4502 - An attempt to make things more sensible.
Bug-4502---An-attempt-to-make-things-more-sensible.patch (text/plain), 3.24 KB, created by
Mark Tompsett
on 2015-04-07 00:30:44 UTC
(
hide
)
Description:
Bug 4502 - An attempt to make things more sensible.
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-04-07 00:30:44 UTC
Size:
3.24 KB
patch
obsolete
>From d5c5c97bde9351dd7abbb72cd559671490f895f2 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 6 Apr 2015 19:50:30 -0400 >Subject: [PATCH] Bug 4502 - An attempt to make things more sensible. > >The reason the budget_period_id was not defined was because in >two cases it was not passed! This patch adds those missing >parameters. And as a result, cuts out the attempt to default the >authcat to '' unless the budget_period_id is defined. > >Additionally, the start and end months don't seem to be passed, >so rather than have it blow up, checking them forces the else >case logic. > >budget_period_id is the budget id. If you have two budgets, >you can craft a URL to work with budget_period_id matching >those two ids. Anything else should trigger the new error which >was modified to reflect more of what the problem is. > >Follow the test plan in comment #6. Feel free to also to attempt >crafting URLs and triggering errors. >--- > admin/aqplan.pl | 6 +----- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt | 4 +++- > 2 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/admin/aqplan.pl b/admin/aqplan.pl >index 879bb0e..2a6a52f 100755 >--- a/admin/aqplan.pl >+++ b/admin/aqplan.pl >@@ -106,10 +106,6 @@ if ( $budget_period_locked == 1 && not defined $show_actual ) { > > $authcat = 'Asort1' if not defined $authcat; # defaults to Asort if no authcat given > >-# If no active budget is defined, budget_period_id is undef >-# This is the behavior of GetBudgetPeriod >-$authcat = '' unless $budget_period_id; >- > my $budget_id = $input->param('budget_id'); > my $op = $input->param("op"); > >@@ -215,7 +211,7 @@ if ( $authcat =~ m/^Asort/ ) { > $sth->finish; > @authvals = sort { $a <=> $b } @authvals; > } >-elsif ( $authcat eq 'MONTHS' ) { >+elsif ( $authcat eq 'MONTHS' && $budget_period_startdate && $budget_period_enddate ) { > > # build months > my @start_date = UnixDate( $budget_period_startdate, ( '%Y', '%m', '%d' ) ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >index fdf84b6..fa18fd3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt >@@ -226,7 +226,7 @@ > </form> > > [% ELSIF not budget_period_id %] >-<div class="dialog alert">No active budget defined. You should define one before continuing.</div> >+<div class="dialog alert">That budget is not defined. You should select a defined budget to continue.</div> > [% ELSE %] > <div class="dialog message">No funds to display for this search criteria</div> > [% END %] >@@ -237,6 +237,7 @@ > <div class="yui-b"> > > <form method="post" action="/cgi-bin/koha/admin/aqplan.pl"> >+ <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" /> > <fieldset class="brief"> > <h4>Filter</h4> > [% BLOCK planning_types %] >@@ -311,6 +312,7 @@ > </li> > </ol> > <fieldset class="action"> <input type="submit" value="Submit"/> >+ <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" /> > <input type="hidden" name="report_name" value="[% report_name %]" /> > <input type="hidden" name="output" value="file" /></fieldset> > </fieldset> >-- >1.9.1
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 4502
:
37181
|
37203
|
37354
|
37533
|
37534
|
39081
|
39082
|
39083
|
39084
|
42771
|
44498
|
44499
|
44500
|
44932
|
44945
|
44946
|
44947