Bug 29429

Summary: Cannot close budgets
Product: Koha Reporter: Florian <florian.bontemps>
Component: AcquisitionsAssignee: Florian <florian.bontemps>
Status: CLOSED FIXED QA Contact: Joonas Kylmälä <joonas.kylmala>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, joonas.kylmala, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Circulation function:
Bug Depends on: 17600    
Bug Blocks:    
Attachments: Bug 29429: Cannot close budgets
Bug 29429: Cannot close budgets

Description Florian 2021-11-05 16:28:02 UTC
When closing budgets, we get an error trace :

Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_admin_aqbudgetperiods_2epl::GetBudgetHierarchy called at /kohadevbox/koha/admin/aqbudgetperiods.pl line 230


admin/aqbudgetperiods. isn't calling GetBudgetHierarchy at line 58.
Comment 1 Florian 2021-11-05 16:35:16 UTC
Created attachment 127399 [details] [review]
Bug 29429: Cannot close budgets

Adds GetBudgetHierarchy to the functions called by C4::Budgets

Plan :
1. Create a budget with a random amount, save it.
2. Try to close the budget.
3. You should get an Error Trace.

4. Apply the patch
5. Close the budget again
6. It should work.
Comment 2 Joonas Kylmälä 2021-11-06 12:31:05 UTC
Created attachment 127408 [details] [review]
Bug 29429: Cannot close budgets

Adds GetBudgetHierarchy to the functions called by C4::Budgets

Plan :
1. Create a budget with a random amount, save it.
2. Try to close the budget.
3. You should get an Error Trace.

4. Apply the patch
5. Close the budget again
6. It should work.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 3 Joonas Kylmälä 2021-11-06 12:31:50 UTC
Very trivial fix to the issue caused by bug 17600, moving to PQA directly.
Comment 4 Jonathan Druart 2021-11-08 11:11:23 UTC
Florian, please have a look at this wiki page https://wiki.koha-community.org/wiki/Commit_messages
The commit message is often different from the bug title. Your commit message must describe what your patch does, when the bug report title is describing the problem.
Comment 5 Florian 2021-11-08 11:17:39 UTC
(In reply to Jonathan Druart from comment #4)
> Florian, please have a look at this wiki page
> https://wiki.koha-community.org/wiki/Commit_messages
> The commit message is often different from the bug title. Your commit
> message must describe what your patch does, when the bug report title is
> describing the problem.

Ah, thank you Jonathan. Very new to Koha and Bugzilla here, I'll work on my mistakes! :D
Comment 6 Jonathan Druart 2021-11-08 11:19:57 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 7 Jonathan Druart 2021-11-08 11:20:19 UTC
Congratulations, Florian, for your first patch pushed! :)