Bug 38986 - Restore "Any" option to purchase suggestion filter by fund
Summary: Restore "Any" option to purchase suggestion filter by fund
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Andrew Fuerste-Henry
QA Contact: Marcel de Rooy
URL:
Keywords: regression
Depends on: 37246
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-28 15:38 UTC by Andrew Fuerste-Henry
Modified: 2025-03-22 11:41 UTC (History)
6 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00,24.11.03
Circulation function:


Attachments
Bug 38986: Restore ANY filter on suggestions.ttype (1.72 KB, patch)
2025-01-28 15:41 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 38986: Restore ANY filter on suggestions.ttype (1.78 KB, patch)
2025-01-28 16:22 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 38986: Restore Any in fund dropdown on suggestions homepage (1.58 KB, patch)
2025-02-03 18:10 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 38986: Restore Any in fund dropdown on suggestions homepage (1.49 KB, patch)
2025-02-03 18:14 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 38986: Restore Any in fund dropdown on suggestions homepage (1.55 KB, patch)
2025-02-03 23:56 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 38986: Restore Any option to suggestions homepage filter (2.03 KB, patch)
2025-02-14 14:55 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 38986: Restore Any in fund dropdown on suggestions homepage (2.85 KB, patch)
2025-02-17 13:55 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2025-01-28 15:38:18 UTC
The suggestions management page includes a filter by fund. On the left side of the page, click Acquisition Information to reveal a Fund dropdown. Prior to Bug 37246, this dropdown included and defaulted to the option of "Any." Bug 37246 wrapped that "ANY" option in "[% IF op == 'save' %]." I don't see why that change was made or what it accomplishes.
Comment 1 Andrew Fuerste-Henry 2025-01-28 15:41:59 UTC
Created attachment 177282 [details] [review]
Bug 38986: Restore ANY filter on suggestions.ttype

To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
Comment 2 Biblibre Sandboxes 2025-01-28 16:22:01 UTC
Created attachment 177285 [details] [review]
Bug 38986: Restore ANY filter on suggestions.ttype

To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Comment 3 Andrew Fuerste-Henry 2025-02-03 18:10:03 UTC
Created attachment 177473 [details] [review]
Bug 38986: Restore Any in fund dropdown on suggestions homepage

This patch restores Any as a budget filter option on the suggestions homepage, but does not allow one to select Any when saving a suggestion

To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
5 - confirm you cannot select Any when creating a new suggestion
Comment 4 Andrew Fuerste-Henry 2025-02-03 18:11:18 UTC
Figured out what that op=save was for! We should allow Any as a filter, but not as an option when saving a suggestion.
Comment 5 Andrew Fuerste-Henry 2025-02-03 18:14:11 UTC
Created attachment 177474 [details] [review]
Bug 38986: Restore Any in fund dropdown on suggestions homepage

This patch restores Any as a budget filter option on the suggestions homepage, but does not allow one to select Any when saving a suggestion

To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
5 - confirm you cannot select Any when creating a new suggestion
Comment 6 Biblibre Sandboxes 2025-02-03 23:56:44 UTC
Created attachment 177494 [details] [review]
Bug 38986: Restore Any in fund dropdown on suggestions homepage

This patch restores Any as a budget filter option on the suggestions homepage, but does not allow one to select Any when saving a suggestion

To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
5 - confirm you cannot select Any when creating a new suggestion

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Comment 7 Marcel de Rooy 2025-02-14 09:56:02 UTC
Still a bit confused here.
I would not expect the same set of values for the filter dropdown and the actual fund field.
I think that the filter should always list Any. No selection on fund.
And that the fund field should not Any but should have None.
Now we are using the same block and that does not work imo..

Please clarify.
Comment 8 Katrin Fischer 2025-02-14 10:04:01 UTC
I think none would be "no fund set" while "any" means it can be empty or set to any fund - that would make sense to me as a default.
Comment 9 Andrew Fuerste-Henry 2025-02-14 14:55:57 UTC
Created attachment 178101 [details] [review]
Bug 38986: Restore Any option to suggestions homepage filter

"Any" should show all suggestions, any fund value and null fund values. One should not be able to create a suggeestion set to "Any"
"None" should show only suggestions with no fund value selected. A new suggestion should default to "None"

To Test:
1: have two suggestions, one with a fund selected and one without
2: go to suggestions homepage, confirm the filter does not have an "Any" option
3: apply patch, reload page
4: confirm the fund filter on suggestion homepage now has both Any and None and they behave as described above
5: confirm the fund filter defaults to Any as you change the branch filter
6: create a new suggestion, confirm its fund defaults to None and cannot be set to Any
Comment 10 Andrew Fuerste-Henry 2025-02-14 14:57:57 UTC
(In reply to Marcel de Rooy from comment #7)
> Still a bit confused here.
> I would not expect the same set of values for the filter dropdown and the
> actual fund field.
> I think that the filter should always list Any. No selection on fund.
> And that the fund field should not Any but should have None.
> Now we are using the same block and that does not work imo..
> 
> Please clarify.

Agreed, using the same form for creation and filtering made this weird! I realized I'd made "None" disappear from the filter. New patch corrects that and clarifies expectations in the test plan. Thanks!
Comment 11 Marcel de Rooy 2025-02-17 13:55:22 UTC
Created attachment 178139 [details] [review]
Bug 38986: Restore Any in fund dropdown on suggestions homepage

This patch restores Any as a budget filter option on the suggestions homepage, but does not allow one to select Any when saving a suggestion

To test:
1 - have two suggestions, one with a fund assigned and one without
2 - go to /cgi-bin/koha/suggestion/suggestion.pl, use Fund filter, confirm it does not offer an Any option
3 - apply patch, reload page
4 - use Fund filter, confirm it shows Any as an option and both Any and None work properly
5 - confirm you cannot select Any when creating a new suggestion

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>

Bug 38986: Restore Any option to suggestions homepage filter

"Any" should show all suggestions, any fund value and null fund values. One should not be able to create a suggeestion set to "Any"
"None" should show only suggestions with no fund value selected. A new suggestion should default to "None"

To Test:
1: have two suggestions, one with a fund selected and one without
2: go to suggestions homepage, confirm the filter does not have an "Any" option
3: apply patch, reload page
4: confirm the fund filter on suggestion homepage now has both Any and None and they behave as described above
5: confirm the fund filter defaults to Any as you change the branch filter
6: create a new suggestion, confirm its fund defaults to None and cannot be set to Any

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Marcel de Rooy 2025-02-17 13:56:45 UTC
Since this is marked trivial and tested before, I will continue passing QA now.
Have squashed both patches in the process.
Comment 13 Katrin Fischer 2025-02-18 14:36:17 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 14 Andrew Fuerste-Henry 2025-02-19 13:46:24 UTC
Rmaints, please backport this to 24.11 and 24.05 as it creates confusion for users. Thanks!
Comment 15 Paul Derscheid 2025-03-19 23:02:22 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.03