fix running work items: stop only if of type 'work'
This commit is contained in:
parent
0aeb854014
commit
3d3013b76c
1 changed files with 7 additions and 3 deletions
|
@ -295,10 +295,14 @@ class WorkItem(Stateful, Track):
|
|||
def doStart(self, userName, **kw):
|
||||
action = 'start'
|
||||
# stop any running work item of user:
|
||||
if self.state != 'running':
|
||||
# TODO: check: party query OK?
|
||||
if (userName == self.userName and
|
||||
self.workItemType == 'work' and
|
||||
self.state != 'running'):
|
||||
running = getParent(self).query(
|
||||
party=userName, state='running')
|
||||
for wi in running:
|
||||
if wi.workItemType == 'work':
|
||||
wi.doAction('work', userName,
|
||||
end=(kw.get('start') or getTimeStamp()))
|
||||
# standard creation of new work item:
|
||||
|
|
Loading…
Add table
Reference in a new issue