Bugzilla – Attachment 116542 Details for
Bug 25755
Add a Koha::Item->request_transfer method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25755: (QA follow-up) Clarify POD and parameters
Bug-25755-QA-follow-up-Clarify-POD-and-parameters.patch (text/plain), 3.01 KB, created by
Martin Renvoize (ashimema)
on 2021-02-09 10:47:14 UTC
(
hide
)
Description:
Bug 25755: (QA follow-up) Clarify POD and parameters
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-02-09 10:47:14 UTC
Size:
3.01 KB
patch
obsolete
>From 11c24a642b3ad773a1293e67b3ea5675c4a04f41 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 18 Sep 2020 12:14:25 +0100 >Subject: [PATCH] Bug 25755: (QA follow-up) Clarify POD and parameters >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch removes a FIXME that signified possible future work and also >updates the POD and optional parameters to more clearly specify their >function. > >Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >--- > Koha/Item.pm | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 398e4b411b..76e9ef39b3 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -405,12 +405,12 @@ sub holds { > =head3 request_transfer > > my $transfer = $item->request_transfer( >- { to => $to_library, reason => $reason, force => 0 } ); >+ { to => $to_library, reason => $reason, ignore_limits => 0 } ); > > Add a transfer request for this item to the given branch for the given reason. > > An exception will be thrown if the BranchTransferLimits would prevent the requested >-transfer, unless 'force' is passed to override the limits. >+transfer, unless 'ignore_limits' is passed to override the limits. > > Note: At this time, only one active transfer (i.e pending arrival date) may exist > at a time for any given item. An exception will be thrown should you attempt to >@@ -434,10 +434,10 @@ sub request_transfer { > my $request; > Koha::Exceptions::Item::Transfer::Found->throw( transfer => $request ) > if ( $request = $self->get_transfer ); >- # FIXME: Add override functionality to allow for queing transfers > > Koha::Exceptions::Item::Transfer::Limit->throw() >- unless ( $params->{force} || $self->can_be_transferred( { to => $params->{to} } ) ); >+ unless ( $params->{ignore_limits} >+ || $self->can_be_transferred( { to => $params->{to} } ) ); > > my $transfer = Koha::Item::Transfer->new( > { >@@ -458,9 +458,11 @@ sub request_transfer { > > Return the active transfer request or undef > >-Note: Transfers are retrieved in a LIFO (Last In First Out) order using this method. >+Note: Transfers are retrieved in a Modified FIFO (First In First Out) order >+whereby the most recently sent, but not recieved, transfer will be returned >+if it exists, otherwise the oldest unsatisfied transfer will be returned. > >-FIXME: Add Tests for LIFO functionality >+FIXME: Add Tests for FIFO functionality > > =cut > >@@ -469,7 +471,7 @@ sub get_transfer { > my $transfer_rs = $self->_result->branchtransfers->search( > { datearrived => undef }, > { >- order_by => [ { -asc => 'datesent' }, { -asc => 'daterequested' } ], >+ order_by => [ { -desc => 'datesent' }, { -asc => 'daterequested' } ], > rows => 1 > } > )->first; >-- >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 25755
:
105887
|
107240
|
107294
|
110273
|
110376
|
110392
|
110393
|
110394
|
110430
|
110466
|
110502
|
110503
|
110504
|
110505
|
110506
|
111142
|
111143
|
111144
|
111145
|
111146
|
116541
|
116542
|
116543
|
116544
|
116545
|
116546
|
117574
|
117575
|
117576
|
117577
|
117578
|
117579