Allow setting custom recipients on notification
I'm adding notifications about paused tasks to foreman-tasks. Instead of producing a notification on each paused task, we want create one notification and just update it on next paused tasks (with current count of paused tasks), until the notification is marked as ween.
The flow is as follows:
1. user has no notification about paused task
2. new paused task gets to the system
3. use gets notification about 'there is 1 paused task in the system'
4. another paused task
5. the existing notification unseen notification gets updated with 'there are 2 paused tasks in the system', updating 'created_at' and 'expired_at' fields so that it gets to the top of the list.
6. the user notices the notification and marks it as read
7. next time another paused task gets in, new notification will be triggered with 'there are 3 paused tasks' (or whatever the current number would be).
I can imagine this evolving to aggregated notifications functionality later, but for now, I need to be able to set the recipients for new notifications outside of the default subscribers, as part of those might still have the previous notification unseen, and we don't want to send the notification to those.
#1 Updated by The Foreman Bot about 4 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6598 added
#2 Updated by Tomer Brisker about 4 years ago
- Category set to Notifications
- Fixed in Releases 1.22.0 added
#3 Updated by Ivan Necas about 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 994c071a51d7e4c0b6227f8f787b087cbcb6e909.
Fixes #26419 - allow setting custom recipients on notification
First step for enabling aggregated notifications, that can be updated
until marked as seen.