Part of lp.bugs.interfaces.bugtasksearch View In Hierarchy
Encapsulates search parameters for BugTask.search()
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:
|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
This is equivalent to calling setProduct etc but the type of target does not need to be known to the caller.
Otherwise, return value as is, or None if it's a zero-length sequence.