Bug 25499

Summary: Fund code column is empty when closing a budget
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: AcquisitionsAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aholt, aleisha, jonathan.druart, lucas, victor
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03, 19.11.09
Bug Depends on: 11714    
Bug Blocks:    
Attachments: Bug 25499: Fix fund code column when closing a budget
Bug 25499: Fix fund code column when closing a budget
Bug 25499: Fix fund code column when closing a budget

Description Katrin Fischer 2020-05-14 07:54:17 UTC
When closing a budget, the fund code is missing from the table showing the number of unreceived orders for each fund.
Comment 1 Katrin Fischer 2020-05-14 07:56:15 UTC
To test:

- Create a budget and fund
- Order anything, leave basket open or not, but don't receive
- Duplicate your existing budget
- Close the first budget in order to move the pending orders
- Verify the fund code is not showing in the table
Comment 2 Katrin Fischer 2020-05-14 08:00:51 UTC
This change makes the code appear, but it might need more work ad I think the intention probably was to show indentation for child funds:

-            <td>[% budget.budget_code_indent | html %]</td>
+            <td>[% budget.budget_code | html %]</td>
Comment 3 Jonathan Druart 2020-05-14 10:19:02 UTC
It seems that budget_code_indent has been added to this template by
  commit a12e96e938c9203e5fb98d7ab74e77d0b22f34ba
  Bug 12164: Move the budget period clone logic into C4::Budgets

Pushed on Jul 24 2014

but dropped by

  commit 32bd54a7cadcf90be797afa1a8e9f1bf83c6ee57
  Bug 11714 - GetBudgetHierarchy needs optimization

Pushed on Oct 31 2014

They certainly overlapped during the SO+QA process

I think your patch is correct.
Comment 4 Katrin Fischer 2020-05-22 23:15:43 UTC
Created attachment 105294 [details] [review]
Bug 25499: Fix fund code column when closing a budget

When closing a budget the fund code column in the table is
always empty. This is due to a TT variable not being correct.

To test:
- Create a budget and fund
- Order anything, leave basket open or not, but don't receive
- Duplicate your existing budget
- Close the first budget in order to move the pending orders
- Verify the fund code is not showing in the table
- Apply patch and reload the patch
- Verify fund codes are now showing correctly

Bonus: Changes the column heading Fund id to Fund ID.
Comment 5 Katrin Fischer 2020-05-22 23:16:10 UTC
Thx for reviewing and digging, Jonathan!
Comment 6 ByWater Sandboxes 2020-07-07 14:52:39 UTC
Created attachment 106636 [details] [review]
Bug 25499: Fix fund code column when closing a budget

When closing a budget the fund code column in the table is
always empty. This is due to a TT variable not being correct.

To test:
- Create a budget and fund
- Order anything, leave basket open or not, but don't receive
- Duplicate your existing budget
- Close the first budget in order to move the pending orders
- Verify the fund code is not showing in the table
- Apply patch and reload the patch
- Verify fund codes are now showing correctly

Bonus: Changes the column heading Fund id to Fund ID.

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Comment 7 Katrin Fischer 2020-07-07 14:53:47 UTC
Thanks a lot, Abbey!
Comment 8 Abbey Holt 2020-07-07 15:58:27 UTC
It worked great!
Comment 9 Joonas Kylmälä 2020-07-29 12:53:12 UTC
Created attachment 107494 [details] [review]
Bug 25499: Fix fund code column when closing a budget

When closing a budget the fund code column in the table is
always empty. This is due to a TT variable not being correct.

To test:
- Create a budget and fund
- Order anything, leave basket open or not, but don't receive
- Duplicate your existing budget
- Close the first budget in order to move the pending orders
- Verify the fund code is not showing in the table
- Apply patch and reload the patch
- Verify fund codes are now showing correctly

Bonus: Changes the column heading Fund id to Fund ID.

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 10 Jonathan Druart 2020-07-30 15:46:51 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 11 Lucas Gass 2020-08-06 20:04:22 UTC
backported to 20.05.x for 20.05.03
Comment 12 Aleisha Amohia 2020-08-07 01:49:37 UTC
backported to 19.11.x for 19.11.09
Comment 13 Victor Grousset/tuxayo 2020-09-19 02:15:57 UTC
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.