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'), |                'move', 'cancel', 'modify'), color='lightgreen'), | ||||||
|         State('finished', 'finished', |         State('finished', 'finished', | ||||||
|               ('plan', 'accept', 'start', 'work', 'finish', |               ('plan', 'accept', 'start', 'work', 'finish', | ||||||
|                'move', 'modify', 'close'), |                'move', 'modify', 'close', 'cancel'), | ||||||
|               color='green'), |               color='green'), | ||||||
|         State('cancelled', 'cancelled', |         State('cancelled', 'cancelled', | ||||||
|               ('plan', 'accept', 'start', 'work', 'move', 'modify', 'close'), |               ('plan', 'accept', 'start', 'work', 'move', 'modify', 'close'), | ||||||
|  | @ -244,6 +244,9 @@ class WorkItem(Stateful, Track): | ||||||
|         elif self.state in ('planned', 'accepted', 'done'): |         elif self.state in ('planned', 'accepted', 'done'): | ||||||
|             self.state = self.state + '_x' |             self.state = self.state + '_x' | ||||||
|             self.reindex('state') |             self.reindex('state') | ||||||
|  |         elif self.state in ('finished',) and action == 'cancel': | ||||||
|  |             self.state = self.state + '_x' | ||||||
|  |             self.reindex('state') | ||||||
|         new.doTransition(action) |         new.doTransition(action) | ||||||
|         new.reindex() |         new.reindex() | ||||||
|         return new |         return new | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue