l.b.b.b.BugTaskEditView(LaunchpadEditFormView, BugTaskBugWatchMixin, BugTaskPrivilegeMixin) : class documentation

Part of lp.bugs.browser.bugtask View In Hierarchy

The view class used for the task +editstatus page.
Method schema See LaunchpadFormView.
Method adapters See LaunchpadFormView.
Method initialize Undocumented
Method show_target_widget Undocumented
Method show_sourcepackagename_widget Undocumented
Method field_names Return the field names that can be edited by the user.
Method editable_field_names Return the names of fields the user has permission to edit.
Method is_question Return True or False if this bug was converted into a question.
Method next_url See LaunchpadFormView.
Method initial_values See LaunchpadFormView.
Method prefix Return a prefix that can be used for this form.
Method setUpFields Sets up the fields for the bug task edit form.
Method validate Validate the form.
Method updateContextFromData Updates the context object using the submitted form data.
Method save_action Update the bugtask with the form data.
Method _getReadOnlyFieldNames Return the names of fields that will be rendered read only.

Inherited from LaunchpadFormView (via LaunchpadEditFormView):

Method __init__ Undocumented
Method render Return the body of the response.
Method extendFields Allow subclasses to extend the form fields.
Method setUpWidgets Set up the widgets using the view's form fields and the context.
Method help_links Dictionary mapping field names to help links.
Method action_url Set the default action URL for the form.
Method has_available_actions Does the view have any available actions that will render?
Method addError Add a form wide error.
Method getFieldError Get the error associated with a particular field.
Method setFieldError Set the error associated with a particular field.
Static Method validate_none Do not do any validation.
Method validate_widgets Validate the named form widgets.
Method error_count Undocumented
Method ajax_failure_handler Called by the form if validate() finds any errors.
Method validate_cancel Noop validation in case we cancel.
Method focusedElementScript Helper function to construct the script element content.
Method isSingleLineLayout Undocumented
Method isMultiLineLayout Undocumented
Method isCheckBoxLayout Undocumented
Method showOptionalMarker Should the (Optional) marker be shown?
Method _processNotifications Add any notification messages to the response headers.
Method _abort Abort the form edit.
Method _validate Check all widgets and perform any custom validation.

Inherited from BugTaskBugWatchMixin:

Method bug_watch_error_message Return a browser-useable error message for a bug watch.

Inherited from BugTaskPrivilegeMixin:

Method user_has_privileges Is the user privileged? That is, an admin, pillar owner, driver
@property
def schema(self):
See LaunchpadFormView.
@property
def adapters(self):
See LaunchpadFormView.
def initialize(self):
Undocumented
@property
def show_target_widget(self):
Undocumented
@property
def show_sourcepackagename_widget(self):
Undocumented
@cachedproperty
def field_names(self):
Return the field names that can be edited by the user.
@cachedproperty
def editable_field_names(self):
Return the names of fields the user has permission to edit.
@property
def is_question(self):
Return True or False if this bug was converted into a question.

Bugtasks cannot be edited if the bug was converted into a question.

@property
def next_url(self):
See LaunchpadFormView.
@property
def initial_values(self):
See LaunchpadFormView.
@property
def prefix(self):
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 setUpFields(self):
Sets up the fields for the bug task edit form.

See LaunchpadFormView.

def _getReadOnlyFieldNames(self):
Return the names of fields that will be rendered read only.
def validate(self, data):
Validate the form.

For each error encountered, the addError() method should be called to log the problem.

def updateContextFromData(self, data, context=None):
Updates the context object using the submitted form data.

This method overrides that of LaunchpadEditFormView because of the fairly involved thread of logic behind updating some BugTask attributes, in particular the status, assignee and bugwatch fields.

@action('Save Changes', 'save')
def save_action(self, action, data):
Update the bugtask with the form data.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.