Bug 25499 - Fund code column is empty when closing a budget
Summary: Fund code column is empty when closing a budget
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on: 11714
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-14 07:54 UTC by Katrin Fischer
Modified: 2021-06-14 21:31 UTC (History)
5 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:
20.11.00, 20.05.03, 19.11.09
Circulation function:


Attachments
Bug 25499: Fix fund code column when closing a budget (1.78 KB, patch)
2020-05-22 23:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25499: Fix fund code column when closing a budget (1.83 KB, patch)
2020-07-07 14:52 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 25499: Fix fund code column when closing a budget (1.98 KB, patch)
2020-07-29 12:53 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 (lukeg) 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.