Bugzilla – Attachment 58108 Details for
Bug 17736
Move GetReservesFromBiblionumber to Koha::Biblio->holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17736: Remove C4::Reserves::GetReservesFromBiblionumber
Bug-17736-Remove-C4ReservesGetReservesFromBiblionu.patch (text/plain), 3.07 KB, created by
Jonathan Druart
on 2016-12-12 10:19:05 UTC
(
hide
)
Description:
Bug 17736: Remove C4::Reserves::GetReservesFromBiblionumber
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-12-12 10:19:05 UTC
Size:
3.07 KB
patch
obsolete
>From e5ef841b5d30d13d896be0a1e15dfeb8b6b7f5ba Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 7 Dec 2016 12:26:53 +0100 >Subject: [PATCH] Bug 17736: Remove C4::Reserves::GetReservesFromBiblionumber > >At this point, there should not be any occurrences of >GetReservesFromBiblionumber left in the codebase >--- > C4/Reserves.pm | 67 ---------------------------------------------------------- > 1 file changed, 67 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 9ef33ad..547c19e 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -105,7 +105,6 @@ BEGIN { > > &GetReserve > &GetReservesFromItemnumber >- &GetReservesFromBiblionumber > &GetReservesFromBorrowernumber > &GetReservesForBranch > &GetReservesToBranch >@@ -276,72 +275,6 @@ sub GetReserve { > return $sth->fetchrow_hashref(); > } > >-=head2 GetReservesFromBiblionumber >- >- my $reserves = GetReservesFromBiblionumber({ >- biblionumber => $biblionumber, >- [ itemnumber => $itemnumber, ] >- [ all_dates => 1|0 ] >- }); >- >-This function gets the list of reservations for one C<$biblionumber>, >-returning an arrayref pointing to the reserves for C<$biblionumber>. >- >-By default, only reserves whose start date falls before the current >-time are returned. To return all reserves, including future ones, >-the C<all_dates> parameter can be included and set to a true value. >- >-If the C<itemnumber> parameter is supplied, reserves must be targeted >-to that item or not targeted to any item at all; otherwise, they >-are excluded from the list. >- >-=cut >- >-sub GetReservesFromBiblionumber { >- my ( $params ) = @_; >- my $biblionumber = $params->{biblionumber} or return []; >- my $itemnumber = $params->{itemnumber}; >- my $all_dates = $params->{all_dates} // 0; >- my $dbh = C4::Context->dbh; >- >- # Find the desired items in the reserves >- my @params; >- my $query = " >- SELECT reserve_id, >- branchcode, >- timestamp AS rtimestamp, >- priority, >- biblionumber, >- borrowernumber, >- reservedate, >- found, >- itemnumber, >- reservenotes, >- expirationdate, >- lowestPriority, >- suspend, >- suspend_until, >- itemtype >- FROM reserves >- WHERE biblionumber = ? "; >- push( @params, $biblionumber ); >- unless ( $all_dates ) { >- $query .= " AND reservedate <= CAST(NOW() AS DATE) "; >- } >- if ( $itemnumber ) { >- $query .= " AND ( itemnumber IS NULL OR itemnumber = ? )"; >- push( @params, $itemnumber ); >- } >- $query .= "ORDER BY priority"; >- my $sth = $dbh->prepare($query); >- $sth->execute( @params ); >- my @results; >- while ( my $data = $sth->fetchrow_hashref ) { >- push @results, $data; >- } >- return \@results; >-} >- > =head2 GetReservesFromItemnumber > > ( $reservedate, $borrowernumber, $branchcode, $reserve_id, $waitingdate ) = GetReservesFromItemnumber($itemnumber); >-- >2.1.4
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 17736
:
58015
|
58016
|
58017
|
58056
|
58057
|
58106
|
58107
|
58108
|
58628
|
58629
|
58630
|
58631
|
58632
|
58633
|
58634
|
58635
|
58636
|
58637
|
58638
|
58639
|
58640
|
58641
|
58642
|
58643
|
58644
|
58645
|
59846
|
59847
|
59848
|
59849
|
59850
|
59851
|
59852
|
59853
|
59854
|
59855
|
59859
|
59860
|
61406
|
61407
|
61408
|
61409
|
61410
|
61411
|
61412
|
61413
|
61414
|
61415
|
61416