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

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

A utility to retrieving BugTasks.
Attribute title Title
Attribute orderby_expression The SQL expression for a sort key
Method get Retrieve a BugTask with the given id.
Method getBugTaskTags Return a set of bugtasks bug tags
Method getBugTaskPeople Return a set of people related to bugtasks.
Method getBugTaskBadgeProperties Return whether the bugtasks should have badges.
Method getMultiple Retrieve a dictionary of bug tasks for the given sequence of IDs.
Method findSimilar Find bugs similar to the given summary.
Method search Search IBugTasks with the given search parameters.
Method searchBugIds Search bug ids.
Method countBugs Count open bugs that match params, grouping by group_on.
Method getStatusCountsForProductSeries Returns status counts for a product series' bugs.
Method createManyTasks Create a series of bug tasks and return them.
Method createTask Create a bug task on a bug and return it.
Method findExpirableBugTasks Return a list of bugtasks that are at least min_days_old.
Method getBugCountsForPackages Return open bug counts for the list of packages.
Method getOpenBugTasksPerProduct Return open bugtask count for multiple products.
Method getPrecachedNonConjoinedBugTasks List of non-conjoined bugtasks targeted to the milestone.
Method getBugTaskTargetMilestones Get all the milestones for the selected bugtasks' targets.
Attribute open_bugtask_search A search returning open bugTasks.
title =
Title
orderby_expression =
The SQL expression for a sort key
def get(task_id):
Retrieve a BugTask with the given id.

Raise a NotFoundError if there is no IBugTask matching the given id. Raise a zope.security.interfaces.Unauthorized if the user doesn't have the permission to view this bug.

def getBugTaskTags(bugtasks):
Return a set of bugtasks bug tags

Return a dict mapping from bugtask to tag.

def getBugTaskPeople(bugtasks):
Return a set of people related to bugtasks.

Return a dict mapping from Person.id to Person.

def getBugTaskBadgeProperties(bugtasks):
Return whether the bugtasks should have badges.

Return a mapping from a bug task, to a dict of badge properties.

def getMultiple(task_ids):
Retrieve a dictionary of bug tasks for the given sequence of IDs.
Parameterstask_idsa sequence of bug task IDs.
Returnsan empty dictionary if the given sequence of IDs is empty, or if none of the specified IDs matches a bug task in the database.
def findSimilar(user, summary, product=None, distribution=None, sourcepackagename=None):
Find bugs similar to the given summary.

The search is limited to the given product or distribution (together with an optional source package).

Only BugTasks that the user has access to will be returned.

def search(params, *args, **kwargs):
Search IBugTasks with the given search parameters.

Note: only use this method of BugTaskSet if you want to query tasks across multiple IBugTargets; otherwise, use the IBugTarget's searchTasks() method.

If more than one BugTaskSearchParams is given, return the union of IBugTasks which match any of them, with the results ordered by the orderby specified in the first BugTaskSearchParams object.

Parameterssearch_paramsa BugTaskSearchParams object
argsany number of BugTaskSearchParams objects
def searchBugIds(params):
Search bug ids.

This is a variation on IBugTaskSet.search that returns only bug ids.

Parametersparamsthe BugTaskSearchParams to search on.
def countBugs(user, contexts, group_on):
Count open bugs that match params, grouping by group_on.

This serves results from the bugsummary fact table: it is fast but not completely precise. See the bug summary documentation for more detail.

ParametersuserThe user to query on behalf of.
contextsA list of contexts to search. Contexts must support the IBugSummaryDimension interface.
group_onThe column(s) group on - .e.g ( BugSummary.distroseries_id, BugSummary.milestone_id) will cause grouping by distro series and then milestone.
ReturnsA dict {group_instance: count, ...}
def getStatusCountsForProductSeries(user, product_series):
Returns status counts for a product series' bugs.

Both the nominated and scheduled blueprints are included in the count.

Parametersproduct_seriesProductSeries object.
ReturnsA list of tuples containing (status_id, count).
def createManyTasks(bug, owner, targets, status=None, importance=None, assignee=None, milestone=None):
Create a series of bug tasks and return them.
def createTask(bug, owner, target, status=None, importance=None, assignee=None, milestone=None):
Create a bug task on a bug and return it.

If the bug is public, bug supervisors will be automatically subscribed.

If the bug has any accepted series nominations for a supplied distribution, series tasks will be created for them.

def findExpirableBugTasks(min_days_old, user, bug=None, target=None, limit=None):
Return a list of bugtasks that are at least min_days_old.

A bugtask is expirable if its status is Incomplete, and the bug report has been never been confirmed, and it has been inactive for min_days_old. Only bugtasks that belong to Products or Distributions that use launchpad to track bugs can be returned. The implementation must define the criteria for determining that the bug report is inactive and have never been confirmed.

Parametersmin_days_oldAn int representing the minimum days of inactivity for a bugtask to be considered expirable. Setting this parameter to 0 will return all bugtask that can expire.
userThe IPerson doing the search. Only bugs the user has permission to view are returned.
bugAn IBug. If a bug is provided, only bugtasks that belong to the bug may be returned. If bug is None, all bugs are searched.
targetAn IBugTarget. If a target is provided, only bugtasks that belong to the target may be returned. If target is None, all bugtargets are searched.
limitAn int for limiting the number of bugtasks returned.
ReturnsA ResultSet of bugtasks that are considered expirable.
def getBugCountsForPackages(user, packages):
Return open bug counts for the list of packages.
ParametersuserThe user doing the search. Private bugs that this user doesn't have access to won't be included in the count.
packagesA list of IDistributionSourcePackage instances.
ReturnsA list of dictionaries, where each dict contains: 'package': The package the bugs are open on. 'open': The number of open bugs. 'open_critical': The number of open critical bugs. 'open_unassigned': The number of open unassigned bugs. 'open_inprogress': The number of open bugs that are In Progress.
def getOpenBugTasksPerProduct(user, products):
Return open bugtask count for multiple products.
def getPrecachedNonConjoinedBugTasks(user, milestone):
List of non-conjoined bugtasks targeted to the milestone.

The assignee and the assignee's validity are precached.

def getBugTaskTargetMilestones(bugtasks):
Get all the milestones for the selected bugtasks' targets.
open_bugtask_search =
A search returning open bugTasks.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.