Bugzilla – Attachment 5693 Details for
Bug 6867
datelastseen is not imported from marc file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-6867-Date-last-seen-ignored-on-import.patch (text/plain), 1.77 KB, created by
D Ruth Holloway
on 2011-10-04 14:41:12 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
D Ruth Holloway
Created:
2011-10-04 14:41:12 UTC
Size:
1.77 KB
patch
obsolete
>From 9b04bef6d269d5e5ec49f1caa1913539a4c1b1c9 Mon Sep 17 00:00:00 2001 >From: D Ruth Bavousett <ruth@bywatersolutions.com> >Date: Tue, 4 Oct 2011 07:37:33 -0700 >Subject: [PATCH] Bug 6867: Date last seen ignored on import > >The date last seen field (952 $r) and replacement price date (952 $w) were being >ignored on import, being replaced with NOW() as a hardcoded value. This patch will >allow a value to be imported, but if none is, it will use the ISO date of import >as a default. >--- > C4/Items.pm | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index bc36dd1..69557aa 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1971,9 +1971,9 @@ sub _koha_new_item { > homebranch = ?, > price = ?, > replacementprice = ?, >- replacementpricedate = NOW(), >+ replacementpricedate = ?, > datelastborrowed = ?, >- datelastseen = NOW(), >+ datelastseen = ?, > stack = ?, > notforloan = ?, > damaged = ?, >@@ -2002,6 +2002,7 @@ sub _koha_new_item { > stocknumber = ? > "; > my $sth = $dbh->prepare($query); >+ my $today = C4::Dates->today('iso'); > $sth->execute( > $item->{'biblionumber'}, > $item->{'biblioitemnumber'}, >@@ -2011,7 +2012,9 @@ sub _koha_new_item { > $item->{'homebranch'}, > $item->{'price'}, > $item->{'replacementprice'}, >+ $item->{'replacementpricedate'} || $today, > $item->{datelastborrowed}, >+ $item->{datelastseen} || $today, > $item->{stack}, > $item->{'notforloan'}, > $item->{'damaged'}, >-- >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 6867
:
5693
|
5695