minor improvement of states definition and work item properties
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3148 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
470bb050fa
commit
73ab6556d1
1 changed files with 4 additions and 6 deletions
|
@ -57,7 +57,7 @@ def workItemStates():
|
||||||
('plan', 'accept', 'start', 'stop', 'finish', 'cancel', 'modify'),
|
('plan', 'accept', 'start', 'stop', 'finish', 'cancel', 'modify'),
|
||||||
color='orange'),
|
color='orange'),
|
||||||
State('finished', 'finished',
|
State('finished', 'finished',
|
||||||
('plan', 'accept', 'start', 'stop', 'modify', 'close'),
|
('plan', 'accept', 'start', 'stop', 'finish', 'modify', 'close'),
|
||||||
color='green'),
|
color='green'),
|
||||||
State('cancelled', 'cancelled',
|
State('cancelled', 'cancelled',
|
||||||
('plan', 'accept', 'start', 'stop', 'modify', 'close'),
|
('plan', 'accept', 'start', 'stop', 'modify', 'close'),
|
||||||
|
@ -66,8 +66,8 @@ def workItemStates():
|
||||||
State('replaced', 'replaced', (), color='grey'),
|
State('replaced', 'replaced', (), color='grey'),
|
||||||
Transition('plan', 'plan', 'planned'),
|
Transition('plan', 'plan', 'planned'),
|
||||||
Transition('accept', 'accept', 'accepted'),
|
Transition('accept', 'accept', 'accepted'),
|
||||||
Transition('start', 'start', 'running'),
|
Transition('start', 'start working', 'running'),
|
||||||
Transition('stop', 'stop', 'stopped'),
|
Transition('stop', 'work/stop', 'stopped'),
|
||||||
Transition('finish', 'finish', 'finished'),
|
Transition('finish', 'finish', 'finished'),
|
||||||
Transition('cancel', 'cancel', 'cancelled'),
|
Transition('cancel', 'cancel', 'cancelled'),
|
||||||
Transition('modify', 'modify', 'new'),
|
Transition('modify', 'modify', 'new'),
|
||||||
|
@ -119,9 +119,7 @@ class WorkItem(Stateful, Track):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def effort(self):
|
def effort(self):
|
||||||
value = self.data.get('effort')
|
return self.data.get('effort') or self.duration
|
||||||
if value is None:
|
|
||||||
return self.duration
|
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
if attr not in IWorkItem:
|
if attr not in IWorkItem:
|
||||||
|
|
Loading…
Add table
Reference in a new issue