work in progress: manage work items

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3085 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2008-12-25 12:26:00 +00:00
parent 0641e2fa61
commit eb524ff2c7
2 changed files with 6 additions and 3 deletions

View file

@ -172,5 +172,6 @@ transition.
... planDuration=400, planEnd=None, planEffort=None)
>>> wi02
<WorkItem ['001', 1, 'jim', '2008-12-22 15:33', 'assigned']:
{'created': ..., 'planEnd': 1229960400, 'assigned': ..., 'planDuration': 400,
'planStart': 1229960000, 'creator': 'jim', 'planEffort': 400}>
{'predecessor': '0000001', 'created': ..., 'planEnd': 1229960400,
'assigned': ..., 'planDuration': 400, 'planStart': 1229960000,
'creator': 'jim', 'planEffort': 400}>

View file

@ -25,7 +25,7 @@ $Id$
from zope import component
from zope.component import adapts
from zope.interface import implementer, implements
from zope.traversing.api import getParent
from zope.traversing.api import getName, getParent
from cybertools.organize.interfaces import IWorkItem, IWorkItems
from cybertools.stateful.base import Stateful
@ -169,6 +169,8 @@ class WorkItemTrack(WorkItem, Track):
new = workItems.add(self.taskId, self.userName, self.runId, **newData)
if transition == 'continue':
new.assign()
new.data['predecessor'] = self.__name__
self.data['continuation'] = new.__name__
return new
def reindex(self):