a35d15abe07c — Gerald Klix (speedy) 3 months ago
SUM: Added a workflow for defects.
1 files changed, 118 insertions(+), 8 deletions(-)

M haver/office/NuMach.pck.st
M haver/office/NuMach.pck.st +118 -8
@@ 1,14 1,14 @@ 
-'From Haver7.0 [latest update: #6454] on 25 June 2024 at 6:57:31 pm'!
+'From Haver7.0 [latest update: #6454] on 26 June 2024 at 9:57:29 pm'!
 'Description NuMach is a very simple to list.
 
 Hopefully it will serve as a base for something more elaborate.'!
-!provides: 'NuMach' 1 89!
+!provides: 'NuMach' 1 90!
 !requires: 'ActionBuilder' 1 35 nil!
 !requires: 'OfficeRoots' 1 68 nil!
 !requires: 'FacetsMorphs' 1 4 nil!
 !requires: 'Tracing' 1 13 nil!
+!requires: 'SystemMorphs' 1 15 nil!
 !requires: 'PlanF' 1 25 nil!
-!requires: 'SystemMorphs' 1 15 nil!
 !requires: 'Cuis-Base' 60 5981 nil!
 !requires: 'IdGeneration' 1 1 nil!
 !requires: 'ActionButtons' 1 33 nil!

          
@@ 29,8 29,8 @@ Modules newEnvironment: #NuMach!
 !interfacesOf: NuMach!
 Modules environment: #NuMach ::
 	interface: #API exporting: #(#TodoItem) ::
-	interface: #SPI aliasFor: #API ::
-	interface: #UTI aliasFor: #API!
+	interface: #UTI aliasFor: #API ::
+	interface: #SPI aliasFor: #API!
 
 !importsOf: NuMach!
 Modules environment: #NuMach :: 

          
@@ 38,8 38,8 @@ Modules environment: #NuMach ::
 	import: #(#TranscriptTracer) from: #API of: Modules>>#Tracing :: 
 	import: #(#TargetButton #TargetToggleButton) from: #API of: Modules>>#ActionButtons :: 
 	import: #(#ActionBuilder) from: #API of: Modules>>#ActionBuilder :: 
+	import: #(#DetailsMorph) from: #API of: Modules>>#FacetsMorphs :: 
 	import: #(#OfficeItemWrapper) from: #API of: Modules>>#OfficeRoots :: 
-	import: #(#DetailsMorph) from: #API of: Modules>>#FacetsMorphs :: 
 	import: #(#Store) from: #API of: Modules>>#PlanF :: 
 	import: #API of: Modules>>#SystemMorphs :: 
 	import: #(#GermanDateAndTimeInputMorph) from: #API of: Modules>>#ValueEditors :: 

          
@@ 1742,6 1742,12 @@ displayCode
 
 	^ 'ImpC'! !
 
