Bug 14653 - Acq planning filter and export always use default active period
Summary: Acq planning filter and export always use default active period
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-06 08:27 UTC by Fridolin Somers
Modified: 2016-06-21 21:38 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14653 - Acq planning filter always use default active period (1.79 KB, patch)
2015-08-06 09:09 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 14653 - Acq planning export always use default active period (1.71 KB, patch)
2015-08-06 09:10 UTC, Fridolin Somers
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 14653 - Acq planning export always use default active period (1.81 KB, patch)
2015-10-09 19:57 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 14653 - Acq planning filter always use default active period (1.87 KB, patch)
2015-10-09 20:03 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 14653 - Acq planning export always use default active period (1.86 KB, patch)
2015-10-09 20:03 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 14653 - Acq planning filter always use default active period (1.92 KB, patch)
2015-10-13 11:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14653 - Acq planning export always use default active period (1.92 KB, patch)
2015-10-13 11:30 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2015-08-06 08:27:59 UTC
In Acq planning /cgi-bin/koha/admin/aqplan.pl, left side filter and export forms have no parameter budget_period_id nor authcat, so the use the default active period.
As said in code :
# IF PERIOD_ID IS DEFINED,  GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);
Comment 1 Fridolin Somers 2015-08-06 09:09:55 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2015-08-06 09:10:05 UTC Comment hidden (obsolete)
Comment 3 Héctor Eduardo Castro Avalos 2015-10-09 19:57:40 UTC Comment hidden (obsolete)
Comment 4 Héctor Eduardo Castro Avalos 2015-10-09 20:03:38 UTC Comment hidden (obsolete)
Comment 5 Héctor Eduardo Castro Avalos 2015-10-09 20:03:52 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2015-10-13 11:30:33 UTC
Created attachment 43378 [details] [review]
Bug 14653 - Acq planning filter always use default active period

In Acq planning /cgi-bin/koha/admin/aqplan.pl, left side filter and export forms have no parameter budget_period_id nor authcat, so the use the default active period.
As said in code :
- IF PERIOD_ID IS DEFINED,  GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);

This patch corrects the filter form.

Test plan :
- Create an active budget "B_ACTIVE" with 1 fund
- Create an inactive budget "B_OLD" with 3 funds
- Go to "B_OLD" planning by libraries
- You see 3 funds
- In filter form, select "by months" in "Select planning type"
=> Without patch, you see planning of "B_ACTIVE" with 1 fund
=> Without patch, you see planning of "B_OLD" with 3 funds

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2015-10-13 11:30:36 UTC
Created attachment 43379 [details] [review]
Bug 14653 - Acq planning export always use default active period

In Acq planning /cgi-bin/koha/admin/aqplan.pl, left side filter and export forms have no parameter budget_period_id nor authcat, so the use the default active period.
As said in code
- IF PERIOD_ID IS DEFINED,  GET THE PERIOD - ELSE GET THE ACTIVE PERIOD BY DEFAULT
my $period = GetBudgetPeriod($budget_period_id);

This patch corrects the export form.

Test plan :
- Create an active budget "B_ACTIVE" with 1 fund
- Create an inactive budget "B_OLD" with 3 funds
- Go to "B_OLD" planning by libraries
- You see 3 funds
- Click on "Submit" in export form
=> Without patch, you get the planning of "B_ACTIVE" with 1 fund
=> Without patch, you get the planning of "B_OLD" with 3 funds by libraries

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2015-10-13 11:31:28 UTC
So it seems that only 1 library uses this feature :)
Comment 9 Tomás Cohen Arazi 2015-10-13 15:22:19 UTC
Patches pushed to master.

Thanks Frido!
Comment 10 Fridolin Somers 2015-10-14 12:19:25 UTC
(In reply to Jonathan Druart from comment #8)
> So it seems that only 1 library uses this feature :)

Indeed :D
Comment 11 Chris Cormack 2015-10-24 07:38:16 UTC
Pushed to 3.20.x will be in 3.20.5