l.b.b.buglisting : module documentation

Part of lp.bugs.browser

IBugTask-related browser views.
Function get_sortorder_from_request Get the sortorder from the request.
Function get_default_search_params Return a BugTaskSearchParams instance with default values.
Function rewrite_old_bugtask_status_query_string Return a query string with old status names replaced with new.
Function target_has_expirable_bugs_listing Return True or False if the target has the expirable-bugs listing.
Class BugTaskListingView A view designed for displaying bug tasks in lists.
Class BugsInfoMixin Contains properties giving URLs to bug information.
Class BugsStatsMixin Contains properties giving bug stats.
Class BugListingPortletInfoView Portlet containing available bug listings without stats.
Class BugListingPortletStatsView Portlet containing available bug listings with stats.
Function get_buglisting_search_filter_url Return the given URL with the search parameters specified.
Class BugTaskListingItem A decorated bug task.
Class BugListingBatchNavigator A specialised batch navigator to load smartly extra bug information.
Interface IBugTaskSearchListingMenu A marker interface for the search listing navigation menu.
Class BugTaskSearchListingMenu The search listing navigation menu.
Class BugTaskSearchListingView View that renders a list of bugs for a given set of search criteria.
Class BugTargetView Used to grab bugs for a bug target; used by the latest bugs portlet
Class TextualBugTaskSearchListingView View that renders a list of bug IDs for a given set of search criteria.
Class BugsBugTaskSearchListingView Search all bug reports.
Class BugTaskExpirableListingView View for listing Incomplete bugs that can expire.
Class BugNominationsView View for accepting/declining bug nominations.
def get_sortorder_from_request(request):

Get the sortorder from the request.

>>> from lp.services.webapp.servers import LaunchpadTestRequest
>>> get_sortorder_from_request(LaunchpadTestRequest(form={}))
['-importance']
>>> get_sortorder_from_request(
...     LaunchpadTestRequest(form={'orderby': '-status'}))
['-status']
>>> get_sortorder_from_request(LaunchpadTestRequest(
...     form={'orderby': 'status,-severity,importance'}))
['status', 'importance']
>>> get_sortorder_from_request(
...     LaunchpadTestRequest(form={'orderby': 'priority,-severity'}))
['-importance']
def get_default_search_params(user):

Return a BugTaskSearchParams instance with default values.

By default, a search includes any bug that is unresolved and not a duplicate of another bug.

If this search will be used to display a list of bugs to the user it may be a good idea to set the orderby attribute using get_sortorder_from_request():

params = get_default_search_params(user) params.orderby = get_sortorder_from_request(request)
def rewrite_old_bugtask_status_query_string(query_string):
Return a query string with old status names replaced with new.

If an old status string has been used in the query, construct a corrected query string for the search, else return the original query string.

def target_has_expirable_bugs_listing(target):
Return True or False if the target has the expirable-bugs listing.

The target must be a Distribution, DistroSeries, Product, or ProductSeries, and the pillar must have enabled bug expiration.

def get_buglisting_search_filter_url(assignee=None, importance=None, status=None, status_upstream=None, has_patches=None, bug_reporter=None, affecting_me=None, orderby=None):
Return the given URL with the search parameters specified.
API Documentation for Launchpad, generated by pydoctor at 2018-02-21 00:00:11.