Is it possible for an alert to be removed from the Alerts list in any way using Rules or something like that? I can't find a way to do that right now.

Use case: Someone publishes a node that gets sent out as an alert by a Rule... someone deletes that node within a few minutes, but the alert is already sent out after the Rule fires... said person can't delete the alert, and it pops up on everyone's alert queue a few seconds later.

Comments

icecreamyou’s picture

Version: 6.x-2.0-alpha1 » 6.x-2.x-dev

Not currently possible IIRC but it's a good idea.

geerlingguy’s picture

Additionally, I think it might be nice if appbar alerts could be deleted after a time; I'm noticing my appbar table filling pretty quickly, since each alert needs to go to each user. After a few months of this, even with a relatively low number of users, that table could get pretty hefty.

Perhaps have an appbar_cron() function that deletes alerts after so much time has passed? I don't see any reason to store alerts past a certain user-specified time, as they aren't really there for historical/archival purposes.

icecreamyou’s picture

Status: Active » Closed (duplicate)

I don't think there's a good way to delete specific alerts because they're not associated with any specific entity in the database. However deleting alerts after a specific period of time has already been committed in #1035742: Clear out old alerts?.

geerlingguy’s picture

Sounds good, and thinking about this myself, it seems that's a good idea.

One thing to consider though (you can reopen this issue if you want to do this someday, but probably not): You might be able to make some sort of admin interface where an admin could see the last X number of alerts, and delete one of them (based on the alerts table).