Bugzilla – Attachment 23727 Details for
Bug 6331
Obsolete marc column in deleteditems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6331 - Update timestamp when deleting items
Bug-6331---Update-timestamp-when-deleting-items.patch (text/plain), 1.72 KB, created by
Kyle M Hall (khall)
on 2013-12-20 17:50:08 UTC
(
hide
)
Description:
Bug 6331 - Update timestamp when deleting items
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-12-20 17:50:08 UTC
Size:
1.72 KB
patch
obsolete
>From 0706921a11b9cbe663e54a51f5974410f7b567fe Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Thu, 5 Dec 2013 15:34:44 +0100 >Subject: [PATCH] Bug 6331 - Update timestamp when deleting items > >When item is transfered from items table to deleted items, all fields must be copies but "timestamp". >This value must be updated to know when item has been deleted. > >Test plan: >- Look a an item timestamp : >mysql> select timestamp from items where itemnumber = 2690; >+---------------------+ >| timestamp | >+---------------------+ >| 2011-09-09 15:30:21 | >+---------------------+ >1 row in set (0.00 sec) >- Delete this item in cataloguing module >- Check it is not in items table anymore : >mysql> select timestamp from items where itemnumber = 2690; >Empty set (0.00 sec) >- Look in deleteditems table : >mysql> select timestamp from deleteditems where itemnumber = 2690; >+---------------------+ >| timestamp | >+---------------------+ >| 2013-12-05 15:33:20 | >+---------------------+ >1 row in set (0.00 sec) >=> timestamp as been set to actual date/time > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Patch set passes koha-qa.pl, works as advertised! >--- > C4/Items.pm | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 068291b..4c1a4ad 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -2336,6 +2336,7 @@ sub _koha_delete_item { > my $query = "INSERT INTO deleteditems SET "; > my @bind = (); > foreach my $key ( keys %$data ) { >+ next if ( $key eq 'timestamp' ); # timestamp will be set by db > $query .= "$key = ?,"; > push( @bind, $data->{$key} ); > } >-- >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 6331
:
23055
|
23230
|
23256
|
23316
|
23320
|
23356
|
23725
|
23726
| 23727