Bugzilla – Attachment 23976 Details for
Bug 8836
Resurrect Rotating Collections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8836 - Resurrect Rotating Collections - Followup 5 - Don't transfer issued and waiting items
Bug-8836---Resurrect-Rotating-Collections---Follow.patch (text/plain), 2.24 KB, created by
Kyle M Hall (khall)
on 2014-01-06 17:39:54 UTC
(
hide
)
Description:
Bug 8836 - Resurrect Rotating Collections - Followup 5 - Don't transfer issued and waiting items
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-01-06 17:39:54 UTC
Size:
2.24 KB
patch
obsolete
>From 0bdabffa5d78de7bfd80413b61f2177d18c8cbf6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 6 Jan 2014 12:37:02 -0500 >Subject: [PATCH] Bug 8836 - Resurrect Rotating Collections - Followup 5 - Don't transfer issued and waiting items > >Items in a rotating collection are automatcially transferred when a >collection is transferred. This is a problem for currently checked out >items and items on hold marked as "Waiting". > >This patch resolves this issue by skipping the transfer for those items. >When the items are then returned, the librarian will be alerted to >transfer the item to the library currently holding that rotating >collection. >--- > C4/RotatingCollections.pm | 19 +++++++++++-------- > 1 files changed, 11 insertions(+), 8 deletions(-) > >diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm >index 6030089..0c5d163 100644 >--- a/C4/RotatingCollections.pm >+++ b/C4/RotatingCollections.pm >@@ -26,6 +26,7 @@ use Modern::Perl; > > use C4::Context; > use C4::Circulation; >+use C4::Reserves qw(GetReserveStatus); > > use DBI; > >@@ -424,17 +425,19 @@ sub TransferCollection { > ); > $sth->execute( $colBranchcode, $colId ) or return ( 0, 4, $sth->errstr() ); > >- $sth = $dbh->prepare( >- "SELECT barcode FROM items, collections_tracking >- WHERE items.itemnumber = collections_tracking.itemnumber >- AND collections_tracking.colId = ?" >- ); >+ $sth = $dbh->prepare(q{ >+ SELECT items.itemnumber, items.barcode FROM collections_tracking >+ LEFT JOIN items ON collections_tracking.itemnumber = items.itemnumber >+ LEFT JOIN issues ON items.itemnumber = issues.itemnumber >+ WHERE issues.borrowernumber IS NULL >+ AND collections_tracking.colId = ? >+ }); > $sth->execute($colId) or return ( 0, 4, $sth->errstr ); > my @results; > while ( my $item = $sth->fetchrow_hashref ) { >- my ( $dotransfer, $messages, $iteminformation ) = >- transferbook( $colBranchcode, $item->{'barcode'}, >- my $ignore_reserves = 1 ); >+ transferbook( $colBranchcode, $item->{barcode}, >+ my $ignore_reserves = 1 ) >+ unless ( GetReserveStatus( $item->{itemnumber} ) eq "Waiting" ); > } > > return 1; >-- >1.7.2.5
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 8836
:
12560
|
16746
|
19118
|
19119
|
19337
|
19339
|
21008
|
21009
|
21010
|
21011
|
23966
|
23967
|
23968
|
23969
|
23970
|
23971
|
23976
|
28140
|
28141
|
30838
|
30921
|
31087
|
32361
|
32362
|
32588
|
32589
|
32690
|
32691
|
32693
|
32773
|
32774
|
32973
|
32974
|
32975
|
32976
|
32994
|
32999
|
33000
|
33001
|
33002
|
33045
|
33046
|
33047
|
33048
|
33050
|
33051
|
33058
|
33059
|
33060
|
33061
|
33062
|
33063
|
33064
|
33065
|
33066
|
33068
|
33070
|
33095
|
33096
|
33097
|
33098
|
33099
|
33100
|
33101
|
33102
|
33103
|
33330
|
33331
|
33374