Пример #1
0
    def searchTasks(self, search_params, user=None,
                    order_by=None, search_text=None,
                    status=None,
                    importance=None,
                    assignee=None, bug_reporter=None, bug_supervisor=None,
                    bug_commenter=None, bug_subscriber=None, owner=None,
                    structural_subscriber=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_blueprints=None, modified_since=None,
                    created_since=None, created_before=None,
                    information_type=None):
        """See `IHasBugs`."""
        if status is None:
            # If no statuses are supplied, default to the
            # list of all unreolved statuses.
            status = list(UNRESOLVED_BUGTASK_STATUSES)

        if order_by is None:
            # If no order_by value is supplied, default to importance.
            order_by = ['-importance']

        if search_params is None:
            kwargs = dict(locals())
            del kwargs['self']
            del kwargs['user']
            del kwargs['search_params']
            search_params = BugTaskSearchParams.fromSearchForm(user, **kwargs)
        self._customizeSearchParams(search_params)
        return BugTaskSet().search(search_params)
Пример #2
0
    def searchTasks(self,
                    search_params,
                    user=None,
                    order_by=None,
                    search_text=None,
                    status=None,
                    importance=None,
                    assignee=None,
                    bug_reporter=None,
                    bug_supervisor=None,
                    bug_commenter=None,
                    bug_subscriber=None,
                    owner=None,
                    structural_subscriber=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_blueprints=None,
                    modified_since=None,
                    created_since=None,
                    created_before=None,
                    information_type=None):
        """See `IHasBugs`."""
        if status is None:
            # If no statuses are supplied, default to the
            # list of all unreolved statuses.
            status = list(UNRESOLVED_BUGTASK_STATUSES)

        if order_by is None:
            # If no order_by value is supplied, default to importance.
            order_by = ['-importance']

        if search_params is None:
            kwargs = dict(locals())
            del kwargs['self']
            del kwargs['user']
            del kwargs['search_params']
            search_params = BugTaskSearchParams.fromSearchForm(user, **kwargs)
        self._customizeSearchParams(search_params)
        return BugTaskSet().search(search_params)