Bugzilla – Attachment 124124 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: Adjust POD and move date check before logging
Bug-25619-Adjust-POD-and-move-date-check-before-lo.patch (text/plain), 2.19 KB, created by
Nick Clemens (kidclamp)
on 2021-08-26 19:09:51 UTC
(
hide
)
Description:
Bug 25619: Adjust POD and move date check before logging
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-08-26 19:09:51 UTC
Size:
2.19 KB
patch
obsolete
>From 008c36c07363dcb704ad2d47e8e8c6824616b6e8 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 26 Aug 2021 19:07:53 +0000 >Subject: [PATCH] Bug 25619: Adjust POD and move date check before logging > >Potentially we could have logged a change when no date was passed. > >This patch moves the test before logging and updates POD > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Reserves.pm | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 50cfbe0df6..f2ee463979 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1007,6 +1007,9 @@ that the item is not waiting on the hold shelf, setting the > priority to a non-zero value also sets the request's found > status and waiting date to NULL. > >+If the hold is 'found' (waiting, in-transit, processing) the >+only field that can be updated is the expiration date. >+ > The optional C<$itemnumber> parameter is used only when > C<$rank> is a non-zero integer; if supplied, the itemnumber > of the hold request is set accordingly; if omitted, the itemnumber >@@ -1030,6 +1033,7 @@ sub ModReserve { > my $borrowernumber = $params->{'borrowernumber'}; > my $biblionumber = $params->{'biblionumber'}; > my $cancellation_reason = $params->{'cancellation_reason'}; >+ my $date = $params->{expirationdate}; > > return if $rank eq "n"; > >@@ -1048,15 +1052,12 @@ sub ModReserve { > if ( $rank eq "del" ) { > $hold->cancel({ cancellation_reason => $cancellation_reason }); > } >- elsif ($hold->found && $hold->priority eq '0') { >+ elsif ($hold->found && $hold->priority eq '0' && $date) { > 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(); >- } >+ $hold->expirationdate(dt_from_string($date))->store(); > } > elsif ($rank =~ /^\d+/ and $rank > 0) { > logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) ) >-- >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