l.b.m.b.BugSubscriptionInfo : class documentation

Part of lp.bugs.model.bug View In Hierarchy

Represents bug subscription sets.

The intention for this class is to encapsulate all calculations of subscriptions and subscribers for a bug. Some design considerations:

Method __init__ Undocumented
Method cache_key A (bug ID, bugtask ID, level) tuple for use as a hash key.
Method forTask Create a new BugSubscriptionInfo limited to bugtask.
Method forLevel Create a new BugSubscriptionInfo limited to level.
Method muted_subscribers Undocumented
Method visible_recipients_filter Undocumented
Method direct_subscriptions The bug's direct subscriptions.
Method direct_subscribers The bug's direct subscriptions.
Method direct_subscriptions_at_all_levels The bug's direct subscriptions at all levels.
Method direct_subscribers_at_all_levels The bug's direct subscribers at all levels.
Method duplicate_subscriptions Subscriptions to duplicates of the bug.
Method duplicate_subscribers Subscribers to duplicates of the bug.
Method duplicate_only_subscriptions Subscriptions to duplicates of the bug only.
Method duplicate_only_subscribers Subscribers to duplicates of the bug only.
Method structural_subscriptions Structural subscriptions to the bug's targets.
Method structural_subscribers Structural subscribers to the bug's targets.
Method all_assignees Assignees of the bug's tasks.
Method also_notified_subscribers All subscribers except direct, dupe, and muted subscribers.
Method indirect_subscribers All subscribers except direct subscribers.
def __init__(self, bug, level):
Undocumented
@property
def cache_key(self):
A (bug ID, bugtask ID, level) tuple for use as a hash key.

This helps forTask() and forLevel() to be more efficient, returning previously populated instances to avoid running the same queries against the database again and again.

def forTask(self, bugtask):
Create a new BugSubscriptionInfo limited to bugtask.

The given task must refer to this object's bug. If None is passed a new BugSubscriptionInfo instance is returned with no limit.

def forLevel(self, level):
Create a new BugSubscriptionInfo limited to level.
@cachedproperty
@freeze(BugSubscriberSet)
def muted_subscribers(self):
Undocumented
def visible_recipients_filter(self, column):
Undocumented
@cachedproperty
@freeze(BugSubscriptionSet)
def direct_subscriptions(self):
The bug's direct subscriptions.

Excludes muted subscriptions.

@property
def direct_subscribers(self):
The bug's direct subscriptions.

Excludes muted subscribers.

@property
def direct_subscriptions_at_all_levels(self):
The bug's direct subscriptions at all levels.

Excludes muted subscriptions.

@property
def direct_subscribers_at_all_levels(self):
The bug's direct subscribers at all levels.

Excludes muted subscribers.

@cachedproperty
@freeze(BugSubscriptionSet)
def duplicate_subscriptions(self):
Subscriptions to duplicates of the bug.

Excludes muted subscriptions, and subscribers who can not see the master bug.

@property
def duplicate_subscribers(self):
Subscribers to duplicates of the bug.

Excludes muted subscribers.

@cachedproperty
@freeze(BugSubscriptionSet)
def duplicate_only_subscriptions(self):
Subscriptions to duplicates of the bug only.

Excludes muted subscriptions, subscriptions for people who have a direct subscription, or who are also notified for another reason.

@property
def duplicate_only_subscribers(self):
Subscribers to duplicates of the bug only.

Excludes muted subscribers, subscribers who have a direct subscription, or who are also notified for another reason.

@cachedproperty
@freeze(StructuralSubscriptionSet)
def structural_subscriptions(self):
Structural subscriptions to the bug's targets.

Excludes direct subscriptions.

@property
def structural_subscribers(self):
Structural subscribers to the bug's targets.

Excludes direct subscribers.

@cachedproperty
@freeze(BugSubscriberSet)
def all_assignees(self):
Assignees of the bug's tasks.

Does not exclude muted subscribers.

@cachedproperty
def also_notified_subscribers(self):
All subscribers except direct, dupe, and muted subscribers.
@cachedproperty
def indirect_subscribers(self):
All subscribers except direct subscribers.

Excludes muted subscribers.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.