Bugzilla – Attachment 90399 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.66 KB, created by
Jonathan Druart
on 2019-06-06 19:53:29 UTC
(
hide
)
Description:
Bug 9834: Preserve biblio level hold preference on reverting waiting status
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-06-06 19:53:29 UTC
Size:
1.66 KB
patch
obsolete
>From 45bebb7ae683c86745518ec347e12070a7418970 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") >--- > 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