Description
Fridolin Somers
2011-05-12 07:04:46 UTC
This bug is still valid in master as of 3.12 beta1. Created attachment 23055 [details] [review] Bug 6331 - Obsolete marc column in deleteditems See commit message Created attachment 23230 [details] [review] [PATCH][SIGNED OFF] Bug 6331 - Obsolete marc column in deleteditems Test : - suppressing an item, checking the deleted item is properly stored in deleteditems table - checking the column marc has been deleted from deleteditems table I sign off Mathieu Created attachment 23256 [details] [review] Supplementary patch The main patch removes the field but DelItem still attempts to populate it supplementary patch to remove that This patch needs a followup to remove any references in code to the marc column in deleteditems. I spotted one in C4/Items.pm at least. I'm also wondering if this affects the output of tools/export.pl (or rather assume it affects) so that will need correcting to. Looks like Colin did the first followup I wanted whilst I was failing.. can someone take care of the second one? I'll then nudge Katrin to do QA as with Colin's input I no longer can.. Setting back to Needs Signoff, I've gone through the code and don't think the third followup is required.. I believe the marc column is grabbed from biblioitems in the join so this isn't a regression. Created attachment 23316 [details] [review] [SIGNED-OFF]Bug 6331 Do not populate marc in deleted items This is supplementary to the main patch for bug 6331. Having removed the attribute marc from items DelItem should not populate it Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Comment on attachment 23316 [details] [review] [SIGNED-OFF]Bug 6331 Do not populate marc in deleted items Tested by applying the 2 patches, deleting an item and check that item is moved from table items to table deleteditems. hello I suspect this line for copying marc column was only here to update the timestamp of deleteditems table. With your patch, is the timestamp still updated? Mathieu (In reply to mathieu saby from comment #11) > hello > I suspect this line for copying marc column was only here to update the > timestamp of deleteditems table. > With your patch, is the timestamp still updated? > > Mathieu Just jumping in this discussion: But I would not like to loose the timestamp in deleteditems or deletedbiblio.. (In reply to mathieu saby from comment #11) In my test, timestamp value is copied from table items. It does not get the current timestamp. @M. de Rooy : If timestamp is not updated, how do we know the date/time of deletion ? (In reply to Fridolin SOMERS from comment #13) > (In reply to mathieu saby from comment #11) > In my test, timestamp value is copied from table items. It does not get the > current timestamp. > > @M. de Rooy : > If timestamp is not updated, how do we know the date/time of deletion ? I made some reports recently on my Koha (v 3.11). Timestamp of deleteditems were updated when we delete them. So this behavior must be keep in 3.14 :-) Mathieu Created attachment 23320 [details] [review] 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 Set as need signoff for 3rd patch. Created attachment 23356 [details] [review] [SIGNED-OFF] 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> Everything now works as advertised for me.. signing off. Created attachment 23725 [details] [review] Bug 6331 - Obsolete marc column in deleteditems There is a difference between "items" and "deleteditems" tables in "kohastructure.sql" : "deleteditems" has a field "marc" not existing in "items". This patch removes this obsolete column. === Test : - suppressing an item, checking the deleted item is properly stored in deleteditems table - checking the column marc has been deleted from deleteditems table Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 23726 [details] [review] Bug 6331 Do not populate marc in deleted items This is supplementary to the main patch for bug 6331. Having removed the attribute marc from items DelItem should not populate it Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 23727 [details] [review] 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! Pushed to master. Thanks, Fridolin and Colin! Patches pushed to 3.14.x, will be in 3.14.2. (created version 3.14.01.004) |