Bugzilla – Attachment 97538 Details for
Bug 24299
Record if a transfer was triggered by 'rotating collections'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Bug-24299-Record-RotatingCollection-as-a-transfer-.patch (text/plain), 2.61 KB, created by
Martin Renvoize (ashimema)
on 2020-01-17 16:01:48 UTC
(
hide
)
Description:
Bug 24299: Record 'RotatingCollection' as a transfer trigger
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-01-17 16:01:48 UTC
Size:
2.61 KB
patch
obsolete
>From 95c165d5869c93e53d47aabbd1d5a376a44bda2d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 16 Jan 2020 16:40:10 +0000 >Subject: [PATCH] Bug 24299: Record 'RotatingCollection' as a transfer trigger > >--- > C4/Circulation.pm | 8 +++++--- > C4/RotatingCollections.pm | 3 +-- > 2 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index fc7026f39c..90c114eaa6 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -251,7 +251,7 @@ sub decode { > =head2 transferbook > > ($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, >- $barcode, $ignore_reserves); >+ $barcode, $ignore_reserves, $trigger); > > Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer. > >@@ -262,6 +262,8 @@ C<$barcode> is the barcode of the item to be transferred. > If C<$ignore_reserves> is true, C<&transferbook> ignores reserves. > Otherwise, if an item is reserved, the transfer fails. > >+C<$trigger> is the enum value for what triggered the transfer. >+ > Returns three values: > > =over >@@ -303,7 +305,7 @@ The item was eligible to be transferred. Barring problems communicating with the > =cut > > sub transferbook { >- my ( $tbr, $barcode, $ignoreRs ) = @_; >+ my ( $tbr, $barcode, $ignoreRs, $trigger ) = @_; > my $messages; > my $dotransfer = 1; > my $item = Koha::Items->find( { barcode => $barcode } ); >@@ -360,7 +362,7 @@ sub transferbook { > > #actually do the transfer.... > if ($dotransfer) { >- ModItemTransfer( $itemnumber, $fbr, $tbr ); >+ ModItemTransfer( $itemnumber, $fbr, $tbr, $trigger ); > > # don't need to update MARC anymore, we do it in batch now > $messages->{'WasTransfered'} = 1; >diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm >index 709eaf2164..a4477fa9e5 100644 >--- a/C4/RotatingCollections.pm >+++ b/C4/RotatingCollections.pm >@@ -446,11 +446,10 @@ sub TransferCollection { > while ( my $item = $sth->fetchrow_hashref ) { > my ($status) = CheckReserves( $item->{itemnumber} ); > my @transfers = C4::Circulation::GetTransfers( $item->{itemnumber} ); >- C4::Circulation::transferbook( $colBranchcode, $item->{barcode}, my $ignore_reserves = 1 ) unless ( $status eq 'Waiting' || @transfers ); >+ C4::Circulation::transferbook( $colBranchcode, $item->{barcode}, 1, 'RotatingCollection' ) unless ( $status eq 'Waiting' || @transfers ); > } > > return 1; >- > } > > =head2 GetCollectionItemBranches >-- >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 24299
:
97464
|
97465
|
97508
|
97509
|
97537
|
97538
|
98295
|
98296
|
100626
|
100627
|
101075
|
101076
|
101077
|
101083
|
101084
|
101085
|
101086
|
101097