6.0.0-beta1
7/13/25

[#8755] Add history log when removing user data
Summary Add history log when removing user data
Queue Turba
Queue Version 2.3.2
Type Bug
State Resolved
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester Valentin.Vidic (at) carnet (dot) hr
Created 12/07/2009 (5697 days ago)
Due
Updated 05/09/2010 (5544 days ago)
Assigned 03/01/2010 (5613 days ago)
Resolved 05/09/2010 (5544 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/09/2010 07:34:13 PM Michael Rubinsky Taken from Horde DevelopersHorde Developers
State ⇒ Resolved
 
05/09/2010 07:00:33 PM CVS Commit Comment #11 Reply to this comment
Changes have been made in CVS for this ticket:

Be consistent in not removing history entries when removing all user data.
Still need a utility script to delete history entries over a certain 
age, but this
commit closes Bug: 8755
http://cvs.horde.org/diff.php/kronolith/lib/api.php?rt=horde&r1=1.126.2.66&r2=1.126.2.67&ty=u
http://cvs.horde.org/diff.php/mnemo/lib/api.php?rt=horde&r1=1.53.2.35&r2=1.53.2.36&ty=u
http://cvs.horde.org/diff.php/nag/lib/api.php?rt=horde&r1=1.100.10.46&r2=1.100.10.47&ty=u
03/01/2010 11:11:35 AM Jan Schneider State ⇒ Assigned
 
02/16/2010 03:08:18 PM Jan Schneider Comment #10 Reply to this comment
Yes, I agree. It should be easy enough to create a garbage collection 
script that searches for all UIDs in the history that have been 
deleted a certain time ago and remove all entries for those.
02/16/2010 02:37:13 PM Michael Rubinsky Comment #9 Reply to this comment
In general the reason for logging deletion in history is for syncing 
- you have to know its gone. When deleting user data that would be 
true for shared items, but not for items owned by the user themself.
My issue is that the user may have items he owns that has been shared 
with others. A group calendar, a group address book etc... if we 
flat-out delete everything in history, then people that have devices 
synced to those events/contacts would never see the deletion... For 
something as destructive as deleting all history entries, I feel it 
should be an explicitly triggered action.

02/16/2010 04:39:54 AM Chuck Hagenbuch Comment #8 Reply to this comment
In general the reason for logging deletion in history is for syncing - 
you have to know its gone. When deleting user data that would be true 
for shared items, but not for items owned by the user themself. I 
agree we should make it consistent, though.
02/13/2010 07:29:46 PM Michael Rubinsky Comment #7
State ⇒ Feedback
Reply to this comment
Entries are made for the deletion event.

The behavior between the apps is still inconsistent though.  As the OP 
pointed out, the other groupware apps delete all the history for each 
deleted resource. In fact, in Kronolith, a history item is logged for 
the deletion, and then the entire history is removed.

My feeling is history should NOT be removed unless explicitly desired 
by the admin. Thoughts?
02/13/2010 07:27:20 PM CVS Commit Comment #6 Reply to this comment
02/13/2010 07:21:33 PM CVS Commit Comment #5 Reply to this comment
Changes have been made in CVS for this ticket:

Log deletion of each object removed in _deleteAll in Horde_History.
Bug: 8755
http://cvs.horde.org/diff.php/turba/lib/Driver/sql.php?rt=horde&r1=1.59.10.32&r2=1.59.10.33&ty=u
12/08/2009 10:50:49 AM Jan Schneider Comment #4
Patch ⇒ No
Priority ⇒ 2. Medium
Assigned to Horde DevelopersHorde Developers
Summary ⇒ Add history log when removing user data
State ⇒ Assigned
Reply to this comment
The analysis was correct, but the solution isn't. When calling 
_deleteAll() (no matter if through removeUserData or not), we don't 
log a delete action for the deleted contacts in the history. This 
should be fixed.
12/08/2009 08:53:11 AM Valentin (dot) Vidic (at) carnet (dot) hr Comment #3 Reply to this comment
Well, that is what other applications (nag, mnemo, kronolith) are 
doing. They remove history entries for deleted items. Turba was 
neither deleting history entries nor changing their state to 'deleted' 
so I copied and adapted this code from nag. In case history data 
should not be deleted than all applications should get fixed to mark 
history entries as 'deleted'. Although I think removeUserData 
functions should really remove all user data, for example when 
deleting the user from the system.
12/07/2009 06:33:01 PM Michael Rubinsky Comment #2
State ⇒ Not A Bug
Assigned to Michael Rubinsky
Reply to this comment
That is because it is a history of what has happened. Removing the 
contact data removes that history.
12/07/2009 04:01:32 PM Valentin (dot) Vidic (at) carnet (dot) hr Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: turba_api.diff Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Turba
Summary ⇒ turba.removeUserData does not remove history info
Type ⇒ Bug
Reply to this comment
Calling turba.removeUserData API function removes the contacts from 
the turba database but horde_histories table still contains info for 
these contacts. Attached patch deletes the remaining history data.

Saved Queries