Bug 4502: An attempt to make things more sensible.
authorMark Tompsett <mtompset@hotmail.com>
Mon, 6 Apr 2015 23:50:30 +0000 (19:50 -0400)
committerLiz Rea <wizzyrea@gmail.com>
Fri, 11 Dec 2015 01:42:07 +0000 (14:42 +1300)
commit5c9534a6ad5d0109b8876dda08c07294814c54ad
treeda98bc7995f827e41d52d2e6ab048cc89e637a56
parente8fcc11d46b053a90a0ea119c0f255017294e2af
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.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Well, works and does not explode any more
No errors

To trigger the new message simply put /cgi-bin/koha/admin/aqplan.pl
on your staff page, an intriguing 'Planning for by Asort1' appears :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fea7b9b4d444a6bdf3f1326c54eddd68670be7f7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 4ca1bac3106728450cef9feb9df942e78a1256a9)
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
admin/aqplan.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt