Bugzilla – Attachment 168322 Details for
Bug 37197
Batch patron modification from reports fails by using GET instead of POST
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37197: Reports option to send to batch patron modification needs to use POST
Bug-37197-Reports-option-to-send-to-batch-patron-m.patch (text/plain), 2.75 KB, created by
Matt Blenkinsop
on 2024-07-01 15:38:25 UTC
(
hide
)
Description:
Bug 37197: Reports option to send to batch patron modification needs to use POST
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-07-01 15:38:25 UTC
Size:
2.75 KB
patch
obsolete
>From 714b0ac87d4c4e414d2fdc666a89a912d36b5ce3 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Wed, 26 Jun 2024 20:19:21 -0700 >Subject: [PATCH] Bug 37197: Reports option to send to batch patron > modification needs to use POST > >When you have an SQL report that selects cardnumber from borrowers, you >get a menuitem to send the results to Batch patron modification. Currently >that fails with a message about no card numbers or borrowernumbers given, >because it tries to do a GET with the op show, when modborrowers.pl is >expecting a POST with the op cud-show. > >Test plan: >1. Without the patch, Reports - Create from SQL - name it and paste > >select cardnumber from borrowers > > in the SQL textarea and save, then Run report. >2. Above the results is a "Batch operations with 20 visible records" menu, > choose Batch patron modification >3. Note that instead of modifying the records, you're stuck with a message > saying "No patron card numbers or borrowernumbers given." even though > there's a whole string of them in the URL. >4. Apply patch, refresh the page with the results (oddly, no apparent need > to even restart_all), and choose the menuitem again, but this time with > a successful result. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >--- > .../prog/en/modules/reports/guided_reports_start.tt | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 50f7a65a4f..f88de0f101 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -1004,8 +1004,9 @@ > [% END %] > </form> > >- <form method="get" action="/cgi-bin/koha/tools/modborrowers.pl" id="batch_patron_modification" target="_blank"> >- <input type="hidden" name="op" value="show" /> >+ <form method="POST" action="/cgi-bin/koha/tools/modborrowers.pl" id="batch_patron_modification" target="_blank"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <input type="hidden" name="op" value="cud-show" /> > [% # Preserve the whitespace of the following textarea in order to format the values correctly %] > [%- cardnumbers = PROCESS batch_list results=results batch_type='cardnumber' | trim | html %] > [% IF cardnumbers %] >-- >2.39.3 (Apple Git-146)
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 37197
:
168187
|
168287
| 168322