Summary | tags not being cleaned from rampage tables when tagged object is deleted |
Queue | Horde Framework Packages |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | jsveiga (at) it (dot) eng (dot) br |
Created | 09/15/2015 (3588 days ago) |
Due | |
Updated | 09/25/2015 (3578 days ago) |
Assigned | 09/16/2015 (3587 days ago) |
Resolved | 09/16/2015 (3587 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
commit 9522f40eb957d4fa2d94a84677f13dd0694a12dc
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Sep 16 12:41:02 2015 -0400
Bug: 14112Remove the object from the Content app when deleting.kronolith/lib/Driver.php | 4 ++++
mnemo/lib/Driver.php | 9 +++++++++
nag/lib/Driver.php | 16 ++++++++++++----
turba/lib/Driver.php | 14 +++++++++++---
4 files changed, 36 insertions(+), 7 deletions(-)
http://github.com/horde/horde/commit/9522f40eb957d4fa2d94a84677f13dd0694a12dc
commit 8979b2f5dca0246a2ae8289492f14234c7e47050
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Sep 16 11:37:42 2015 -0400
Only increment counters if we actually tagged the item.
Related to
Bug: 14112content/lib/Tagger.php | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
http://github.com/horde/horde/commit/8979b2f5dca0246a2ae8289492f14234c7e47050
commit f7725beb730407fb3f38d521a62eb532b5a50b4a
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Sep 16 11:21:31 2015 -0400
Bug: 14112Remove tags when deleting objects.mnemo/lib/Driver.php | 7 +++++++
nag/lib/Driver.php | 9 ++++++++-
turba/lib/Driver.php | 10 +++++++++-
3 files changed, 24 insertions(+), 2 deletions(-)
http://github.com/horde/horde/commit/f7725beb730407fb3f38d521a62eb532b5a50b4a
State ⇒ Resolved
commit f20348e01030c3769b410b3128e689dc9368bed7
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Sep 16 12:41:02 2015 -0400
Bug: 14112Remove the object from the Content app when deleting.kronolith/lib/Driver.php | 4 ++++
mnemo/lib/Driver.php | 9 +++++++++
nag/lib/Driver.php | 16 ++++++++++++----
turba/lib/Driver.php | 14 +++++++++++---
4 files changed, 36 insertions(+), 7 deletions(-)
http://github.com/horde/horde/commit/f20348e01030c3769b410b3128e689dc9368bed7
State ⇒ Assigned
Assigned to Michael Rubinsky
concerned with tags. The idea was this was to be used to map any
related content together. This still may happen, but it's not
currently implemented. In other words, we can't just delete the
object reference when the tag count goes to zero, but only when the
object is explicitly deleted. I'll add code to do this, but need to
think about where it will go, since it doesn't really belong in a
Tagger class.
actually did it correctly but there was an error in Content_Tagger
that would essentially increment the count anytime tags were edited
and still contained some of the same tags. So, e.g., adding a new tag
after the object already contained tags would increment the count for
ALL tags, not just the added one. This has been fixed in Git.
commit 26c3700dc513e295b3fd5c9c6b88c225639d5cc6
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Sep 16 11:37:42 2015 -0400
Only increment counters if we actually tagged the item.
Related to
Bug: 14112content/lib/Tagger.php | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
http://github.com/horde/horde/commit/26c3700dc513e295b3fd5c9c6b88c225639d5cc6
commit 1b3e4edde4397772bfc1ca0f6db63c0de48ee109
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Wed Sep 16 11:21:31 2015 -0400
Bug: 14112Remove tags when deleting objects.mnemo/lib/Driver.php | 7 +++++++
nag/lib/Driver.php | 9 ++++++++-
turba/lib/Driver.php | 10 +++++++++-
3 files changed, 24 insertions(+), 2 deletions(-)
http://github.com/horde/horde/commit/1b3e4edde4397772bfc1ca0f6db63c0de48ee109
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ tags not being cleaned from rampage tables when tagged object is deleted
Type ⇒ Bug
Priority ⇒ 1. Low
Horde 5.2.2
Turba H5 (4.2.2)
Kronolith H5 (4.2.2)
Mnemo H5 (4.2.1)
rampage_* tables not updated when a tagged object is deleted:
rampage_objects still keeps the deleted object reference
rampage_tag_stats still keeps the usage count including the deleted object
rampage_user_tag_stats still keeps the usage count including the
deleted object
How to reproduce:
1 - Create two calendar events and tag them with 'tagpersistencetest_calendar'
2 - Create two contacs and tag them with 'tagpersistencetest_contact'
3 - Create two notes and tag them with 'tagpersistencetest_notes'
4 - Run this query on the database:
SELECT
rampage_tags.tag_name,
rampage_tag_stats.count as tagcount,
rampage_user_tag_stats.count as usertagcount,
rampage_objects.object_name,
rampage_types.type_name
from
rampage_tags
left join rampage_tag_stats using (tag_id)
left join rampage_user_tag_stats using (tag_id)
left join rampage_tagged using (user_id, tag_id)
left join rampage_objects using (object_id)
left join rampage_types using (type_id)
where tag_name regexp 'tagpersistencetest_';
5 - Verify the usage count and tagged objects; take note of [object_id]s
6 - Delete (UI) the created notes, contacts and events.
7 - Re-run the query
Result:
The note and contact objects and tags/tag count remain the same in all tables.
The event object is no longer in rampage_tagged, but still in
rampage_objects (look for its object_id), and the tage is still in
rampage_tags, rampage_tag_stats, and rampage_user_tag_stats.
Expected:
Deleted object should be removed from rampage_objects and
rempage_tagged, tag counters should decrement.