Bugzilla – Attachment 124120 Details for
Bug 25619
Updating an expiration date for a waiting hold won't save
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25619: Add ability to adjust expiration date for waiting holds
Bug-25619-Add-ability-to-adjust-expiration-date-fo.patch (text/plain), 2.15 KB, created by
Nick Clemens (kidclamp)
on 2021-08-26 19:09:31 UTC
(
hide
)
Description:
Bug 25619: Add ability to adjust expiration date for waiting holds
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-08-26 19:09:31 UTC
Size:
2.15 KB
patch
obsolete
>From 6d0c7d801564799eca88dd6a5238345304d407a5 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 16 Jul 2021 13:50:29 -0400 >Subject: [PATCH] Bug 25619: Add ability to adjust expiration date for waiting > holds > >There are times when an item that is waiting for pickup needs to have the expiration date extended. This would give staff the ability to modify one by one, as needed, the reserves.expirationdate for a given item awaiting pickup. > >Test Plan: >1) Place a hold, trap an item for it such that is is waiting >2) Attempt to update the expiration date >3) Note the new date is not saved >4) Apply this patch, restart all the things! >5) Attempt to update the expiration date >6) The new date should be saved! > >Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Reserves.pm | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 1d5ec22db2..e778031098 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1031,7 +1031,6 @@ sub ModReserve { > my $biblionumber = $params->{'biblionumber'}; > my $cancellation_reason = $params->{'cancellation_reason'}; > >- return if $rank eq "W"; > return if $rank eq "n"; > > return unless ( $reserve_id || ( $borrowernumber && ( $biblionumber || $itemnumber ) ) ); >@@ -1049,6 +1048,16 @@ sub ModReserve { > if ( $rank eq "del" ) { > $hold->cancel({ cancellation_reason => $cancellation_reason }); > } >+ elsif ($hold->found && $hold->priority eq '0') { >+ logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) >+ if C4::Context->preference('HoldsLog'); >+ >+ # The only column that can be updated for a found hold is the expiration date >+ my $date = $params->{expirationdate}; >+ if ($date) { >+ $hold->expirationdate(dt_from_string($date))->store(); >+ } >+ } > elsif ($rank =~ /^\d+/ and $rank > 0) { > logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) > if C4::Context->preference('HoldsLog'); >-- >2.20.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 25619
:
122922
|
122923
|
122924
|
122929
|
122930
|
123043
|
123693
|
123694
|
123695
|
123779
| 124120 |
124121
|
124122
|
124123
|
124124