Bug 32694 - Keep current option for budgets in receiving broken
Summary: Keep current option for budgets in receiving broken
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 31459
Blocks: 34006
  Show dependency treegraph
 
Reported: 2023-01-20 20:17 UTC by Nick Clemens
Modified: 2023-12-28 20:47 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.03,22.05.10,21.11.16


Attachments
Bug 32694: Fix value of 'Keep current' option in receiving (2.00 KB, patch)
2023-01-20 20:20 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32694: Fix value of 'Keep current' option in receiving (2.05 KB, patch)
2023-01-21 19:05 UTC, David Nind
Details | Diff | Splinter Review
Bug 32694: Fix value of 'Keep current' option in receiving (2.11 KB, patch)
2023-01-27 13:20 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 32694: (QA follow-up) Fix missing TT filters (1.45 KB, patch)
2023-01-27 13:20 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2023-01-20 20:17:37 UTC
Bug 31459 updated the dropdown and intended to restore this option, however, it looks like the template toolkit markers were missed:


<option value="order.fund.budget.id" selected="selected" data-sort1-authcat="[% order.fund.sort1_authcat | html %]" data-sort2-authcat="[% order.fund.sort2_authcat | html %]">

Should be:


<option value="[% order.fund.budget.id %]" selected="selected" data-sort1-authcat="[% order.fund.sort1_authcat | html %]" data-sort2-authcat="[% order.fund.sort2_authcat | html %]">
Comment 1 Nick Clemens 2023-01-20 20:17:58 UTC
Workaround is to manually set the dropdown to the current budget
Comment 2 Katrin Fischer 2023-01-20 20:19:00 UTC
Hm, strange, I thought I had tested that explicitly? :(
Comment 3 Nick Clemens 2023-01-20 20:20:42 UTC
Created attachment 145556 [details] [review]
Bug 32694: Fix value of 'Keep current' option in receiving

This patch restores missing template toolkit markers around the variable

To test:
1 - Order an item in a basket
2 - Close the basket
3 - Attempt to receive the item, leaving budget as 'Keep current'
4 - 500 Error:
C4::Acquisition::ModReceiveOrder(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (koha_cclsny.aqorders, CONSTRAINT aqorders_budget_id_fk FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE) at /usr/share/koha/intranet/cgi-bin/acqui/finishreceive.pl line 120
5 - Apply patch
6 - Receive order successfully!
Comment 4 David Nind 2023-01-21 19:05:52 UTC
Created attachment 145564 [details] [review]
Bug 32694: Fix value of 'Keep current' option in receiving

This patch restores missing template toolkit markers around the variable

To test:
1 - Order an item in a basket
2 - Close the basket
3 - Attempt to receive the item, leaving budget as 'Keep current'
4 - 500 Error:
C4::Acquisition::ModReceiveOrder(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (koha_cclsny.aqorders, CONSTRAINT aqorders_budget_id_fk FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE) at /usr/share/koha/intranet/cgi-bin/acqui/finishreceive.pl line 120
5 - Apply patch
6 - Receive order successfully!

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2023-01-27 13:20:05 UTC
Created attachment 145740 [details] [review]
Bug 32694: Fix value of 'Keep current' option in receiving

This patch restores missing template toolkit markers around the variable

To test:
1 - Order an item in a basket
2 - Close the basket
3 - Attempt to receive the item, leaving budget as 'Keep current'
4 - 500 Error:
C4::Acquisition::ModReceiveOrder(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (koha_cclsny.aqorders, CONSTRAINT aqorders_budget_id_fk FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE) at /usr/share/koha/intranet/cgi-bin/acqui/finishreceive.pl line 120
5 - Apply patch
6 - Receive order successfully!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 6 Katrin Fischer 2023-01-27 13:20:10 UTC
Created attachment 145741 [details] [review]
Bug 32694: (QA follow-up) Fix missing TT filters

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 7 Tomás Cohen Arazi 2023-01-30 15:15:46 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 8 Jacob O'Mara 2023-01-31 17:19:32 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 9 Lucas Gass 2023-02-01 19:15:08 UTC
Backported to 22.05.x for upcoming 22.05.10
Comment 10 Arthur Suzuki 2023-02-17 09:48:05 UTC
applied to 21.11.x for 21.11.16
Comment 11 wainuiwitikapark 2023-03-15 01:42:01 UTC
Not backported to 21.05.x