Function | get_activity_key | Given a notification, return a key for the activity if it exists. |
Function | construct_email_notifications | Construct an email from a list of related bug notifications. |
Function | notification_comment_batches | Search notification for continuous spans with only one comment. |
Function | get_bug_and_owner | Retrieve notification 's bug and message.owner attributes. |
Function | notification_batches | Batch notifications for get_email_notifications . |
Function | get_email_notifications | Return the email notifications pending to be sent. |
Function | process_deferred_notifications | Transform deferred notifications into real ones. |
Class | SendBugNotifications | Undocumented |
The key will be used to determine whether changes for the activity are undone within the same batch of notifications (which are supposed to be all for the same bug when they get to this function). Therefore, the activity's attribute is a good start for the key.
If the activity was on a bugtask, we will also want to distinguish by bugtask, because, for instance, changing a status from INPROGRESS to FIXCOMMITED on one bug task is not undone if the status changes from FIXCOMMITTED to INPROGRESS on another bugtask.
Similarly, if the activity is about adding or removing something that we can have multiple of, like a branch or an attachment, the key should include information on that value, because adding one attachment is not undone by removing another one.
The person and bug has to be the same for all notifications, and there can be only one comment.
notification
for continuous spans with only one comment.
Generates comment_group, notification
tuples.
The notifications are searched in order for continuous spans containing only one comment. Each continous span is given a unique number. Each notification is yielded along with its span number.
Return the email notifications pending to be sent. The intention of this code is to ensure that as many notifications as possible are batched into a single email. The criteria is that the notifications: - Must share the same owner. - Must be related to the same bug. - Must contain at most one comment.