Bugzilla – Attachment 105241 Details for
Bug 25560
Define itemtype specific rules in the UpdateNotForLoanStatusOnCheckin system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25560: Exclude itemtypes from UpdateNotForLoanStatusOnCheckin
Bug-25560-Exclude-itemtypes-from-UpdateNotForLoanS.patch (text/plain), 2.98 KB, created by
Alex Buckley
on 2020-05-22 00:44:00 UTC
(
hide
)
Description:
Bug 25560: Exclude itemtypes from UpdateNotForLoanStatusOnCheckin
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2020-05-22 00:44:00 UTC
Size:
2.98 KB
patch
obsolete
>From ae225535094ee99044271cf59552795d7ea50bc3 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Thu, 21 May 2020 23:56:15 +0000 >Subject: [PATCH] Bug 25560: Exclude itemtypes from > UpdateNotForLoanStatusOnCheckin > >Sponsored-By: Waikati Institute of Technology, NZ >--- > C4/Circulation.pm | 4 ++++ > admin/itemtypes.pl | 3 +++ > 2 files changed, 7 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e439250933..0744a4f8f2 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1934,6 +1934,10 @@ sub AddReturn { > } > else { > foreach my $key ( keys %$rules ) { >+ # If item type in use has a disabled updatenotforloanstatusoncheckin flag then don't update notforloan >+ my $updatenotforloanstatusoncheckin = C4::Context->preference("item-level_itypes") ? Koha::ItemTypes->find($item->itype)->updatenotforloanstatusoncheckin : Koha::ItemTypes->find($item->biblioitem->itemtype)->updatenotforloanstatusoncheckin; >+ last if !$updatenotforloanstatusoncheckin; >+ > if ( $item->notforloan eq $key ) { > $messages->{'NotForLoanStatusUpdated'} = { from => $item->notforloan, to => $rules->{$key} }; > $item->notforloan($rules->{$key})->store({ log_action => 0 }); >diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl >index 7b13dac7b7..707be786d5 100755 >--- a/admin/itemtypes.pl >+++ b/admin/itemtypes.pl >@@ -104,6 +104,7 @@ if ( $op eq 'add_form' ) { > my $checkinmsg = $input->param('checkinmsg'); > my $checkinmsgtype = $input->param('checkinmsgtype'); > my $hideinopac = $input->param('hideinopac') // 0; >+ my $updatenotforloanstatusoncheckin = $input->param('updatenotforloanstatusoncheckin') // 0; > my $searchcategory = $input->param('searchcategory'); > my $rentalcharge_daily_calendar = $input->param('rentalcharge_daily_calendar') // 0; > my $rentalcharge_hourly_calendar = $input->param('rentalcharge_hourly_calendar') // 0; >@@ -122,6 +123,7 @@ if ( $op eq 'add_form' ) { > $itemtype->checkinmsgtype($checkinmsgtype); > $itemtype->sip_media_type($sip_media_type); > $itemtype->hideinopac($hideinopac); >+ $itemtype->updatenotforloanstatusoncheckin($updatenotforloanstatusoncheckin); > $itemtype->searchcategory($searchcategory); > $itemtype->rentalcharge_daily_calendar($rentalcharge_daily_calendar); > $itemtype->rentalcharge_hourly_calendar($rentalcharge_hourly_calendar); >@@ -153,6 +155,7 @@ if ( $op eq 'add_form' ) { > checkinmsgtype => $checkinmsgtype, > sip_media_type => $sip_media_type, > hideinopac => $hideinopac, >+ updatenotforloanstatusoncheckin => $updatenotforloanstatusoncheckin, > searchcategory => $searchcategory, > rentalcharge_daily_calendar => $rentalcharge_daily_calendar, > rentalcharge_hourly_calendar => $rentalcharge_hourly_calendar, >-- >2.11.0
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 25560
:
105236
|
105237
|
105238
|
105239
|
105240
|
105241
|
105242
|
105243
|
105244
|
105245
|
109562
|
109563
|
109564
|
109565
|
109566
|
109567
|
112492
|
112887
|
113161
|
113212
|
113213
|
113214
|
113215
|
113216
|
113217
|
131816
|
131817
|
131818
|
131819
|
131820
|
135742
|
135743
|
136079
|
136080
|
136081
|
136082
|
136083
|
136084
|
138494
|
138495
|
138496
|
138497
|
138498
|
138499
|
146556
|
146557
|
146558
|
146559
|
146993
|
148679
|
148680
|
148681
|
148682
|
148683