Bugzilla – Attachment 90613 Details for
Bug 9834
Reverting a waiting hold should lead to the former hold type (item or biblio level)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9834: Preserve biblio level hold preference on reverting waiting status
Bug-9834-Preserve-biblio-level-hold-preference-on-.patch (text/plain), 1.76 KB, created by
Nick Clemens (kidclamp)
on 2019-06-14 17:49:47 UTC
(
hide
)
Description:
Bug 9834: Preserve biblio level hold preference on reverting waiting status
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-06-14 17:49:47 UTC
Size:
1.76 KB
patch
obsolete
>From a8dc114201ae820addea054e2c5a9f7c03839e8a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 6 Jun 2019 14:50:05 -0500 >Subject: [PATCH] Bug 9834: Preserve biblio level hold preference on reverting > waiting status > >When the waiting status of a hold is revert we want to preserve the >level hold preference of the user. > >Test plan: >Place a hold at biblio level >Confirm the hold >Revert the waiting hold > >=> The hold must still be considered as a biblio level hold ("next >available item") > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Reserves.pm | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 205ed7873a..097a5c09d6 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -210,6 +210,7 @@ sub AddReserve { > waitingdate => $waitingdate, > expirationdate => $expdate, > itemtype => $itemtype, >+ item_level_hold => $checkitem ? 1 : 0, > } > )->store(); > $hold->set_waiting() if $found eq 'W'; >@@ -1894,6 +1895,8 @@ sub RevertWaitingStatus { > $sth->execute( $itemnumber ); > my $reserve = $sth->fetchrow_hashref(); > >+ my $hold = Koha::Holds->find( $reserve->{reserve_id} ); # TODO Remove the next raw SQL statements and use this instead >+ > ## Increment the priority of all other non-waiting > ## reserves for this bib record > $query = " >@@ -1920,6 +1923,11 @@ sub RevertWaitingStatus { > "; > $sth = $dbh->prepare( $query ); > $sth->execute( $reserve->{'reserve_id'} ); >+ >+ unless ( $hold->item_level_hold ) { >+ $hold->itemnumber(undef)->store; >+ } >+ > _FixPriority( { biblionumber => $reserve->{biblionumber} } ); > } > >-- >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 9834
:
90397
|
90398
|
90399
|
90436
|
90437
|
90438
|
90611
|
90612
| 90613 |
90677