Bugzilla – Attachment 152055 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]
Add item type option to batch extend due date tool
Bug-26978-Add-item-type-option-to-batch-extend-due-d.patch (text/plain), 3.26 KB, created by
Hinemoea Viault
on 2023-06-06 16:53:07 UTC
(
hide
)
Description:
Add item type option to batch extend due date tool
Filename:
MIME Type:
Creator:
Hinemoea Viault
Created:
2023-06-06 16:53:07 UTC
Size:
3.26 KB
patch
obsolete
>From 14b81a8ec134a83f001ca38d391cab32bde27de2 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 > >--- > .../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 7ca54add95..f01127d96f 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..bc22420395 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.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 26978
:
152055
|
152120
|
155378