allow cancelling of finished work items
This commit is contained in:
parent
cc696ee87d
commit
d50b1ca9df
1 changed files with 4 additions and 1 deletions
|
@ -59,7 +59,7 @@ def workItemStates():
|
|||
'move', 'cancel', 'modify'), color='lightgreen'),
|
||||
State('finished', 'finished',
|
||||
('plan', 'accept', 'start', 'work', 'finish',
|
||||
'move', 'modify', 'close'),
|
||||
'move', 'modify', 'close', 'cancel'),
|
||||
color='green'),
|
||||
State('cancelled', 'cancelled',
|
||||
('plan', 'accept', 'start', 'work', 'move', 'modify', 'close'),
|
||||
|
@ -244,6 +244,9 @@ class WorkItem(Stateful, Track):
|
|||
elif self.state in ('planned', 'accepted', 'done'):
|
||||
self.state = self.state + '_x'
|
||||
self.reindex('state')
|
||||
elif self.state in ('finished',) and action == 'cancel':
|
||||
self.state = self.state + '_x'
|
||||
self.reindex('state')
|
||||
new.doTransition(action)
|
||||
new.reindex()
|
||||
return new
|
||||
|
|
Loading…
Add table
Reference in a new issue