l.b.b.bugtask : module documentation

Part of lp.bugs.browser

IBugTask-related browser views.
Function bugtarget_renderer Render a bugtarget as a link.
Function unique_title Canonicalise a message title to help identify messages with new
Function get_comments_for_bugtask Return BugComments related to a bugtask.
Function get_visible_comments Return comments, filtering out empty or duplicated ones.
Class BugTargetTraversalMixin Mix-in in class that provides .../+bug/NNN traversal.
Class BugTaskNavigation Navigation for the IBugTask.
Class BugTaskContextMenu Context menu of actions that can be performed upon an IBugTask.
Class BugTaskTextView View for a simple text page displaying information about a bug task.
Class BugTaskView View class for presenting information about an IBugTask.
Class BugTaskBatchedCommentsAndActivityView A view for displaying batches of bug comments and activity.
Function get_prefix Return a prefix that can be used for this form.
Function get_assignee_vocabulary_info The vocabulary of bug task assignees the current user can set.
Class BugTaskBugWatchMixin A mixin to be used where a BugTask view displays BugWatch data.
Class BugTaskPrivilegeMixin No class docstring; 1/1 methods documented
Class IBugTaskEditForm Undocumented
Class BugTaskEditView The view class used for the task +editstatus page.
Class BugTaskDeletionView Used to delete a bugtask.
Function bugtask_sort_key Return a sort key for displaying a set of tasks for a single bug.
Class BugTasksNominationsView Browser class for rendering the bug nominations portlet.
Function can_add_project_task_to_bug Can a new bug task on a project be added to this bug?
Function can_add_package_task_to_bug Can a new bug task on a src pkg be added to this bug?
Class BugTasksTableView Browser class for rendering the bugtasks table.
Class BugTaskTableRowView Browser class for rendering a bugtask row on the bug page.
Class BugTaskPrivacyAdapter Provides IObjectPrivacy for IBugTask.
Class BugTaskCreateQuestionView View for creating a question from a bug.
Class BugTaskRemoveQuestionView View for creating a question from a bug.
Class BugActivityItem A decorated BugActivity.
Class BugTaskBreadcrumb Breadcrumb for an IBugTask.
@adapter(IBugTask, IReference, IWebServiceClientRequest)
@implementer(IFieldHTMLRenderer)
def bugtarget_renderer(context, field, request):
Render a bugtarget as a link.
def unique_title(title):
Canonicalise a message title to help identify messages with new information in their titles.
def get_comments_for_bugtask(bugtask, truncate=False, for_display=False, slice_info=None, show_spam_controls=False, user=None):
Return BugComments related to a bugtask.

This code builds a sorted list of BugComments in one shot, requiring only two database queries. It removes the titles for those comments which do not have a "new" subject line

Parametersfor_displayIf true, the zeroth comment is given an empty body so that it will be filtered by get_visible_comments.
slice_infoIf not None, defines a list of slices of the comments to retrieve.
def get_visible_comments(comments, user=None):
Return comments, filtering out empty or duplicated ones.
def get_prefix(bugtask):
Return a prefix that can be used for this form.

The prefix is constructed using the name of the bugtask's target so as to ensure that it's unique within the context of a bug. This is needed in order to included multiple edit forms on the bug page, while still keeping the field ids unique.

def get_assignee_vocabulary_info(context):
The vocabulary of bug task assignees the current user can set.
def bugtask_sort_key(bugtask):
Return a sort key for displaying a set of tasks for a single bug.

Designed to make sense when bugtargetdisplayname is shown.

def can_add_project_task_to_bug(bug):
Can a new bug task on a project be added to this bug?

If a bug has any bug tasks already, were it to be Proprietary or Embargoed, it cannot be marked as also affecting any other project, so return False.

def can_add_package_task_to_bug(bug):
Can a new bug task on a src pkg be added to this bug?

If a bug has any existing bug tasks on a project, were it to be Proprietary or Embargoed, then it cannot be marked as affecting a package, so return False.

A task on a given package may still be illegal to add, but this will be caught when bug.addTask() is attempted.

API Documentation for Launchpad, generated by pydoctor at 2018-08-16 00:00:03.