Bugzilla – Attachment 164060 Details for
Bug 36135
Add tool to batch modify holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36135: Allow using SQL results in batch modify holds tool
Bug-36135-Allow-using-SQL-results-in-batch-modify-.patch (text/plain), 6.49 KB, created by
Lucas Gass (lukeg)
on 2024-03-28 14:13:00 UTC
(
hide
)
Description:
Bug 36135: Allow using SQL results in batch modify holds tool
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-03-28 14:13:00 UTC
Size:
6.49 KB
patch
obsolete
>From 0e457e64d3875a84f4c60280190eade59e1ed050 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Fri, 8 Mar 2024 13:47:16 +0200 >Subject: [PATCH] Bug 36135: Allow using SQL results in batch modify holds tool > >This patch adds ability to use SQL results for batch holds >tool if report contains column reserve_id. > >To test: >1. Create SQL report which contains column for reserve_id. >=> e.g "SELECT reserve_id FROM reserves limit 10". >2. Run report. >3. Over report select "Batch operations" should be displayed >and under that there should be option "Batch modify holds". >4. Click "Batch modify holds" option. >=> Confirm that holds displayed in "Batch mofidy holds" tool >are same as found with your report. > >Sponsored-by: Koha-Suomi Oy >Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../modules/reports/guided_reports_start.tt | 27 ++++++++++++++++--- > 1 file changed, 23 insertions(+), 4 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 d402cdba38..1685165548 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 >@@ -1018,6 +1018,19 @@ > </textarea> > </form> > >+ <form method="POST" action="/cgi-bin/koha/tools/batch_modify_holds.pl" id="batch_modify_holds"> >+ <input type="hidden" name="op" value="list" /> >+ [% FOREACH result IN results %] >+ [% FOREACH cells IN result.cells %] >+ [% place = loop.index %] >+ [% IF header_row.$place.cell == 'reserve_id' || header_types.item(header_row.$place.cell) == 'reserve_id' %] >+ [% SET batch_reserve_ids = 1 %] >+ <input type="hidden" name="reserve_ids" value="[% cells.cell | html %]" /> >+ [% END %] >+ [% END %] >+ [% END %] >+ </form> >+ > [% BLOCK batch_list %] > [%- FOREACH result IN results %] > [%- FOREACH cells IN result.cells %] >@@ -1041,9 +1054,9 @@ > <input type="hidden" name="limit" id="limit" value="20" /> > </form> <!-- /#limitselect --> > >- [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers ) || ( unlimited_total > 10 && limit <= 1000 ) %] >+ [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers || batch_reserve_ids ) || ( unlimited_total > 10 && limit <= 1000 ) %] > <div id="toolbar" class="btn-toolbar"> >- [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers ) %] >+ [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_borrowernumbers || batch_reserve_ids ) %] > <div class="btn-group"> > <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="batch_mod_menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> > Batch operations with [% IF unlimited_total >= limit %][% limit | html %][% ELSE %][% unlimited_total | html %][% END %] visible records >@@ -1095,10 +1108,16 @@ > <a href="#" data-submit="batch_item_deletion" data-toggle="tooltip" data-placement="right" title="Send visible items to batch item deletion" class="batch_op send_to_item_del">Batch item deletion</a> > </li> > [% END %] >+ [% IF header_ro.cell == 'reserve_id' || header_types.item( header_ro.cell ) == 'reserve_id' %] >+ <li class="dropdown-header">Hold records</li> >+ <li> >+ <a href="#" data-submit="batch_modify_holds" data-toggle="tooltip" data-placement="right" title="Send visible results to batch hold modification" class="batch_op send_to_hold_mod">Batch hold modification</a> >+ </li> >+ [% END %] > [% END # /FOREACH header_ro %] > </ul> <!-- /.dropdown-menu --> > </div> <!-- /.dropdown --> >- [% END # /IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %] >+ [% END # /IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_reserve_ids ) %] > > [% IF ( unlimited_total > 10 && limit <= 1000 ) %] > <div class="btn-group"> >@@ -1127,7 +1146,7 @@ > </div> > [% END # /IF ( unlimited_total > 10 && limit <= 1000 ) %] > >- [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers ) %] >+ [% IF ( batch_biblionumbers || batch_itemnumbers || batch_cardnumbers || batch_reserve_ids ) %] > <a href="#" class="btn btn-link" id="toggle_auto_links"> > <i class="fa-solid fa-eye autolink" style="display:none"></i> > <i class="fa-solid fa-eye-slash autolink"></i> >-- >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 36135
:
163021
|
163022
|
163023
|
163024
|
163529
|
163530
|
163540
|
163541
|
163542
|
163543
|
163544
|
163796
|
164037
|
164051
|
164057
|
164058
|
164059
| 164060 |
164061
|
164062
|
164063