mark finished work items as 'finished_x' when moved so that one can decide later what to do with these
This commit is contained in:
		
							parent
							
								
									b0a01bae1a
								
							
						
					
					
						commit
						ab607a3b38
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -80,6 +80,7 @@ def workItemStates(): | ||||||
|         State('planned_x', 'planned', (), color='red'), |         State('planned_x', 'planned', (), color='red'), | ||||||
|         State('accepted_x', 'accepted', (), color='yellow'), |         State('accepted_x', 'accepted', (), color='yellow'), | ||||||
|         State('done_x', 'done', (), color='lightgreen'), |         State('done_x', 'done', (), color='lightgreen'), | ||||||
|  |         State('finished_x', 'finished', (), color='green'), | ||||||
|         # transitions: |         # transitions: | ||||||
|         Transition('plan', 'plan', 'planned'), |         Transition('plan', 'plan', 'planned'), | ||||||
|         Transition('accept', 'accept', 'accepted'), |         Transition('accept', 'accept', 'accepted'), | ||||||
|  | @ -174,6 +175,7 @@ class WorkItem(Stateful, Track): | ||||||
|     typeName = 'WorkItem' |     typeName = 'WorkItem' | ||||||
|     typeInterface = IWorkItem |     typeInterface = IWorkItem | ||||||
|     statesDefinition = 'organize.workItemStates' |     statesDefinition = 'organize.workItemStates' | ||||||
|  |     workItemType = 'work' | ||||||
| 
 | 
 | ||||||
|     initAttributes = set(['workItemType', 'party', 'title', 'description',  |     initAttributes = set(['workItemType', 'party', 'title', 'description',  | ||||||
|                           'deadline', 'start', 'end', |                           'deadline', 'start', 'end', | ||||||
|  | @ -293,7 +295,8 @@ class WorkItem(Stateful, Track): | ||||||
|         new.state = self.state |         new.state = self.state | ||||||
|         new.reindex() |         new.reindex() | ||||||
|         moved.data['target'] = new.name |         moved.data['target'] = new.name | ||||||
|         if self.state in ('planned', 'accepted', 'delegated', 'moved', 'done'): |         if self.state in ('planned', 'accepted', 'delegated', 'moved',  | ||||||
|  |                           'done', 'finished'): | ||||||
|             self.state = self.state + '_x' |             self.state = self.state + '_x' | ||||||
|             self.reindex('state') |             self.reindex('state') | ||||||
|         return new |         return new | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue