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'),
|
||||
color='orange'),
|
||||
State('finished', 'finished',
|
||||
('plan', 'accept', 'start', 'stop', 'modify', 'close'),
|
||||
('plan', 'accept', 'start', 'stop', 'finish', 'modify', 'close'),
|
||||
color='green'),
|
||||
State('cancelled', 'cancelled',
|
||||
('plan', 'accept', 'start', 'stop', 'modify', 'close'),
|
||||
|
@ -66,8 +66,8 @@ def workItemStates():
|
|||
State('replaced', 'replaced', (), color='grey'),
|
||||
Transition('plan', 'plan', 'planned'),
|
||||
Transition('accept', 'accept', 'accepted'),
|
||||
Transition('start', 'start', 'running'),
|
||||
Transition('stop', 'stop', 'stopped'),
|
||||
Transition('start', 'start working', 'running'),
|
||||
Transition('stop', 'work/stop', 'stopped'),
|
||||
Transition('finish', 'finish', 'finished'),
|
||||
Transition('cancel', 'cancel', 'cancelled'),
|
||||
Transition('modify', 'modify', 'new'),
|
||||
|
@ -119,9 +119,7 @@ class WorkItem(Stateful, Track):
|
|||
|
||||
@property
|
||||
def effort(self):
|
||||
value = self.data.get('effort')
|
||||
if value is None:
|
||||
return self.duration
|
||||
return self.data.get('effort') or self.duration
|
||||
|
||||
def __getattr__(self, attr):
|
||||
if attr not in IWorkItem:
|
||||
|
|
Loading…
Add table
Reference in a new issue