l.b.i.b.BugTaskSearchParams : class documentation

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

Encapsulates search parameters for BugTask.search()

Details:

user is an object that provides IPerson, and represents the person performing the query (which is important to know for, for example, privacy-aware results.) If user is None, the search will be filtered to only consider public bugs.

product, distribution and distroseries (IBugTargets) should /not/ be supplied to BugTaskSearchParams; instead, IBugTarget's searchTasks() method should be invoked with a single search_params argument.

Keyword arguments should always be used. The argument passing semantics are as follows:

  • BugTaskSearchParams(arg='foo', user=bar): Match all IBugTasks where IBugTask.arg == 'foo' for user bar.
  • BugTaskSearchParams(arg=any('foo', 'bar')): Match all IBugTasks where IBugTask.arg == 'foo' or IBugTask.arg == 'bar'. In this case, no user was passed, so all private bugs are excluded from the search results.
  • BugTaskSearchParams(arg1='foo', arg2='bar'): Match all IBugTasks where IBugTask.arg1 == 'foo' and IBugTask.arg2 == 'bar'

The set will be ordered primarily by the column specified in orderby, and then by bugtask id.

For a more thorough treatment, check out:

lib/lp/bugs/doc/bugtask-search.txt
Method __init__ Undocumented
Method setProduct Set the upstream context on which to filter the search.
Method setProjectGroup Set the upstream context on which to filter the search.
Method setDistribution Set the distribution context on which to filter the search.
Method setDistroSeries Set the distroseries context on which to filter the search.
Method setProductSeries Set the productseries context on which to filter the search.
Method setSourcePackage Set the sourcepackage context on which to filter the search.
Method setTarget Constrain the search to only return items in target.
Class Method fromSearchForm Create and return a new instance using the parameter list.
Class Method _anyfy If value is a sequence, wrap its items with the any combinator.
def __init__(self, user, bug=None, searchtext=None, fast_searchtext=None, status=None, importance=None, milestone=None, milestone_tag=None, assignee=None, sourcepackagename=None, owner=None, attachmenttype=None, orderby=None, omit_dupes=False, subscriber=None, component=None, pending_bugwatch_elsewhere=False, resolved_upstream=False, open_upstream=False, has_no_upstream_bugtask=False, tag=None, has_cve=False, bug_supervisor=None, bug_reporter=None, nominated_for=None, bug_commenter=None, omit_targeted=False, date_closed=None, affected_user=None, affects_me=False, hardware_bus=None, hardware_vendor_id=None, hardware_product_id=None, hardware_driver_name=None, hardware_driver_package_name=None, hardware_owner_is_bug_reporter=None, hardware_owner_is_affected_by_bug=False, hardware_owner_is_subscribed_to_bug=False, hardware_is_linked_to_bug=False, linked_branches=None, linked_merge_proposals=None, linked_blueprints=None, structural_subscriber=None, modified_since=None, created_since=None, exclude_conjoined_tasks=False, cve=None, upstream_target=None, milestone_dateexpected_before=None, milestone_dateexpected_after=None, created_before=None, information_type=None, ignore_privacy=False):
Undocumented
def setProduct(self, product):
Set the upstream context on which to filter the search.
def setProjectGroup(self, projectgroup):
Set the upstream context on which to filter the search.
def setDistribution(self, distribution):
Set the distribution context on which to filter the search.
def setDistroSeries(self, distroseries):
Set the distroseries context on which to filter the search.
def setProductSeries(self, productseries):
Set the productseries context on which to filter the search.
def setSourcePackage(self, sourcepackage):
Set the sourcepackage context on which to filter the search.
def setTarget(self, target):
Constrain the search to only return items in target.

This is equivalent to calling setProduct etc but the type of target does not need to be known to the caller.

ParameterstargetA IHasBug, or some search term like all/any/none on IHasBug. If using all/any all the targets must be of the same type due to implementation limitations. Currently only distroseries and productseries IHasBug implementations are supported.
@classmethod
def _anyfy(cls, value):
If value is a sequence, wrap its items with the any combinator.

Otherwise, return value as is, or None if it's a zero-length sequence.

@classmethod
def fromSearchForm(cls, user, order_by=('-importance',), search_text=None, status=list(UNRESOLVED_BUGTASK_STATUSES), importance=None, assignee=None, bug_reporter=None, bug_supervisor=None, bug_commenter=None, bug_subscriber=None, owner=None, affected_user=None, affects_me=False, has_patch=None, has_cve=None, distribution=None, tags=None, tags_combinator=BugTagsSearchCombinator.ALL, omit_duplicates=True, omit_targeted=None, status_upstream=None, milestone=None, component=None, nominated_for=None, sourcepackagename=None, has_no_package=None, hardware_bus=None, hardware_vendor_id=None, hardware_product_id=None, hardware_driver_name=None, hardware_driver_package_name=None, hardware_owner_is_bug_reporter=None, hardware_owner_is_affected_by_bug=False, hardware_owner_is_subscribed_to_bug=False, hardware_is_linked_to_bug=False, linked_branches=None, linked_merge_proposals=None, linked_blueprints=None, structural_subscriber=None, modified_since=None, created_since=None, created_before=None, information_type=None):
Create and return a new instance using the parameter list.
API Documentation for Launchpad, generated by pydoctor at 2020-04-01 00:00:17.