Bugzilla – Attachment 155378 Details for
Bug 26978
Add item type criteria to batch extend due date tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26978: Add item type option to batch extend due date tool
Bug-26978-Add-item-type-option-to-batch-extend-due.patch (text/plain), 3.39 KB, created by
Marcel de Rooy
on 2023-09-08 09:07:37 UTC
(
hide
)
Description:
Bug 26978: Add item type option to batch extend due date tool
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-08 09:07:37 UTC
Size:
3.39 KB
patch
obsolete
>From a368edaa60aea4e516f541221f714a8220b79dca Mon Sep 17 00:00:00 2001 >From: Hinemoea Viault <hinemoea.viault@inlibro.com> >Date: Tue, 6 Jun 2023 12:23:10 -0400 >Subject: [PATCH] Bug 26978: Add item type option to batch extend due date tool >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Sam Lau <samalau@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/tools/batch_extend_due_dates.tt | 10 ++++++++++ > tools/batch_extend_due_dates.pl | 10 ++++++++++ > 2 files changed, 20 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt >index 36d14f5eeb..ac9de55a27 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt >@@ -71,6 +71,16 @@ > </select> > </li> > >+ <li> >+ <label for="itemtypescodes">Item types: </label> >+ [% SET itemtypes = ItemTypes.Get() %] >+ <select id="itemtypecodes" name="itemtypecodes" multiple="multiple"> >+ [% FOREACH itemtype IN itemtypes %] >+ <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html%]</option> >+ [% END %] >+ </select> >+ </li> >+ > <li> > <label for="branchcodes">Libraries: </label> > <select name="branchcodes" id="branchcodes" multiple="multiple"> >diff --git a/tools/batch_extend_due_dates.pl b/tools/batch_extend_due_dates.pl >index ea961691e9..01f652de81 100755 >--- a/tools/batch_extend_due_dates.pl >+++ b/tools/batch_extend_due_dates.pl >@@ -26,6 +26,8 @@ use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); > use Koha::Checkouts; > use Koha::DateUtils qw( dt_from_string ); >+use Koha::Items; >+ > > my $input = CGI->new; > my $op = $input->param('op') // q|form|; >@@ -48,6 +50,7 @@ if ( $op eq 'form' ) { > elsif ( $op eq 'list' ) { > > my @categorycodes = $input->multi_param('categorycodes'); >+ my @itemtypecodes = $input->multi_param('itemtypecodes'); > my @branchcodes = $input->multi_param('branchcodes'); > my $from_due_date = $input->param('from_due_date'); > my $to_due_date = $input->param('to_due_date'); >@@ -61,9 +64,16 @@ elsif ( $op eq 'list' ) { > if (@categorycodes) { > $search_params->{'patron.categorycode'} = { -in => \@categorycodes }; > } >+ if (@itemtypecodes) { >+ my $search_items->{'itype'} = { -in => \@itemtypecodes }; >+ my @itemnumbers = Koha::Items->search($search_items)->get_column('itemnumber'); >+ >+ $search_params->{'itemnumber'} = { -in => \@itemnumbers }; >+ } > if (@branchcodes) { > $search_params->{'me.branchcode'} = { -in => \@branchcodes }; > } >+ > if ( $from_due_date and $to_due_date ) { > my $to_due_date_endday = dt_from_string($to_due_date); > $to_due_date_endday >-- >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 26978
:
152055
|
152120
| 155378