From 73ab6556d164bc1e60c83444169a755bfafdb2d3 Mon Sep 17 00:00:00 2001 From: helmutm Date: Wed, 14 Jan 2009 09:43:43 +0000 Subject: [PATCH] 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 --- organize/work.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/organize/work.py b/organize/work.py index c28a8c2..bc7a809 100644 --- a/organize/work.py +++ b/organize/work.py @@ -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: