Part of lp.bugs.browser.bugtask View In Hierarchy
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 |
Bugtasks cannot be edited if the bug was converted into a question.
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.
For each error encountered, the addError() method should be called to log the problem.
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.