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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# 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
"""Interfaces for linking between Sprint and a Specification."""
__metaclass__ = type
__all__ = [
'ISprintSpecification',
]
from zope.interface import (
Attribute,
Interface,
)
from zope.schema import (
Choice,
Datetime,
Int,
Text,
)
from lp import _
from lp.blueprints.enums import SprintSpecificationStatus
from lp.services.fields import PublicPersonChoice
class ISprintSpecification(Interface):
"""A link between a Sprint and a Specification."""
id = Attribute(
"The ID of this sprint/spec link. We expose this because there is "
"no uniqueness of spec names across projects and of course "
"distros, so there is no unique way to identify a sprintspec by spec "
"name, because multiple specs at a sprint could have the same name.")
sprint = Choice(
title=_('Sprint'), required=True, readonly=True,
description=_(
"Select the meeting or sprint at which you would like "
"feature to be discussed or implemented. The meeting organisers "
"will review and approve or decline this request."),
vocabulary='FutureSprint')
specification = Int(
title=_('Specification'), required=True, readonly=True)
status = Choice(
title=_('Agenda Status'), required=True,
vocabulary=SprintSpecificationStatus)
whiteboard = Text(
title=_('Whiteboard'), required=False,
description=_(
"Any reasoning or rationale for your decision. "
"Your changes will override the current text. Note that "
"this is purely related to whether this spec is approved for "
"the agenda of this meeting, not a commentary of "
"the specification in general."))
registrant = PublicPersonChoice(
title=_('Nominated by'), required=False,
vocabulary='ValidPersonOrTeam')
date_created = Datetime(
title=_('Date nominated'),
description=_(
"The date this topic was nominated for the sprint agenda."))
decider = PublicPersonChoice(
title=_('Decided by'), required=False,
vocabulary='ValidPersonOrTeam')
date_decided = Datetime(
title=_('Date decided'),
description=_(
"The date this topic was reviewed and accepted or declined for "
"the meeting agenda."))
is_confirmed = Attribute(
"True if this spec is confirmed for the agenda of this sprint.")
is_decided = Attribute(
'True if this spec has been accepted or declined for this sprint.')
def acceptBy(decider):
"""Flag the sprint as being accepted by the decider."""
def declineBy(decider):
"""Flag the sprint as being declined by the decider."""
|