l.a.i.q.IQuestionTargetView(Interface) : interface documentation

Part of lp.answers.interfaces.questiontarget View In Hierarchy

Known subclasses: lp.answers.interfaces.webservice.IQuestionTarget

Methods that logged in user can access.
Method newQuestion Create a new question.
Method createQuestionFromBug Create and return a Question from a Bug.
Method addAnswerContact Add a new answer contact.
Method removeAnswerContact Remove an answer contact.
def newQuestion(owner, title, description, language=None, datecreated=None):
Create a new question.

A new question is created with status OPEN.

The owner and all of the target answer contacts will be subscribed to the question.

Unknown Field: ownerAn IPerson.
Unknown Field: titleA string.
Unknown Field: descriptionA string.
Unknown Field: languageAn ILanguage. If that parameter is omitted, the question is assumed to be created in English.
Unknown Field: datecreatedA datetime object that will be used for the datecreated attribute. Defaults to lp.services.database.constants.UTC_NOW.
def createQuestionFromBug(bug):
Create and return a Question from a Bug.

The bug's title and description are used as the question title and description. The bug owner is the question owner. The question is automatically linked to the bug.

Note that bug messages are copied to the question, but attachments are not. The question is the same age as the bug, though its datelastresponse attribute is current to signify the question is active.

Unknown Field: bugAn IBug.
@operation_parameters(PublicPersonChoice(_('The user of an administered team'), True, 'ValidPersonOrTeam'))
@call_with(REQUEST_USER)
@export_write_operation()
@operation_for_version('devel')
def addAnswerContact(person, subscribed_by):
Add a new answer contact.
ParameterspersonAn IPerson.
subscribed_byThe user making the change.
ReturnsTrue if the person was added, False if the person already is an answer contact.
RaisesAddAnswerContactErrorWhen the person or team does no have a preferred language.
@operation_parameters(PublicPersonChoice(_('The user of an administered team'), True, 'ValidPersonOrTeam'))
@call_with(REQUEST_USER)
@export_write_operation()
@operation_for_version('devel')
def removeAnswerContact(person, subscribed_by):
Remove an answer contact.
ParameterspersonAn IPerson.
subscribed_byThe user making the change.
ReturnsTrue if the person was removed, False if the person wasn't an answer contact.
API Documentation for Launchpad, generated by pydoctor at 2019-02-20 00:00:08.