Bug 40870 - Fund code is lost when modifying an order in acquisitions
Summary: Fund code is lost when modifying an order in acquisitions
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Lucas Gass (lukeg)
QA Contact: Matt Blenkinsop
URL:
Keywords:
Depends on: 38714
Blocks:
  Show dependency treegraph
 
Reported: 2025-09-24 13:05 UTC by Andrew Fuerste-Henry
Modified: 2025-09-25 16:31 UTC (History)
4 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.11.00,25.05.04
Circulation function:


Attachments
Bug 40870: Set the fund code to selected on acqui/neworderempty.pl (2.82 KB, patch)
2025-09-24 14:22 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 40870: Set the fund code to selected on acqui/neworderempty.pl (2.89 KB, patch)
2025-09-24 14:52 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 40870: Set the fund code to selected on acqui/neworderempty.pl (2.95 KB, patch)
2025-09-24 15:12 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40870: Set selected when needed (3.09 KB, patch)
2025-09-25 09:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40870: Set selected when needed (3.29 KB, patch)
2025-09-25 09:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40870: Set selected when needed (3.34 KB, patch)
2025-09-25 13:48 UTC, Lucas Gass (lukeg)
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-09-24 13:05:47 UTC
To recreate:
- add an order to a basket in acquisitions
- confirm your order shows in the basket with a fund code selected
- click Modify on your order
- note that Fund is empty in the modify form and you need to re-select it
Comment 1 Lucas Gass (lukeg) 2025-09-24 14:03:51 UTC
It doesn't seem like we are trying to set the fund at all in the dropdown to 'selected'.
Comment 2 Lucas Gass (lukeg) 2025-09-24 14:22:40 UTC
Created attachment 186884 [details] [review]
Bug 40870: Set the fund code to selected on acqui/neworderempty.pl

To tes:
1- add an order to a basket in acquisitions
2- confirm your order shows in the basket with a fund code selected
3- click Modify on your order
4- note that Fund is empty in the modify form and you need to re-select it
5. APPLY PATCH
6. Try steps 1 -4 again, the correct fund should be set on page load
Comment 3 Andrew Fuerste-Henry 2025-09-24 14:52:19 UTC
Created attachment 186888 [details] [review]
Bug 40870: Set the fund code to selected on acqui/neworderempty.pl

To tes:
1- add an order to a basket in acquisitions
2- confirm your order shows in the basket with a fund code selected
3- click Modify on your order
4- note that Fund is empty in the modify form and you need to re-select it
5. APPLY PATCH
6. Try steps 1 -4 again, the correct fund should be set on page load

Signed-off-by: Wendy Bartlett <wbartlett@cuyahogalibrary.org>
Comment 4 Matt Blenkinsop 2025-09-24 15:12:02 UTC
Created attachment 186895 [details] [review]
Bug 40870: Set the fund code to selected on acqui/neworderempty.pl

To tes:
1- add an order to a basket in acquisitions
2- confirm your order shows in the basket with a fund code selected
3- click Modify on your order
4- note that Fund is empty in the modify form and you need to re-select it
5. APPLY PATCH
6. Try steps 1 -4 again, the correct fund should be set on page load

Signed-off-by: Wendy Bartlett <wbartlett@cuyahogalibrary.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 5 Lucas Gass (lukeg) 2025-09-24 15:27:08 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 6 Jonathan Druart 2025-09-25 09:42:16 UTC
Created attachment 186908 [details] [review]
Bug 40870: Set selected when needed

I think this commit simplifies the code a lot.
The regression has been caused by
  commit fe4999ad39a33476fdcf886648e1e52b5947ab04
  Bug 38714: acqui/neworderempty.tt

It forgot to set the selected attribute.
Comment 7 Jonathan Druart 2025-09-25 09:42:50 UTC
Could you have a look at this patch please? I think it's a cleaner way to fix the bug.
Comment 8 Jonathan Druart 2025-09-25 09:45:07 UTC
Created attachment 186909 [details] [review]
Bug 40870: Set selected when needed

I think this commit simplifies the code a lot.
The regression has been caused by
  commit fe4999ad39a33476fdcf886648e1e52b5947ab04
  Bug 38714: acqui/neworderempty.tt

It forgot to set the selected attribute.
Comment 9 Lucas Gass (lukeg) 2025-09-25 13:04:01 UTC
(In reply to Jonathan Druart from comment #7)
> Could you have a look at this patch please? I think it's a cleaner way to
> fix the bug.

Yes, it's much cleaner.
Comment 10 Lucas Gass (lukeg) 2025-09-25 13:48:19 UTC
Created attachment 186921 [details] [review]
Bug 40870: Set selected when needed

I think this commit simplifies the code a lot.
The regression has been caused by
  commit fe4999ad39a33476fdcf886648e1e52b5947ab04
  Bug 38714: acqui/neworderempty.tt

It forgot to set the selected attribute.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 11 Paul Derscheid 2025-09-25 16:31:37 UTC
Nice work everyone!

Pushed to 25.05.x