Bugzilla – Attachment 128306 Details for
Bug 24194
Add system preference to disable the use of expiration dates for holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24194: (follow-up) Use ReservesExpiration in other places
Bug-24194-follow-up-Use-ReservesExpiration-in-othe.patch (text/plain), 3.65 KB, created by
Aleisha Amohia
on 2021-12-07 04:09:54 UTC
(
hide
)
Description:
Bug 24194: (follow-up) Use ReservesExpiration in other places
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2021-12-07 04:09:54 UTC
Size:
3.65 KB
patch
obsolete
>From 3a20d515c9df81bb94a89561e526bff0c6573299 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 16 Mar 2021 14:33:15 +1300 >Subject: [PATCH] Bug 24194: (follow-up) Use ReservesExpiration in other places > >--- > C4/ILSDI/Services.pm | 4 ++-- > C4/Reserves.pm | 2 +- > Koha/Club/Hold.pm | 2 +- > Koha/REST/V1/Clubs/Holds.pm | 2 +- > Koha/REST/V1/Holds.pm | 2 +- > 5 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 34465a7caf..b29e8033e6 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -779,7 +779,7 @@ sub HoldTitle { > } > > my $expdate; >- if ( $cgi->param('expiry_date') ) { >+ if ( C4::Context->preference('ReserveExpiration') and $cgi->param('expiry_date') ) { > $expdate = $cgi->param('expiry_date'); > } > >@@ -881,7 +881,7 @@ sub HoldItem { > } > > my $expdate; >- if ( $cgi->param('expiry_date') ) { >+ if ( C4::Context->preference('ReserveExpiration') and $cgi->param('expiry_date') ) { > $expdate = $cgi->param('expiry_date'); > } > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index ab4a3093e7..f55b98e26d 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -185,7 +185,7 @@ sub AddReserve { > my $biblionumber = $params->{biblionumber}; > my $priority = $params->{priority}; > my $resdate = $params->{reservation_date}; >- my $expdate = $params->{expiration_date}; >+ my $expdate = C4::Context->preference('ReserveExpiration') ? $params->{expiration_date} : undef; > my $notes = $params->{notes}; > my $title = $params->{title}; > my $checkitem = $params->{itemnumber}; >diff --git a/Koha/Club/Hold.pm b/Koha/Club/Hold.pm >index fbf35f4314..63a0eef74b 100644 >--- a/Koha/Club/Hold.pm >+++ b/Koha/Club/Hold.pm >@@ -123,7 +123,7 @@ sub add { > borrowernumber => $patron_id, > biblionumber => $params->{biblio_id}, > priority => $priority, >- expiration_date => $params->{expiration_date}, >+ expiration_date => C4::Context->preference('ReserveExpiration') ? $params->{expiration_date} : undef, > notes => $params->{notes}, > title => $biblio->title, > itemnumber => $params->{item_id}, >diff --git a/Koha/REST/V1/Clubs/Holds.pm b/Koha/REST/V1/Clubs/Holds.pm >index 3333d75e7d..57f396135b 100644 >--- a/Koha/REST/V1/Clubs/Holds.pm >+++ b/Koha/REST/V1/Clubs/Holds.pm >@@ -54,7 +54,7 @@ sub add { > my $pickup_library_id = $body->{pickup_library_id}; > my $item_id = $body->{item_id}; > my $item_type = $body->{item_type}; >- my $expiration_date = $body->{expiration_date}; >+ my $expiration_date = C4::Context->preference('ReserveExpiration') ? $body->{expiration_date} : undef; > my $notes = $body->{notes}; > my $default_patron_home = $body->{default_patron_home}; > >diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm >index 0ca60b1459..ec4becf8ad 100644 >--- a/Koha/REST/V1/Holds.pm >+++ b/Koha/REST/V1/Holds.pm >@@ -74,7 +74,7 @@ sub add { > my $item_id = $body->{item_id}; > my $patron_id = $body->{patron_id}; > my $item_type = $body->{item_type}; >- my $expiration_date = $body->{expiration_date}; >+ my $expiration_date = C4::Context->preference('ReserveExpiration') ? $body->{expiration_date} : undef; > my $notes = $body->{notes}; > my $hold_date = $body->{hold_date}; > my $non_priority = $body->{non_priority}; >-- >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 24194
:
96120
|
96121
|
98048
|
98368
|
100927
|
110082
|
110127
|
111443
|
113284
|
113285
|
116626
|
116627
|
117016
|
117085
|
117089
|
117097
|
117098
|
117099
|
117100
|
117101
|
118258
|
118259
|
118260
|
118261
|
118262
|
118263
|
128301
|
128302
|
128303
|
128304
|
128305
|
128306
|
128307
|
128308
|
140646
|
140647
|
144076
|
147527
|
147528
|
150799
|
150800
|
159060
|
159061
|
167796
|
167797
|
169174
|
174650
|
174651
|
174652