+!(Modules>>#NuMach>>#Defect) methodsFor: 'as yet unclassified' stamp: 'KLG 6/26/2024 21:53:49'!
+startState
+	"Answer my start state."
+
+	^ self stateClass defectStartState! !
+
 !(Modules>>#NuMach>>#Defect) class methodsFor: 'user interface' stamp: 'KLG 7/12/2023 10:32:34'!
 displayCode
 	"Answer my 4 character display code."

          
@@ 2942,6 2948,12 @@ defaultStartState
 
 	^ self stateModelClass defaultModel startState! !
 
+!(Modules>>#NuMach>>#ItemState) class methodsFor: 'states' stamp: 'KLG 6/26/2024 21:54:48'!
+defectStartState
+	"Answer the start state for defects."
+
+	^ self stateModelClass defectModel startState! !
+
 !(Modules>>#NuMach>>#ItemState) class methodsFor: 'states' stamp: 'KLG 7/13/2023 15:03:30'!
 questionStartState
 	"Answer the start state for questions."

          
@@ 3145,6 3157,98 @@ addCodeModelStates
 
 	^ newState! !
 
+!(Modules>>#NuMach>>#StateModel) methodsFor: 'states' stamp: 'KLG 6/26/2024 21:51:38'!
+addDefectModelStates
+	"Add the start state for defects and all of its follow states.
+	
+	Answer the start state."
+
+	| newState completedState deferredState waitingState testingState restartState analyzingState correctingState wonTFixState fixedState |
+	newState := self createdStateNamed: #new andDescription: 'I was newly created'.
+
+	analyzingState := self
+		createdBusyStateNamed: #analyzing
+		andDescription: 'We are analyzing the defect right now'.
+	correctingState := self
+		createdBusyStateNamed: #correcting
+		andDescription: 'We are activly correcting the defect right now'.
+	completedState := self
+		createdDoneStateNamed: #completed
+		andDescription: 'Work on that item was completed successfully'.
+	waitingState :=		self
+		createdWaitingStateNamed: #waiting
+		andDescription: 'This defect is waiting for the completion of another item'.
+	deferredState :=		self 
+		createdWaitingStateNamed: #deferred
+		andDescription: 'This defect is not worked on, because of resource restrictions'.
+	wonTFixState := self
+		createdDoneStateNamed: #wonTFix
+		andDescription: 'This defect will not be fixed.'.
+	fixedState := self
+		createdDoneStateNamed: #fixed
+		andDescription: 'The defect was fixed.'.
+	testingState := self
+		createdStateNamed: #testing
+		andDescription: 'This deliverable of this item is tested for useability'.
+	restartState := self
+		createdStateNamed: #restart
+		andDescription: 'We decided to restart working on completed or cancled item'.
+	
+	newState
+		addNextAllowedState: analyzingState;
+		addNextAllowedState: deferredState;
+		addNextAllowedState: waitingState.
+	
+	analyzingState
+		addNextAllowedState: correctingState;
+		addNextAllowedState: wonTFixState;
+		addNextAllowedState: deferredState;
+		addNextAllowedState: waitingState.
+	
+	correctingState
+		addNextAllowedState: analyzingState;
+		addNextAllowedState: wonTFixState;
+		addNextAllowedState: deferredState;
+		addNextAllowedState: waitingState;
+		addNextAllowedState: fixedState.
+
+	fixedState
+		addNextAllowedState: testingState;
+		addNextAllowedState: correctingState;
+		addNextAllowedState: analyzingState;
+		addNextAllowedState: deferredState;
+		addNextAllowedState: waitingState.
+
+	testingState
+		addNextAllowedState: completedState;
+		addNextAllowedState: correctingState;
+		addNextAllowedState: analyzingState;
+		addNextAllowedState: deferredState;
+		addNextAllowedState: waitingState.
+	
+	deferredState
+		addNextAllowedState: analyzingState;
+		addNextAllowedState: correctingState;
+		addNextAllowedState: waitingState;
+		addNextAllowedState: testingState.
+
+	waitingState 
+		addNextAllowedState: correctingState;
+		addNextAllowedState: analyzingState;
+		addNextAllowedState: deferredState;
+		addNextAllowedState: testingState.
+	
+	completedState addNextAllowedState: restartState.
+
+	wonTFixState addNextAllowedState: restartState.
+
+	restartState
+		addNextAllowedState: analyzingState;
+		addNextAllowedState: deferredState;
+		addNextAllowedState: waitingState.
+	
+	^ newState! !
+
 !(Modules>>#NuMach>>#StateModel) methodsFor: 'states' stamp: 'KLG 7/13/2023 15:16:43'!
 addQuestionModelStates
 	"Add the start state for the state model for questions and all of its follow states.

          
@@ 3296,6 3400,12 @@ defaultModel
 
 	^ self simpleModel! !
 
+!(Modules>>#NuMach>>#StateModel) class methodsFor: 'models' stamp: 'KLG 6/26/2024 21:31:04'!
+defectModel
+	"Answer the model for defects."
+
+	^ self modelNamed: #defect! !
+
 !(Modules>>#NuMach>>#StateModel) class methodsFor: 'models' stamp: 'KLG 6/1/2023 10:56:59'!
 modelNamed: aNameSymbol
 	"Answer a state model denoted by aNameSymbol."

          
@@ 3358,11 3468,11 @@ simpleModel
 
 	^ self modelNamed: #simple! !
 
-!(Modules>>#NuMach>>#StateModel) class methodsFor: 'models' stamp: 'KLG 7/27/2023 17:51:40'!
+!(Modules>>#NuMach>>#StateModel) class methodsFor: 'models' stamp: 'KLG 6/26/2024 21:30:26'!
 wellKnownModelIds
 	"Answer the array of known model ids."
 
-	^ #(simple code question)! !
+	^ #(simple code defect question)! !
 
 !(Modules>>#NuMach>>#StateModel) class methodsFor: 'models' stamp: 'KLG 7/27/2023 17:51:40'!
 wellKnownModelsDo: aBlock