We should store deleted objects as diffs just as we do for modification and item created. This enhancement will store modification diffs if the action is set to DELETE, and an "original" object is passed in.
Created attachment 171626 [details] [review] Bug 37944: Log object delete as JSON diff, implement for items We should store deleted objects as diffs just as we do for modification and item created. This enhancement will store modification diffs if the action is set to DELETE, and an "original" object is passed in. Test Plan: 1) Enable CataloguingLog 2) Deletee an item 3) Query the database for the newest action log: select * from action_logs order by action_id desc limit 1\G 4) Note the diff column is NULL 5) Apply this patch 6) Restart all the things! 7) Delete another item 8) Query the database again 9) Note the diff has been created!
Created attachment 171992 [details] [review] Bug 37944: Log object delete as JSON diff, implement for items We should store deleted objects as diffs just as we do for modification and item created. This enhancement will store modification diffs if the action is set to DELETE, and an "original" object is passed in. Test Plan: 1) Enable CataloguingLog 2) Deletee an item 3) Query the database for the newest action log: select * from action_logs order by action_id desc limit 1\G 4) Note the diff column is NULL 5) Apply this patch 6) Restart all the things! 7) Delete another item 8) Query the database again 9) Note the diff has been created! Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Created attachment 173550 [details] [review] Bug 37944: Log object delete as JSON diff, implement for items We should store deleted objects as diffs just as we do for modification and item created. This enhancement will store modification diffs if the action is set to DELETE, and an "original" object is passed in. Test Plan: 1) Enable CataloguingLog 2) Deletee an item 3) Query the database for the newest action log: select * from action_logs order by action_id desc limit 1\G 4) Note the diff column is NULL 5) Apply this patch 6) Restart all the things! 7) Delete another item 8) Query the database again 9) Note the diff has been created! Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Can we please get a unit test here as well? (can also be part of follow-up for 37943)
Pushed for 24.11! Well done everyone, thank you!
Would still like a unit test.