l.b.m.structuralsubscription : module documentation

Part of lp.bugs.model

No module docstring
Class StructuralSubscription A subscription to a Launchpad structure.
Class DistroSeriesTargetHelper A helper for `IDistroSeries`s.
Class ProjectGroupTargetHelper A helper for `IProjectGroup`s.
Class DistributionSourcePackageTargetHelper A helper for `IDistributionSourcePackage`s.
Class MilestoneTargetHelper A helper for `IMilestone`s.
Class ProductTargetHelper A helper for `IProduct`s.
Class ProductSeriesTargetHelper A helper for `IProductSeries`s.
Class DistributionTargetHelper A helper for `IDistribution`s.
Class StructuralSubscriptionTargetMixin Mixin class for implementing IStructuralSubscriptionTarget.
Function get_structural_subscription_targets Return (bugtask, target) pairs for each target of the bugtasks.
Function get_structural_subscriptions_for_target Find the personal and team structural subscriptions to the target.
Function get_structural_subscriptions_for_bug Find the structural subscriptions to the bug.
Function query_structural_subscriptions Query into structural subscriptions for a given bug.
Function get_bug_and_bugtasks Return a bug and a list of bugtasks given a bug or a bugtask.
Function get_structural_subscriptions Return subscriptions for bug or bugtask at level.
Function get_structural_subscribers Return subscribers for bug or bugtask at level.
Function _get_structural_subscriptions Find the structural subscriptions for the given targets.
Function _get_structural_subscription_filter_id_query Helper function.
Function _calculate_bugtask_condition Return a condition matching importance and status for the bugtasks.
Function _calculate_tag_query Determine tag-related conditions and assemble a query.
def get_structural_subscription_targets(bugtasks):
Return (bugtask, target) pairs for each target of the bugtasks.

Each bugtask may be responsible theoretically for 0 or more targets. In practice, each generates one, two or three.

@ProxyFactory
def get_structural_subscriptions_for_target(target, person):
Find the personal and team structural subscriptions to the target.
def _get_structural_subscriptions(find, targets, *conditions):
Find the structural subscriptions for the given targets.
Parametersfindwhat to find (typically StructuralSubscription or StructuralSubscription.id).
targetsan iterable of (bugtask, target) pairs, as returned by get_structural_subscription_targets.
conditionsadditional conditions to filter the results.
@ProxyFactory
def get_structural_subscriptions_for_bug(bug, person=None):
Find the structural subscriptions to the bug.

If person is provided, only subscriptions that affect the person, because of personal or team memberships, are included.

def query_structural_subscriptions(what, bug, bugtasks, level, exclude=None):
Query into structural subscriptions for a given bug.

:param what: The fields to fetch. Choose from `Person`,
    `StructuralSubscription`, `BugSubscriptionFilter`, or a combo.
:param bug: An `IBug`
:param bugtasks: An iterable of `IBugTask`.
:param level: A level from `BugNotificationLevel`. Filters below this
    level will be excluded.
:param exclude: `Person`s to exclude (e.g. direct subscribers).
def get_bug_and_bugtasks(bug_or_bugtask):
Return a bug and a list of bugtasks given a bug or a bugtask.
Parametersbug_or_bugtaskAn IBug or IBugTask.
RaisesValueErrorIf bug_or_bugtask does not provide IBug or IBugTask.
def get_structural_subscriptions(bug_or_bugtask, level, exclude=None):
Return subscriptions for bug or bugtask at level.

:param bug_or_bugtask: An `IBug` or `IBugTask`.
:param level: A level from `BugNotificationLevel`. Filters below this
    level will be excluded.
:param exclude: `Person`s to exclude (e.g. direct subscribers).
def get_structural_subscribers(bug_or_bugtask, recipients, level, exclude=None):
Return subscribers for bug or bugtask at level.

:param bug_or_bugtask: An `IBug` or `IBugTask`.
:param recipients: A `BugNotificationRecipients` object or
    `None`, which will be populated if provided.
:param level: A level from `BugNotificationLevel`. Filters below this
    level will be excluded.
:param exclude: `Person`s to exclude (e.g. direct subscribers).
def _get_structural_subscription_filter_id_query(bug, bugtasks, level, direct_subscribers):
Helper function.

This provides the core implementation for get_structural_subscribers.

Parametersbuga bug.
bugtasksan iterable of one or more bugtasks of the bug.
levela notification level.
direct_subscribersa collection of Person objects who are directly subscribed to the bug.
def _calculate_bugtask_condition(query_arguments):
Return a condition matching importance and status for the bugtasks.
Parametersquery_argumentsan iterable of (bugtask, target) pairs, as returned by get_structural_subscription_targets.
def _calculate_tag_query(conditions, tags):
Determine tag-related conditions and assemble a query.
Parametersconditionsthe other conditions that constrain the query.
tagsthe list of tags that the bug has.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.