73
79
title=_('Summary'), required=True, description=_(
74
80
"A one-line summary of the issue or problem.")),
82
description = exported(Text(
77
83
title=_('Description'), required=True, description=_(
78
84
"Include as much detail as possible: what "
79
85
u"you\N{right single quotation mark}re trying to achieve, what steps "
80
"you take, what happens, and what you think should happen instead."))
86
"you take, what happens, and what you think should happen instead.")),
81
88
status = exported(Choice(
82
89
title=_('Status'), vocabulary=QuestionStatus,
83
90
default=QuestionStatus.OPEN, readonly=True),
87
94
default=QuestionPriority.NORMAL)
88
95
# XXX flacoste 2006-10-28: It should be more precise to define a new
89
96
# vocabulary that excludes the English variants.
91
title=_('Language'), vocabulary='Language',
92
description=_('The language in which this question is written.'))
97
language = exported(ReferenceChoice(
98
title=_('Language'), vocabulary='Language', schema=ILanguage,
99
description=_('The language in which this question is written.')),
93
101
owner = exported(PublicPersonChoice(
94
102
title=_('Owner'), required=True, readonly=True,
95
103
vocabulary='ValidPersonOrTeam'),
107
115
vocabulary='ValidPersonOrTeam'),
118
answer = exported(Reference(
111
119
title=_('Answer'), required=False,
112
120
description=_("The IQuestionMessage that contains the answer "
113
121
"confirmed by the owner as providing a solution to his problem."),
114
schema=IQuestionMessage)
115
datecreated = Datetime(
116
title=_('Date Created'), required=True, readonly=True)
122
schema=IQuestionMessage),
123
readonly=True, as_of="devel")
124
datecreated = exported(Datetime(
125
title=_('Date Created'), required=True, readonly=True),
126
exported_as='date_created', readonly=True, as_of="devel")
127
datedue = exported(Datetime(
118
128
title=_('Date Due'), required=False, default=None,
120
"The date by which we should have resolved this question."))
121
datelastquery = Datetime(
130
"The date by which we should have resolved this question.")),
131
exported_as='date_due', readonly=True, as_of="devel")
132
datelastquery = exported(Datetime(
122
133
title=_("Date Last Queried"), required=True,
123
134
description=_("The date on which we last heard from the "
124
"customer (owner)."))
125
datelastresponse = Datetime(
135
"customer (owner).")),
136
exported_as='date_last_query', readonly=True, as_of="devel")
137
datelastresponse = exported(Datetime(
126
138
title=_("Date last Responded"),
128
140
description=_("The date on which we last communicated "
129
141
"with the customer. The combination of datelastquery and "
130
"datelastresponse tells us in whose court the ball is."))
131
date_solved = Datetime(title=_("Date Answered"), required=False,
142
"datelastresponse tells us in whose court the ball is.")),
143
exported_as='date_last_response', readonly=True, as_of="devel")
144
date_solved = exported(Datetime(title=_("Date Answered"), required=False,
133
146
"The date on which the question owner confirmed that the "
134
"question is Solved."))
147
"question is Solved.")),
148
exported_as='date_solved', readonly=True, as_of="devel")
135
149
product = Choice(
136
150
title=_('Upstream Project'), required=False,
137
151
vocabulary='Product',
150
164
title=_('Status Whiteboard'), required=False,
151
165
description=_('Up-to-date notes on the status of the question.'))
152
166
# other attributes
153
target = Object(title=_('Project'), required=True, schema=IQuestionTarget,
167
target = exported(Reference(
168
title=_('Project'), required=True, schema=IQuestionTarget,
154
169
description=_('The distribution, source package, or product the '
155
'question pertains to.'))
170
'question pertains to.')),
158
173
title=_('Linked FAQ'),
159
174
description=_('The FAQ document containing the long answer to this '
165
180
'The set of subscriptions to this question.')
166
181
reopenings = Attribute(
167
182
"Records of times when this question was reopened.")
183
messages = exported(CollectionField(
169
184
title=_("Messages"),
171
186
"The list of messages that were exchanged as part of this "
172
187
"question , sorted from first to last."),
173
value_type=Object(schema=IQuestionMessage),
174
required=True, default=[], readonly=True)
188
value_type=Reference(schema=IQuestionMessage),
189
required=True, default=[], readonly=True),
176
192
# Workflow methods
177
193
def setStatus(user, new_status, comment, datecreated=None):