From 51fd16c8dee222a3e4dceb9c8c335ce0166c89f1 Mon Sep 17 00:00:00 2001 From: helmutm Date: Sat, 17 Jan 2009 17:32:32 +0000 Subject: [PATCH] rename 'stop' transition to 'work', and 'stopped' state to 'done' git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3155 fd906abe-77d9-0310-91a1-e0d9ade77398 --- organize/work.py | 20 ++++++++++---------- organize/work.txt | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/organize/work.py b/organize/work.py index bc7a809..8fc9c2d 100644 --- a/organize/work.py +++ b/organize/work.py @@ -42,32 +42,32 @@ _not_found = object() def workItemStates(): return StatesDefinition('workItemStates', State('new', 'new', - ('plan', 'accept', 'start', 'stop', 'finish', 'modify', 'delegate'), + ('plan', 'accept', 'start', 'work', 'finish', 'modify', 'delegate'), color='red'), State('planned', 'planned', - ('plan', 'accept', 'start', 'stop', 'finish', 'cancel', 'modify'), + ('plan', 'accept', 'start', 'work', 'finish', 'cancel', 'modify'), color='red'), State('accepted', 'accepted', - ('plan', 'accept', 'start', 'stop', 'finish', 'cancel', 'modify'), + ('plan', 'accept', 'start', 'work', 'finish', 'cancel', 'modify'), color='yellow'), State('running', 'running', - ('stop', 'finish', 'cancel', 'modify'), + ('work', 'finish', 'cancel', 'modify'), color='orange'), - State('stopped', 'stopped', - ('plan', 'accept', 'start', 'stop', 'finish', 'cancel', 'modify'), + State('done', 'done', + ('plan', 'accept', 'start', 'work', 'finish', 'cancel', 'modify'), color='orange'), State('finished', 'finished', - ('plan', 'accept', 'start', 'stop', 'finish', 'modify', 'close'), + ('plan', 'accept', 'start', 'work', 'finish', 'modify', 'close'), color='green'), State('cancelled', 'cancelled', - ('plan', 'accept', 'start', 'stop', 'modify', 'close'), + ('plan', 'accept', 'start', 'work', 'modify', 'close'), color='grey'), State('closed', 'closed', (), color='lightblue'), State('replaced', 'replaced', (), color='grey'), Transition('plan', 'plan', 'planned'), Transition('accept', 'accept', 'accepted'), Transition('start', 'start working', 'running'), - Transition('stop', 'work/stop', 'stopped'), + Transition('work', 'work', 'done'), Transition('finish', 'finish', 'finished'), Transition('cancel', 'cancel', 'cancelled'), Transition('modify', 'modify', 'new'), @@ -196,7 +196,7 @@ class WorkItem(Stateful, Track): if v is _not_found: if action == 'start' and k in ('end',): continue - if action in ('stop', 'finish') and k in ('duration', 'effort',): + if action in ('work', 'finish') and k in ('duration', 'effort',): continue v = self.data.get(k) if v is not None: diff --git a/organize/work.txt b/organize/work.txt index fd4ab92..6075632 100644 --- a/organize/work.txt +++ b/organize/work.txt @@ -107,13 +107,13 @@ After five minutes of work Jim decides to stop working; but he will continue work later, so he executes a ``stop`` action. The work item marked as "running" will be replaced by a new one. - >>> wi04 = wi03.doAction('stop', 'jim', end=1229958300) + >>> wi04 = wi03.doAction('work', 'jim', end=1229958300) >>> wi03 >>> wi04 - After another hour Jim works again on the task; he now finishes it within