Bugzilla – Attachment 2053 Details for
Bug 4372
Transferring an item does not update date last seen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix for the bug
0007-Bug-4372-Fix-for-bookcount.pl-not-counting-started-t.patch (text/plain), 1.56 KB, created by
Chris Cormack
on 2010-04-05 21:21:00 UTC
(
hide
)
Description:
Fix for the bug
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-04-05 21:21:00 UTC
Size:
1.56 KB
patch
obsolete
>From 8f97e9cea7cc61dbd62569250a81b0fbbda51ff0 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Tue, 6 Apr 2010 09:17:04 +1200 >Subject: [PATCH] Bug 4372 - Fix for bookcount.pl not counting started transfers as seeing an item > >--- > C4/Circulation.pm | 3 ++- > circ/bookcount.pl | 7 +++++-- > 2 files changed, 7 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index d780189..ef5172a 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -326,8 +326,9 @@ sub transferbook { > > # don't need to update MARC anymore, we do it in batch now > $messages->{'WasTransfered'} = 1; >- ModDateLastSeen( $itemnumber ); >+ > } >+ ModDateLastSeen( $itemnumber ); > return ( $dotransfer, $messages, $biblio ); > } > >diff --git a/circ/bookcount.pl b/circ/bookcount.pl >index 7590ec0..6a73890 100755 >--- a/circ/bookcount.pl >+++ b/circ/bookcount.pl >@@ -162,9 +162,12 @@ sub lastseenat { > $sth->execute( $itm, $brc, $itm, $brc ); > my ($date1) = $sth->fetchrow_array; > $sth = $dbh->prepare( >-"SELECT max(datearrived) FROM branchtransfers WHERE itemnumber=? AND tobranch = ?" >+ "SELECT MAX(transfer) FROM (SELECT max(datearrived) AS transfer FROM branchtransfers WHERE itemnumber=? AND tobranch = ? >+ UNION ALL >+ SELECT max(datesent) AS transfer FROM branchtransfers WHERE itemnumber=? AND frombranch = ? >+ ) tmp" > ); >- $sth->execute( $itm, $brc ); >+ $sth->execute( $itm, $brc, $itm, $brc ); > my ($date2) = $sth->fetchrow_array; > > my $date = ( $date1 lt $date2 ) ? $date2 : $date1 ; >-- >1.6.3.3 >
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 4372
: 2053