1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
# pylint: disable-msg=E0211,E0213
"""Interface for a QuestionReopening."""
__metaclass__ = type
__all__ = [
'IQuestionReopening',
]
from zope.interface import Interface
from zope.schema import (
Choice,
Datetime,
Object,
)
from lp import _
from lp.answers.enums import QuestionStatus
from lp.answers.interfaces.question import IQuestion
from lp.registry.interfaces.person import IPerson
class IQuestionReopening(Interface):
"""A record of the re-opening of a question.
An IQuestionReopening is created each time that a question that had its
answer attribute set is moved back to the OPEN state.
"""
question = Object(
title=_("The question reopened."), required=True, readonly=True,
schema=IQuestion)
datecreated = Datetime(
title=_("The date this question was re-opened."), required=True,
readonly=True)
reopener = Object(
title=_("The person who re-opened the question."), required=True,
readonly=True, schema=IPerson)
answerer = Object(
title=_("The person who, previously, was listed as the answerer of "
"the question."),
required=True, readonly=True, schema=IPerson)
date_solved = Datetime(
title=_("The date it had previously been solved."), required=True,
readonly=True)
priorstate = Choice(
title=_(
"The previous state of the question, before it was re-opened."),
vocabulary=QuestionStatus, required=True, readonly=True)
|