l.b.i.b.IBugWatchSet(Interface) : interface documentation

Part of lp.bugs.interfaces.bugwatch View In Hierarchy

The set of `IBugWatch`es.
Int bug Undocumented
Attribute title Title
Method __getitem__ Get a BugWatch
Method __iter__ Iterate through BugWatches for a given bug.
Method get Get an IBugWatch by its ID.
Method search Search through all the IBugWatches in the system.
Method fromText Create one or more BugWatch's by analysing the given text. This
Method fromMessage Create one or more BugWatch's by analysing the given email. The
Method createBugWatch Create an IBugWatch.
Method extractBugTrackerAndBug Extract the bug tracker and the bug number for the given URL.
Method getBugWatchesForRemoteBug Returns bug watches referring to the given remote bug.
Method bulkSetError Efficiently update the status of the given bug watches.
Method bulkAddActivity Efficiently add activity for the given bug watches.
bug =
Undocumented
title =
Title
def __getitem__(key):
Get a BugWatch
def __iter__():
Iterate through BugWatches for a given bug.
def get(id):
Get an IBugWatch by its ID.

Raise a NotFoundError if there is no IBugWatch matching the given id.

def search():
Search through all the IBugWatches in the system.
def fromText(text, bug, owner):
Create one or more BugWatch's by analysing the given text. This will look for reference to known or new bug tracking instances and create the relevant watches. It returns a (possibly empty) list of watches created.
def fromMessage(message, bug):
Create one or more BugWatch's by analysing the given email. The owner of the BugWatch's will be the sender of the message. It returns a (possibly empty) list of watches created.
def createBugWatch(bug, owner, bugtracker, remotebug):
Create an IBugWatch.
Unknown Field: bugThe IBug to which the watch is linked.
Unknown Field: ownerThe IPerson who created the IBugWatch.
Unknown Field: bugtrackerThe external IBugTracker.
Unknown Field: remotebugA string.
def extractBugTrackerAndBug(url):
Extract the bug tracker and the bug number for the given URL.

A tuple in the form of (bugtracker, remotebug) is returned, where bugtracker is a registered IBugTracer, and remotebug is a text string.

A NoBugTrackerFound exception is raised if the base URL can be extracted, but no such bug tracker is registered in Launchpad.

If no bug tracker type can be guessed, None is returned.

def getBugWatchesForRemoteBug(remote_bug, bug_watch_ids=None):
Returns bug watches referring to the given remote bug.

Returns a set of those bug watches, optionally limited to those with IDs in bug_watch_ids, that refer to remote_bug.

Parametersremote_bug_idThe ID of the remote bug. (type: See IBugWatch.remotebug.)
bug_watch_idsA collection of BugWatch IDs. (type: An iterable of int`s, or `None.)
def bulkSetError(references, last_error_type=None):
Efficiently update the status of the given bug watches.

Sets the last_error_type field as instructed, updates lastchecked to now and resets next_check to None, all in the most efficient way possible.

ParametersreferencesAn iterable of IBugWatch objects or primary keys for the same.
last_error_typeA member of BugWatchActivityStatus or None.
def bulkAddActivity(references, result=BugWatchActivityStatus.SYNC_SUCCEEDED, message=None, oops_id=None):
Efficiently add activity for the given bug watches.

Add BugWatchActivity records for the given bug watches in the most efficient way possible.

ParametersreferencesAn iterable of IBugWatch objects or primary keys for the same.
resultSee IBugWatch.addActivity.
messageSee IBugWatch.addActivity.
oops_idSee IBugWatch.addActivity.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.