Bugzilla – Attachment 152568 Details for
Bug 34006
[22.11] Keep the current option for funds in receiving returns an error 500 or saves wrong fund
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved
Bug-34006-Fix-value-of-Keep-current-option-on-rece.patch (text/plain), 2.77 KB, created by
Emily Lamancusa (emlam)
on 2023-06-22 15:02:56 UTC
(
hide
)
Description:
Bug 34006: Fix value of "Keep current" option on receive so correct fund is saved
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2023-06-22 15:02:56 UTC
Size:
2.77 KB
patch
obsolete
>From 5e3a833b6af180b53e28d9d48ab60a9e880b3033 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Fri, 16 Jun 2023 13:36:37 +0000 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 755cb879fc..03521082c1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -294,7 +294,7 @@ > [% END %] > <select class="select2" id="bookfund" name="bookfund"> > <optgroup label="Current"> >- <option value="[% order.fund.budget.id | html %]" selected="selected" data-sort1-authcat="[% order.fund.sort1_authcat | html %]" data-sort2-authcat="[% order.fund.sort2_authcat | html %]"> >+ <option value="[% order.fund.budget_id | html %]" selected="selected" data-sort1-authcat="[% order.fund.sort1_authcat | html %]" data-sort2-authcat="[% order.fund.sort2_authcat | html %]"> > Keep current ([% order.fund.budget_name | html %])</option> > </optgroup> > [% FOREACH budget_period_id IN budget_loops.keys %] >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34006
:
152415
|
152568
|
152569