Bugzilla – Attachment 162838 Details for
Bug 36249
ILL - "Request from partners" action is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36249: Fix generic_confirm op
Bug-36249-Fix-genericconfirm-op.patch (text/plain), 3.52 KB, created by
Pedro Amorim
on 2024-03-06 16:00:24 UTC
(
hide
)
Description:
Bug 36249: Fix generic_confirm op
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-03-06 16:00:24 UTC
Size:
3.52 KB
patch
obsolete
>From fa52c799fcebf6cff228b79c085dd336392d0e58 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 6 Mar 2024 15:58:06 +0000 >Subject: [PATCH] Bug 36249: Fix generic_confirm op > >Test plan, k-t-d: > >1) Install FreeForm, enable ILL module, run: >bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >2) You'll have to switch the FreeForm branch to the one compatible with this work, i.e.: >cd /kohadevbox/koha/Koha/Illbackends/FreeForm >git checkout b_36243 >3) Restart plack: >koha-plack --restart kohadev >4) Start by adding an e-mail address to the patron of category "Inter-library Loan", visit: ><staff_url>/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=16 >5) Add an e-mail address to "Primary e-mail" >6) Create a new FreeForm request, visit: ><staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm >7) Set 'type' enter '42' in cardnumber and pick a library. Click 'Create'. >8) Click "Place request with partners" >9) Pick a partner library (will be the same patron from step 4) >10) Click "Send email". Notice the CSRF error. >11) Apply patch and restart plack >koha-plack --restart kohadev >12) Repeat 8-10. Notice error no longer shows. >13) Notice the request's status is now 'Requested from partners' >--- > Koha/Illrequest.pm | 1 + > ill/ill-requests.pl | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +- > 3 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 11cfb0f784c..95f61b3de46 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -2055,6 +2055,7 @@ sub get_op_param_deprecation { > $op = $params->{op} // $params->{method} // 'illlist'; > $op = 'cud-create' if $op eq 'create'; > $op = 'cud-edit_action' if $op eq 'edit_action'; >+ $op = 'cud-generic_confirm' if $op eq 'generic_confirm'; > $op = 'cud-cancel' if $op eq 'cancel'; > $op = 'cud-delete' if $op eq 'delete'; > } >diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl >index a11ccbf44be..8dc24d5842e 100755 >--- a/ill/ill-requests.pl >+++ b/ill/ill-requests.pl >@@ -307,7 +307,8 @@ if ( $backends_available ) { > # handle special commit rules & update type > handle_commit_maybe($backend_result, $request); > >- } elsif ( $op eq 'generic_confirm' ) { >+ } elsif ( $op eq 'cud-generic_confirm' ) { >+ $op =~ s/^cud-//; > my $backend_result; > my $request; > try { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 8be24b166b7..cc510fc16a6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -357,7 +357,7 @@ > <textarea name="body" id="body" rows="20" cols="80" required="required">[% whole.value.draft.body | html %]</textarea> > </li> > </ol> >- <input type="hidden" value="generic_confirm" name="op"> >+ <input type="hidden" value="cud-generic_confirm" name="op"> > <input type="hidden" value="draft" name="stage"> > <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id"> > </fieldset> >-- >2.30.2
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 36249
:
162838
|
162840
|
162841
|
162873
|
162874