[Bug 34006] New: Keep the current option for budgets in receiving returns an error 500
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Bug ID: 34006 Summary: Keep the current option for budgets in receiving returns an error 500 Change sponsored?: --- Product: Koha Version: 22.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: thibaut.colin@univ-rennes2.fr QA Contact: testopia@bugs.koha-community.org CC: arthur.suzuki@biblibre.com, chughesman@cclsny.org, katrin.fischer@bsz-bw.de, lucas@bywatersolutions.com, nick@bywatersolutions.com, wainuiwitikapark@catalyst.net.nz Depends on: 31459, 32694 On v22.11.04, the 'Keep current' option brings up the budget_period_id instead of the budget_id. Example: <option value="120" selected="selected" data-sort1-authcat="" data-sort2-authcat="NIV_PUBLIC"> Keep current (Arts 2023)</option> Good line in list: <option value="515" selected="selected" data-sort1-authcat="" data-sort2-authcat="NIV_PUBLIC"> Arts 2023 </option> Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31459 [Bug 31459] Make order receive page faster on systems with many budgets https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32694 [Bug 32694] Keep current option for budgets in receiving broken -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I believe this had been fixed already once in the 22.11 release cycle, but coudln't locate the bug. Maybe git history will show something. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Keep the current option for |Keep the current option for |budgets in receiving |funds in receiving returns |returns an error 500 |an error 500 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- In master things seem to be ok, will try to test in 22.11.x next. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Confiremd, on saving the wrong fund is set :( -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- To test: 1) * With the sample data * Create a new budget "July 2023" * Create a new fund "Books" under it * Limit access to Owner and make yourself the owner 2) * Create a basket * Create an order line with this fund * Close the basket 3) * Edit or create another patron * Set catalogue and acq permissions without budget_manage_all and order_manage_all (no access to the fund) * Edit username and password 4) * Log in as the second user in a separate browser * Receive shipment * Create invoice * Receive * You should see the fund under the "Keep current" heading selected * Add quantity received, save * Fund has changed to Fund_1_2 => data loss :( -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think the 500 maybe occurs if there is no fund with a matching number. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Keep the current option for |Keep the current option for |funds in receiving returns |funds in receiving returns |an error 500 |an error 500 or saves wrong | |fund -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 152415 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152415&action=edit Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved Under certain circumstances the "Keep current" option on receive allows to receive order lines where the fund is otherwise not accessible to the user. In 22.11 the wrong value is used for the option, so that instead of the fund id the budget id is used, this can lead to an error 500 if there is no fund with this id or to a wrong fund being saved. To test: 1) Create budget and fund * With the sample data * Create a new budget "July 2023" * Create a new fund "Books" under it * Limit access to Owner and make yourself the owner 2) Create order * Create a basket * Create an order line with this access limited fund * Close the basket 3) Create a staff user with limited permissions * Edit or create another patron * Set catalogue and acq permissions without budget_manage_all and order_manage_all (no access to the fund) * Edit username and password 4) Receive, recreating the error * Log in as the second user in a separate browser * Receive shipment * Create invoice * Receive * You should see the fund under the "Keep current" heading selected * Add quantity received, save * Fund has changed to Fund_1_2 => data loss :( 5) Receive, verify fix * Create another order line with your privileged user and the "Books" fund * Repeat 4) * After receiving the fund should now remain unchanged -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |samalau@gmail.com Status|Needs Signoff |Patch doesn't apply --- Comment #7 from Sam Lau <samalau@gmail.com> --- CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff Summary|Keep the current option for |[22.11] Keep the current |funds in receiving returns |option for funds in |an error 500 or saves wrong |receiving returns an error |fund |500 or saves wrong fund --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Sam Lau from comment #7)
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved
Hi Sam, this needs to be tested pre-multi-receive. So in 22.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152415|0 |1 is obsolete| | --- Comment #9 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 152568 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152568&action=edit Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved Under certain circumstances the "Keep current" option on receive allows to receive order lines where the fund is otherwise not accessible to the user. In 22.11 the wrong value is used for the option, so that instead of the fund id the budget id is used, this can lead to an error 500 if there is no fund with this id or to a wrong fund being saved. To test: 1) Create budget and fund * With the sample data * Create a new budget "July 2023" * Create a new fund "Books" under it * Limit access to Owner and make yourself the owner 2) Create order * Create a basket * Create an order line with this access limited fund * Close the basket 3) Create a staff user with limited permissions * Edit or create another patron * Set catalogue and acq permissions without budget_manage_all and order_manage_all (no access to the fund) * Edit username and password 4) Receive, recreating the error * Log in as the second user in a separate browser * Receive shipment * Create invoice * Receive * You should see the fund under the "Keep current" heading selected * Add quantity received, save * Fund has changed to Fund_1_2 => data loss :( 5) Receive, verify fix * Create another order line with your privileged user and the "Books" fund * Repeat 4) * After receiving the fund should now remain unchanged Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |emily.lamancusa@montgomeryc | |ountymd.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152568|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 152569 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152569&action=edit Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved Under certain circumstances the "Keep current" option on receive allows to receive order lines where the fund is otherwise not accessible to the user. In 22.11 the wrong value is used for the option, so that instead of the fund id the budget id is used, this can lead to an error 500 if there is no fund with this id or to a wrong fund being saved. To test: 1) Create budget and fund * With the sample data * Create a new budget "July 2023" * Create a new fund "Books" under it * Limit access to Owner and make yourself the owner 2) Create order * Create a basket * Create an order line with this access limited fund * Close the basket 3) Create a staff user with limited permissions * Edit or create another patron * Set catalogue and acq permissions without budget_manage_all and order_manage_all (no access to the fund) * Edit username and password 4) Receive, recreating the error * Log in as the second user in a separate browser * Receive shipment * Create invoice * Receive * You should see the fund under the "Keep current" heading selected * Add quantity received, save * Fund has changed to Fund_1_2 => data loss :( 5) Receive, verify fix * Create another order line with your privileged user and the "Books" fund * Repeat 4) * After receiving the fund should now remain unchanged Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Trivial and clear fix, thanks Katrin. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)| |22.11.07 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34006 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org