Opened 18 months ago
Last modified 16 months ago
#3794 new defect (bug)
Deleted activity items remain favourited
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Activity | Version: | 1.5.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
When an activity item that has been favourited is deleted, the favourite count is not removed from a users favourite count - as that item no longer exists it cannot be unfavourited.
Change History (2)
comment:1
boonebgorges — 18 months ago
- Component changed from Core to Activity
- Milestone changed from Awaiting Review to Future Release
Activity meta will get pretty crowded this way, and there isn't an index on the meta value so querying per user unfortunately wouldn't scale well.
Ideally favorites would be rewritten as its own component, more robust like what Paul is working on in BP Labs.
Note: See
TracTickets for help on using
tickets.

Yeah, this sounds about right.
Unfortunately it'll be next to impossible to solve. We currently store a user's activity favorites in usermeta as an array. There's no way to query (eg) how many times an activity item has been favorited, or by whom. So there's no way to loop through those users and delete the item from the activity favorites list.
Probably this will have to wait until such time as the favorites system is rewritten into something a bit more elegant. (Either that, or we'll have to start keeping track in activity_meta of the users who have favorited an item.)