Bug 37246 - Suggestions filter by fund displays inactive budgets
Summary: Suggestions filter by fund displays inactive budgets
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Pedro Amorim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-03 14:07 UTC by Nick Clemens (kidclamp)
Modified: 2024-11-18 17:53 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:


Attachments
Bug 37246: Use the same dropdown for filtering and editing/adding budgets (7.07 KB, patch)
2024-07-03 14:10 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 37246: Use the same dropdown for filtering and editing/adding budgets (7.11 KB, patch)
2024-07-03 16:12 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 37246: Use the same dropdown for filtering and editing/adding budgets (7.17 KB, patch)
2024-07-05 15:45 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 37246: (QA follow-up) DRY Dropdown (5.86 KB, patch)
2024-07-05 15:45 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2024-07-03 14:07:06 UTC
To recreate:
1 - Create an active and inactive budget in acquisitions
2 - Add funs to both
3 - Visit - Acquisitions -> Suggestions
4 - Click 'Acquisition information' under filters on the left
5 - Note all funds are showing
Comment 1 Nick Clemens (kidclamp) 2024-07-03 14:10:33 UTC
Created attachment 168459 [details] [review]
Bug 37246: Use the same dropdown for filtering and editing/adding budgets

This patch removes a second fetch of budgets form the db, and clones the dropdown in the template
as we will only ever be displaying one of them at a time.

The JS is moved to fire for both operations.

To test:
 1 - Create an active and inactive budget in acquisitions
 2 - Add funds to both
 3 - Visit - Acquisitions -> Suggestions
 4 - Click 'Acquisition information' under filters on the left
 5 - Note all funds are showing
 6 - Apply patch
 7 - Reload
 8 - Note you only see active budgets
 9 - Check the box to show inactive, verify they show
10 - Filter by an inactive budget
11 - Confirm selection remains
12 - Add a suggestion and verify budget dropdown works
13 - Edit the suggestion and verify budget dropdown works
Comment 2 Sam Lau 2024-07-03 16:12:20 UTC
Created attachment 168464 [details] [review]
Bug 37246: Use the same dropdown for filtering and editing/adding budgets

This patch removes a second fetch of budgets form the db, and clones the dropdown in the template
as we will only ever be displaying one of them at a time.

The JS is moved to fire for both operations.

To test:
 1 - Create an active and inactive budget in acquisitions
 2 - Add funs to both
 3 - Visit - Acquisitions -> Suggestions
 4 - Click 'Acquisition information' under filters on the left
 5 - Note all funds are showing
 6 - Apply patch
 7 - Reload
 8 - Note you only see active budgets
 9 - Check the box to show inactive, verify they show
10 - Filter by an inactive budget
11 - Confirm selection remains
12 - Add a suggestion and verify budget dropdown works
13 - Edit the suggestion and verify budget dropdown works

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 3 Pedro Amorim 2024-07-05 15:45:18 UTC
Created attachment 168556 [details] [review]
Bug 37246: Use the same dropdown for filtering and editing/adding budgets

This patch removes a second fetch of budgets form the db, and clones the dropdown in the template
as we will only ever be displaying one of them at a time.

The JS is moved to fire for both operations.

To test:
 1 - Create an active and inactive budget in acquisitions
 2 - Add funs to both
 3 - Visit - Acquisitions -> Suggestions
 4 - Click 'Acquisition information' under filters on the left
 5 - Note all funds are showing
 6 - Apply patch
 7 - Reload
 8 - Note you only see active budgets
 9 - Check the box to show inactive, verify they show
10 - Filter by an inactive budget
11 - Confirm selection remains
12 - Add a suggestion and verify budget dropdown works
13 - Edit the suggestion and verify budget dropdown works

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 4 Pedro Amorim 2024-07-05 15:45:21 UTC
Created attachment 168557 [details] [review]
Bug 37246: (QA follow-up) DRY Dropdown

If we're using the same dropdown it should be defined once.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 5 Katrin Fischer 2024-07-08 15:50:43 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Lucas Gass (lukeg) 2024-11-18 17:53:48 UTC
Backported to 24.05.x for upcoming 24.05.06