l.a.b.q.QuestionWorkflowView(LaunchpadFormView, LinkFAQMixin) : class documentation

Part of lp.answers.browser.question View In Hierarchy

Known subclasses: lp.answers.browser.question.QuestionConfirmAnswerView

View managing the question workflow action, i.e. action changing its status.
Method label Undocumented
Method page_title Undocumented
Method setUpFields See LaunchpadFormView.
Method setUpWidgets See LaunchpadFormView.
Method validate Form validatation hook.
Method lang The Question's language for the lang and xml:lang attributes.
Method dir The Question's language direction for the dir attribute.
Method is_question_owner Return True when this user is the question owner.
Method hasActions Return True if some actions are possible for this user.
Method visible_messages Undocumented
Method canAddComment Return whether the comment action should be displayed.
Method comment_action Add a comment to a resolved question.
Method show_call_to_answer Return whether the call to answer should be displayed.
Method canAddAnswer Return whether the answer action should be displayed.
Method answer_action Add an answer to the question.
Method canSelfAnswer Return whether the selfanswer action should be displayed.
Method selfanswer_action Action called when the owner provides the solution.
Method canRequestInfo Return if the requestinfo action should be displayed.
Method requestinfo_action Add a request for more information to the question.
Method canGiveInfo Return whether the giveinfo action should be displayed.
Method giveinfo_action Give additional informatin on the request.
Method validateConfirmAnswer Make sure that a valid message id was provided as the confirmed
Method canConfirm Return whether the confirm action should be displayed.
Method confirm_action Confirm that an answer solved the request.
Method canReopen Return whether the reopen action should be displayed.
Method reopen_action State that the problem is still occuring and provide new
Method new_question_url Return a URL to add a new question for the QuestionTarget.
Method original_bug Return the bug that the question was created from or None.
Method _addNotificationAndHandlePossibleSubscription Post-processing work common to all workflow actions.

Inherited from LaunchpadFormView:

Method __init__ Undocumented
Method initialize Undocumented
Method render Return the body of the response.
Method extendFields Allow subclasses to extend the form fields.
Method help_links Dictionary mapping field names to help links.
Method adapters Provide custom adapters for use when setting up the widgets.
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 initial_values Override this in your subclass if you want any widgets to have
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 LinkFAQMixin:

Method faq_target Return the IFAQTarget that should be use for this question.
Method default_message The default link message to use.
Method getFAQMessageReference Return the reference for the FAQ to use in the linking message.
@property
def label(self):
Undocumented
@property
def page_title(self):
Undocumented
def setUpFields(self):
See LaunchpadFormView.
def setUpWidgets(self):
See LaunchpadFormView.
def validate(self, data):
Form validatation hook.

When the action is confirm, find and validate the message that was selected. When another action is used, only make sure that a message was provided.

@property
def lang(self):
The Question's language for the lang and xml:lang attributes.
@property
def dir(self):
The Question's language direction for the dir attribute.
@property
def is_question_owner(self):
Return True when this user is the question owner.
def hasActions(self):
Return True if some actions are possible for this user.
@property
def visible_messages(self):
Undocumented
def canAddComment(self, action):
Return whether the comment action should be displayed.

Comments (message without a status change) can be added at any time by any logged-in user.

@action(_('Just Add a Comment'), 'comment', canAddComment)
def comment_action(self, action, data):
Add a comment to a resolved question.
@property
def show_call_to_answer(self):
Return whether the call to answer should be displayed.
def canAddAnswer(self, action):
Return whether the answer action should be displayed.
@action(_('Propose Answer'), 'answer', canAddAnswer)
def answer_action(self, action, data):
Add an answer to the question.
def canSelfAnswer(self, action):
Return whether the selfanswer action should be displayed.
@action(_('Problem Solved'), 'selfanswer', canSelfAnswer)
def selfanswer_action(self, action, data):
Action called when the owner provides the solution.
def canRequestInfo(self, action):
Return if the requestinfo action should be displayed.
@action(_('Add Information Request'), 'requestinfo', canRequestInfo)
def requestinfo_action(self, action, data):
Add a request for more information to the question.
def canGiveInfo(self, action):
Return whether the giveinfo action should be displayed.
@action(_("I'm Providing More Information"), 'giveinfo', canGiveInfo)
def giveinfo_action(self, action, data):
Give additional informatin on the request.
def validateConfirmAnswer(self, data):
Make sure that a valid message id was provided as the confirmed answer.
def canConfirm(self, action):
Return whether the confirm action should be displayed.
@action(_('This Solved My Problem'), 'confirm', canConfirm)
def confirm_action(self, action, data):
Confirm that an answer solved the request.
def canReopen(self, action):
Return whether the reopen action should be displayed.
@action(_('I Still Need an Answer'), 'reopen', canReopen)
def reopen_action(self, action, data):
State that the problem is still occuring and provide new information about it.
def _addNotificationAndHandlePossibleSubscription(self, message, data):
Post-processing work common to all workflow actions.

Adds a notification, subscribe the user if they checked the 'Email me...' option and redirect to the question page.

@property
def new_question_url(self):
Return a URL to add a new question for the QuestionTarget.
@property
def original_bug(self):
Return the bug that the question was created from or None.
API Documentation for Launchpad, generated by pydoctor at 2019-07-21 00:00:04.