Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-11-19 15:59:39 +0000
committerRyan D. Brooks2010-11-19 15:59:39 +0000
commit5e9c600821e6db4a855c051dc4808759612c69b7 (patch)
tree10b54f15af944b0cbd3ba08d30d4194d1bf8e120
parent4d71f60597dc7baf9226d9c60d183429fa8bfdda (diff)
downloadorg.eclipse.osee-5e9c600821e6db4a855c051dc4808759612c69b7.tar.gz
org.eclipse.osee-5e9c600821e6db4a855c051dc4808759612c69b7.tar.xz
org.eclipse.osee-5e9c600821e6db4a855c051dc4808759612c69b7.zip
feature[ats_38CNB]: Add ability for additional complete and cancelled states
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java18
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbActionData.java28
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbReviews.java28
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbTasks.java7
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/navigate/DemoNavigateViewItems.java8
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoReqWorkFlowDefinition.java4
-rw-r--r--plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoSWDesignWorkFlowDefinition.java20
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CancelledDateColumnTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CompletedDateColumnTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/DeadlineColumnTest.java2
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/EstimatedHoursColumnTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/ParentStateAndIdColumnTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/StateColumnTest.java6
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java13
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToTaskEditorTest.java3
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java8
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsDeleteManagerTest.java15
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java28
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsPurgeTest.java7
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java4
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java8
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java23
-rw-r--r--plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java26
-rw-r--r--plugins/org.eclipse.osee.ats/images/transition.gifbin0 -> 124 bytes
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsImage.java1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AtsLogHistoryAction.java54
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewDecisionReviewJob.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java58
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java483
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java40
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java17
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewState.java48
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java28
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalArtifact.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalState.java47
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewState.java47
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java21
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java36
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskStates.java46
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java46
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/AtsLog.java59
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java52
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ResolutionColumn.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewDeciderColumn.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java17
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAAssigneesHeader.java67
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java25
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAHistorySection.java255
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOriginatorHeader.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java21
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMARelationsHyperlinkComposite.java66
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java106
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewPrepareStateItem.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsHandleAddReviewRuleStateItem.java16
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsLogWorkPage.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/IAtsStateItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java48
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java13
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java13
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java36
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/GoalXViewerFactory.java1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java25
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/SMAState.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/SMAState.java)22
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XCurrentStateDam.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java)17
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XStateAssigneesDam.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateAssigneesDam.java)39
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XStateDam.java (renamed from plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateDam.java)2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsQuickSearchOperation.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateGoalTestArtifacts.java26
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/GenerateReviewParticipationReport.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java64
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/AtsNotification.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CancelMultipleWorkflows.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CompleteMultipleWorkflows.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java12
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/IXTaskViewer.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java29
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionableItemManager.java13
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ArtifactEmailWizard.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactChecks.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java18
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DeadlineManager.java17
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DefaultTeamState.java20
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java13
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java18
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PriviledgedUserManager.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java18
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java32
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SimpleTeamState.java55
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java204
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamState.java60
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionTeamMetrics.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XCancellationReasonTextWidget.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java80
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerSmaStateColumn.java56
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkPage.java21
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionManager.java246
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditor.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CancelledWorkPageShape.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CompletedWorkPageShape.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java12
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/DecisionWorkflowDefinition.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/GoalWorkflowDefinition.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/PeerToPeerWorkflowDefinition.java17
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/SimpleWorkflowDefinition.java13
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TaskWorkflowDefinition.java23
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TeamWorkflowDefinition.java65
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDecisionReviewRule.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDefaultWorkflowRule.java12
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightPeerToPeerReviewRule.java8
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCancelledWorkPageDefinition.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCompletedWorkPageDefinition.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java5
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsXWidgetActionFormPage.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldViewArtifact.java10
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldCompletedFilter.java19
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java9
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java70
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java67
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java20
-rw-r--r--plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee103
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/MasterTestSuite_DemoDbTests.launch4
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java1
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java13
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java14
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java22
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java22
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java5
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/IWorkPage.java22
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPage.java32
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java75
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageSection.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageType.java28
-rw-r--r--plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch4
188 files changed, 2833 insertions, 1554 deletions
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java
index f58257e8932..225ba3bc5f4 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/PopulateDemoActions.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.config.demo;
import java.io.File;
import java.util.Collection;
+import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;
@@ -39,9 +40,9 @@ import org.eclipse.osee.ats.util.ActionManager;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.ats.util.FavoritesManager;
import org.eclipse.osee.ats.util.SubscribeManager;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.SystemUser;
@@ -59,6 +60,7 @@ import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
+import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
@@ -303,8 +305,7 @@ public class PopulateDemoActions extends XNavigateItemAction {
DemoDbUtil.sleep(2000L);
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Committing branch");
Job job =
- reqTeam.getBranchMgr().commitWorkingBranch(false, true, reqTeam.getTargetedVersion().getParentBranch(),
- true);
+ reqTeam.getBranchMgr().commitWorkingBranch(false, true, reqTeam.getTargetedVersion().getParentBranch(), true);
try {
job.join();
} catch (InterruptedException ex) {
@@ -426,24 +427,27 @@ public class PopulateDemoActions extends XNavigateItemAction {
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_2");
createActions(DemoDbActionData.getNonReqSawActionData(), DemoSawBuilds.SAW_Bld_2.toString(), null, transaction);
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "createNonReqChangeDemoActions - SAW_Bld_1");
- createActions(DemoDbActionData.getNonReqSawActionData(), DemoSawBuilds.SAW_Bld_1.toString(),
- DefaultTeamState.Completed, transaction);
+ createActions(DemoDbActionData.getNonReqSawActionData(), DemoSawBuilds.SAW_Bld_1.toString(), TeamState.Completed,
+ transaction);
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "createNonReqChangeDemoActions - getGenericActionData");
createActions(DemoDbActionData.getGenericActionData(), null, null, transaction);
transaction.execute();
}
- private Set<ActionArtifact> createActions(Set<DemoDbActionData> actionDatas, String versionStr, DefaultTeamState toStateOverride, SkynetTransaction transaction) throws Exception {
+ private Set<ActionArtifact> createActions(Set<DemoDbActionData> actionDatas, String versionStr, TeamState toStateOverride, SkynetTransaction transaction) throws Exception {
Set<ActionArtifact> actionArts = new HashSet<ActionArtifact>();
int currNum = 1;
for (DemoDbActionData aData : actionDatas) {
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Creating " + currNum++ + "/" + actionDatas.size());
int x = 0;
+ Date createdDate = new Date();
+ User createdBy = UserManager.getUser();
+
for (String prefixTitle : aData.prefixTitles) {
ActionArtifact actionArt =
ActionManager.createAction(null, prefixTitle + " " + aData.postFixTitle,
TITLE_PREFIX[x] + " " + aData.postFixTitle, CHANGE_TYPE[x], "1", false, null,
- aData.getActionableItems(), transaction);
+ aData.getActionableItems(), createdDate, createdBy, transaction);
actionArts.add(actionArt);
for (TeamWorkFlowArtifact teamWf : actionArt.getTeamWorkFlowArtifacts()) {
TeamWorkflowManager dtwm = new TeamWorkflowManager(teamWf);
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbActionData.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbActionData.java
index 27b714edaf1..1ea30578f24 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbActionData.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbActionData.java
@@ -14,7 +14,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.osee.ats.artifact.ActionableItemArtifact;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.UserCommunity;
@@ -25,7 +25,7 @@ public class DemoDbActionData {
public final String postFixTitle;
public final String priority;
public final String[] actionableItems;
- public final DefaultTeamState toState;
+ public final TeamState toState;
public final Integer[] userCommunityIndices;
public final String[] prefixTitles;
private final CreateReview[] createReviews;
@@ -35,7 +35,7 @@ public class DemoDbActionData {
None
};
- public DemoDbActionData(String[] prefixTitles, String postFixTitle, String priority, String[] actionableItems, Integer[] userCommunityIndecies, DefaultTeamState toState, CreateReview... createReviews) {
+ public DemoDbActionData(String[] prefixTitles, String postFixTitle, String priority, String[] actionableItems, Integer[] userCommunityIndecies, TeamState toState, CreateReview... createReviews) {
this.prefixTitles = prefixTitles;
this.postFixTitle = postFixTitle;
this.priority = priority;
@@ -73,46 +73,46 @@ public class DemoDbActionData {
new String[] {
DemoDbAIs.SAW_Requirements.getAIName(),
DemoDbAIs.SAW_Code.getAIName(),
- DemoDbAIs.SAW_Test.getAIName()}, new Integer[] {1}, DefaultTeamState.Implement));
+ DemoDbAIs.SAW_Test.getAIName()}, new Integer[] {1}, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"SAW (uncommitted) More Reqt Changes for"}, "Diagram View",
"3", new String[] {
DemoDbAIs.SAW_Code.getAIName(),
DemoDbAIs.SAW_SW_Design.getAIName(),
DemoDbAIs.SAW_Requirements.getAIName(),
- DemoDbAIs.SAW_Test.getAIName()}, new Integer[] {1}, DefaultTeamState.Implement));
+ DemoDbAIs.SAW_Test.getAIName()}, new Integer[] {1}, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"SAW (no-branch) Even More Requirement Changes for"},
"Diagram View", "3", new String[] {
DemoDbAIs.SAW_Code.getAIName(),
DemoDbAIs.SAW_SW_Design.getAIName(),
DemoDbAIs.SAW_Requirements.getAIName(),
- DemoDbAIs.SAW_Test.getAIName()}, new Integer[] {1}, DefaultTeamState.Implement));
+ DemoDbAIs.SAW_Test.getAIName()}, new Integer[] {1}, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"SAW (uncommitted-conflicted) More Requirement Changes for"},
"Diagram View", "3", new String[] {DemoDbAIs.SAW_Requirements.getAIName()}, new Integer[] {1},
- DefaultTeamState.Implement));
+ TeamState.Implement));
return actionDatas;
}
public static Set<DemoDbActionData> getNonReqSawActionData() {
Set<DemoDbActionData> actionDatas = new HashSet<DemoDbActionData>();
actionDatas.add(new DemoDbActionData(new String[] {"Workaround for"}, "Graph View", "1",
- new String[] {DemoDbAIs.Adapter.getAIName()}, new Integer[] {1}, DefaultTeamState.Implement));
+ new String[] {DemoDbAIs.Adapter.getAIName()}, new Integer[] {1}, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"Working with"}, "Diagram Tree", "3",
- new String[] {DemoDbAIs.SAW_SW_Design.getAIName()}, new Integer[] {0, 2}, DefaultTeamState.Endorse));
+ new String[] {DemoDbAIs.SAW_SW_Design.getAIName()}, new Integer[] {0, 2}, TeamState.Endorse));
return actionDatas;
}
public static Set<DemoDbActionData> getGenericActionData() {
Set<DemoDbActionData> actionDatas = new HashSet<DemoDbActionData>();
actionDatas.add(new DemoDbActionData(new String[] {"Problem with the", "Can't see the"}, "Graph View", "1",
- new String[] {DemoDbAIs.Adapter.getAIName()}, new Integer[] {1}, DefaultTeamState.Implement));
+ new String[] {DemoDbAIs.Adapter.getAIName()}, new Integer[] {1}, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"Problem in", "Can't load"}, "Diagram Tree", "3",
- new String[] {DemoDbAIs.CIS_Test.getAIName()}, new Integer[] {0, 2}, DefaultTeamState.Endorse));
+ new String[] {DemoDbAIs.CIS_Test.getAIName()}, new Integer[] {0, 2}, TeamState.Endorse));
actionDatas.add(new DemoDbActionData(new String[] {"Button W doesn't work on"}, "Situation Page", "3",
- new String[] {DemoDbAIs.CIS_Test.getAIName()}, new Integer[] {0, 2}, DefaultTeamState.Analyze));
+ new String[] {DemoDbAIs.CIS_Test.getAIName()}, new Integer[] {0, 2}, TeamState.Analyze));
actionDatas.add(new DemoDbActionData(new String[] {"Problem with the"}, "user window", "4",
- new String[] {DemoDbAIs.Timesheet.getAIName()}, new Integer[] {1}, DefaultTeamState.Implement));
+ new String[] {DemoDbAIs.Timesheet.getAIName()}, new Integer[] {1}, TeamState.Implement));
actionDatas.add(new DemoDbActionData(new String[] {"Button S doesn't work on"}, "help", "3",
- new String[] {DemoDbAIs.Reader.getAIName()}, new Integer[] {1}, DefaultTeamState.Completed,
+ new String[] {DemoDbAIs.Reader.getAIName()}, new Integer[] {1}, TeamState.Completed,
CreateReview.Decision));
return actionDatas;
}
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbReviews.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbReviews.java
index 22b070c41de..fb4f07b9ff1 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbReviews.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbReviews.java
@@ -16,8 +16,10 @@ import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
import org.eclipse.osee.ats.artifact.DecisionReviewWorkflowManager;
import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
+import org.eclipse.osee.ats.artifact.PeerToPeerReviewState;
import org.eclipse.osee.ats.artifact.PeerToPeerReviewWorkflowManager;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.config.demo.internal.OseeAtsConfigDemoActivator;
@@ -30,6 +32,7 @@ import org.eclipse.osee.ats.util.widgets.defect.DefectItem.Severity;
import org.eclipse.osee.ats.util.widgets.role.UserRole;
import org.eclipse.osee.ats.util.widgets.role.UserRole.Role;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
@@ -60,24 +63,28 @@ public class DemoDbReviews {
*/
public static void createDecisionReviews(SkynetTransaction transaction) throws Exception {
+ Date createdDate = new Date();
+ User createdBy = UserManager.getUser();
+
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Create Decision reviews");
TeamWorkFlowArtifact firstTestArt = getSampleReviewTestWorkflows().get(0);
TeamWorkFlowArtifact secondTestArt = getSampleReviewTestWorkflows().get(1);
// Create a Decision review and transition to ReWork
- DecisionReviewArtifact reviewArt = ReviewManager.createValidateReview(firstTestArt, true, transaction);
+ DecisionReviewArtifact reviewArt =
+ ReviewManager.createValidateReview(firstTestArt, true, createdDate, createdBy, transaction);
Result result =
- DecisionReviewWorkflowManager.transitionTo(reviewArt, DecisionReviewArtifact.DecisionReviewState.Followup,
- UserManager.getUser(), false, transaction);
+ DecisionReviewWorkflowManager.transitionTo(reviewArt, DecisionReviewState.Followup, UserManager.getUser(),
+ false, transaction);
if (result.isFalse()) {
throw new IllegalStateException("Failed transitioning review to Followup: " + result.getText());
}
reviewArt.persist(transaction);
// Create a Decision review and transition to Completed
- reviewArt = ReviewManager.createValidateReview(secondTestArt, true, transaction);
- DecisionReviewWorkflowManager.transitionTo(reviewArt, DecisionReviewArtifact.DecisionReviewState.Completed,
- UserManager.getUser(), false, transaction);
+ reviewArt = ReviewManager.createValidateReview(secondTestArt, true, createdDate, createdBy, transaction);
+ DecisionReviewWorkflowManager.transitionTo(reviewArt, DecisionReviewState.Completed, UserManager.getUser(),
+ false, transaction);
if (result.isFalse()) {
throw new IllegalStateException("Failed transitioning review to Completed: " + result.getText());
}
@@ -130,8 +137,8 @@ public class DemoDbReviews {
roles.add(new UserRole(Role.Reviewer, DemoDbUtil.getDemoUser(DemoUsers.Kay_Jones)));
roles.add(new UserRole(Role.Reviewer, DemoDbUtil.getDemoUser(DemoUsers.Alex_Kay), 2.0, true));
Result result =
- PeerToPeerReviewWorkflowManager.transitionTo(reviewArt, PeerToPeerReviewArtifact.PeerToPeerReviewState.Review,
- roles, null, UserManager.getUser(), false, transaction);
+ PeerToPeerReviewWorkflowManager.transitionTo(reviewArt, PeerToPeerReviewState.Review, roles, null,
+ UserManager.getUser(), false, transaction);
if (result.isFalse()) {
throw new IllegalStateException("Failed transitioning review to Review: " + result.getText());
}
@@ -159,9 +166,8 @@ public class DemoDbReviews {
defects.add(new DefectItem(DemoDbUtil.getDemoUser(DemoUsers.Joe_Smith), Severity.Major, Disposition.Accept,
InjectionActivity.Code, "Negate logic", "Fixed", "There.java:Line 234", new Date()));
result =
- PeerToPeerReviewWorkflowManager.transitionTo(reviewArt,
- PeerToPeerReviewArtifact.PeerToPeerReviewState.Completed, roles, defects, UserManager.getUser(), false,
- transaction);
+ PeerToPeerReviewWorkflowManager.transitionTo(reviewArt, PeerToPeerReviewState.Completed, roles, defects,
+ UserManager.getUser(), false, transaction);
reviewArt.persist(transaction);
if (result.isFalse()) {
throw new IllegalStateException("Failed transitioning review to Completed: " + result.getText());
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbTasks.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbTasks.java
index 44e86b51f22..3ec647bc0f6 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbTasks.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/config/DemoDbTasks.java
@@ -12,11 +12,14 @@ package org.eclipse.osee.ats.config.demo.config;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.logging.Level;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.config.demo.internal.OseeAtsConfigDemoActivator;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.support.test.util.DemoUsers;
/**
@@ -27,13 +30,15 @@ public class DemoDbTasks {
public static void createTasks() throws Exception {
OseeLog.log(OseeAtsConfigDemoActivator.class, Level.INFO, "Create tasks off code workflows");
boolean firstTaskWorkflow = true;
+ Date createdDate = new Date();
+ User createdBy = UserManager.getUser();
for (TeamWorkFlowArtifact codeArt : DemoDbUtil.getSampleCodeWorkflows()) {
for (String title : getTaskTitles(firstTaskWorkflow)) {
TaskArtifact taskArt =
codeArt.createNewTask(
(firstTaskWorkflow ? Arrays.asList(DemoDbUtil.getDemoUser(DemoUsers.Joe_Smith),
DemoDbUtil.getDemoUser(DemoUsers.Kay_Jones)) : Arrays.asList(DemoDbUtil.getDemoUser(DemoUsers.Joe_Smith))),
- title);
+ title, createdDate, createdBy);
taskArt.persist();
}
firstTaskWorkflow = false;
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/navigate/DemoNavigateViewItems.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/navigate/DemoNavigateViewItems.java
index 883014d60a4..6535bf80bec 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/navigate/DemoNavigateViewItems.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/navigate/DemoNavigateViewItems.java
@@ -90,16 +90,16 @@ public class DemoNavigateViewItems implements IAtsNavigateItem {
TeamDefinitionArtifact teamDef = DemoTeams.getInstance().getTeamDef(team);
XNavigateItem teamItems = new XNavigateItemFolder(jhuItem, "JHU " + team.name().replaceAll("_", " "));
new SearchNavigateItem(teamItems, new TeamWorldSearchItem("Show Open " + teamDef + " Actions",
- Arrays.asList(DemoTeams.getInstance().getTeamDef(team)), false, true, true, null, null,
+ Arrays.asList(DemoTeams.getInstance().getTeamDef(team)), false, false, true, true, null, null,
ReleasedOption.Both));
new SearchNavigateItem(teamItems, new TeamWorldSearchItem("Show Open " + teamDef + " Workflows",
- Arrays.asList(DemoTeams.getInstance().getTeamDef(team)), false, false, true, null, null,
+ Arrays.asList(DemoTeams.getInstance().getTeamDef(team)), false, false, false, true, null, null,
ReleasedOption.Both));
// Handle all children teams
for (TeamDefinitionArtifact childTeamDef : Artifacts.getChildrenOfTypeSet(
DemoTeams.getInstance().getTeamDef(team), TeamDefinitionArtifact.class, true)) {
new SearchNavigateItem(teamItems, new TeamWorldSearchItem("Show Open " + childTeamDef + " Workflows",
- Arrays.asList(childTeamDef), false, false, false, null, null, ReleasedOption.Both));
+ Arrays.asList(childTeamDef), false, false, false, false, null, null, ReleasedOption.Both));
}
if (teamDef.isTeamUsesVersions()) {
if (team.name().contains("SAW")) {
@@ -112,7 +112,7 @@ public class DemoNavigateViewItems implements IAtsNavigateItem {
new SearchNavigateItem(teamItems, new VersionTargetedForTeamSearchItem(teamDef, null, false,
LoadView.WorldEditor));
new SearchNavigateItem(teamItems, new TeamWorldSearchItem("Show Un-Released Team Workflows",
- Arrays.asList(teamDef), true, false, true, null, null, ReleasedOption.UnReleased));
+ Arrays.asList(teamDef), true, true, false, true, null, null, ReleasedOption.UnReleased));
new ReleaseVersionItem(teamItems, teamDef);
new CreateNewVersionItem(teamItems, teamDef);
}
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoReqWorkFlowDefinition.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoReqWorkFlowDefinition.java
index 6e4c2f48be5..d6e8a1818b8 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoReqWorkFlowDefinition.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoReqWorkFlowDefinition.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.config.demo.workflow;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.TeamWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsStatePercentCompleteWeightDefaultWorkflowRule;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
@@ -34,7 +34,7 @@ public class DemoReqWorkFlowDefinition extends TeamWorkflowDefinition {
AtsWorkDefinitions.importWorkItemDefinitionsIntoDb(writeType, xResultData,
TeamWorkflowDefinition.getWorkPageDefinitionsForId(getId()));
AtsWorkDefinitions.importWorkItemDefinitionsIntoDb(writeType, xResultData, new DemoReqWorkFlowDefinition());
- AtsWorkDefinitions.relatePageToBranchCommitRules(ID + "." + DefaultTeamState.Implement.name());
+ AtsWorkDefinitions.relatePageToBranchCommitRules(ID + "." + TeamState.Implement.getPageName());
}
}
diff --git a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoSWDesignWorkFlowDefinition.java b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoSWDesignWorkFlowDefinition.java
index 72c5e6572c9..09a28804ea2 100644
--- a/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoSWDesignWorkFlowDefinition.java
+++ b/plugins/org.eclipse.osee.ats.config.demo/src/org/eclipse/osee/ats/config/demo/workflow/DemoSWDesignWorkFlowDefinition.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.ats.config.demo.workflow;
import java.util.Arrays;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.TeamWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsStatePercentCompleteWeightDefaultWorkflowRule;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
@@ -37,16 +37,16 @@ public class DemoSWDesignWorkFlowDefinition extends TeamWorkflowDefinition {
public void config(WriteType writeType, XResultData xResultData) throws OseeCoreException {
// Create decision and peer rules
DemoAddDecisionReviewRule decisionTransitionToRule =
- new DemoAddDecisionReviewRule(DefaultTeamState.Analyze.name(), ReviewBlockType.None,
+ new DemoAddDecisionReviewRule(TeamState.Analyze.getPageName(), ReviewBlockType.None,
StateEventType.TransitionTo);
DemoAddDecisionReviewRule decisionCreateBranchRule =
- new DemoAddDecisionReviewRule(DefaultTeamState.Implement.name(), ReviewBlockType.None,
+ new DemoAddDecisionReviewRule(TeamState.Implement.getPageName(), ReviewBlockType.None,
StateEventType.CreateBranch);
DemoAddPeerToPeerReviewRule peerTransitionToRule =
- new DemoAddPeerToPeerReviewRule(DefaultTeamState.Authorize.name(), ReviewBlockType.None,
+ new DemoAddPeerToPeerReviewRule(TeamState.Authorize.getPageName(), ReviewBlockType.None,
StateEventType.TransitionTo);
DemoAddPeerToPeerReviewRule peerCommitBranchRule =
- new DemoAddPeerToPeerReviewRule(DefaultTeamState.Implement.name(), ReviewBlockType.None,
+ new DemoAddPeerToPeerReviewRule(TeamState.Implement.getPageName(), ReviewBlockType.None,
StateEventType.CommitBranch);
// Import decision and peer rules into database
AtsWorkDefinitions.importWorkItemDefinitionsIntoDb(writeType, null,
@@ -56,18 +56,18 @@ public class DemoSWDesignWorkFlowDefinition extends TeamWorkflowDefinition {
AtsWorkDefinitions.importWorkItemDefinitionsIntoDb(writeType, xResultData,
TeamWorkflowDefinition.getWorkPageDefinitionsForId(getId()));
AtsWorkDefinitions.importWorkItemDefinitionsIntoDb(writeType, xResultData, new DemoSWDesignWorkFlowDefinition());
- AtsWorkDefinitions.relatePageToBranchCommitRules(ID + "." + DefaultTeamState.Implement.name());
+ AtsWorkDefinitions.relatePageToBranchCommitRules(ID + "." + TeamState.Implement.getPageName());
// Add Non-blocking createBranch decision review to Implement state
- WorkItemDefinitionFactory.relateWorkItemDefinitions(ID + "." + DefaultTeamState.Analyze.name(),
+ WorkItemDefinitionFactory.relateWorkItemDefinitions(ID + "." + TeamState.Analyze.getPageName(),
decisionTransitionToRule.getId());
- WorkItemDefinitionFactory.relateWorkItemDefinitions(ID + "." + DefaultTeamState.Implement.name(),
+ WorkItemDefinitionFactory.relateWorkItemDefinitions(ID + "." + TeamState.Implement.getPageName(),
decisionCreateBranchRule.getId());
// Add Non-blocking commitBranch peerToPeer review to Implement state
- WorkItemDefinitionFactory.relateWorkItemDefinitions(ID + "." + DefaultTeamState.Authorize.name(),
+ WorkItemDefinitionFactory.relateWorkItemDefinitions(ID + "." + TeamState.Authorize.getPageName(),
peerTransitionToRule.getId());
- WorkItemDefinitionFactory.relateWorkItemDefinitions(ID + "." + DefaultTeamState.Implement.name(),
+ WorkItemDefinitionFactory.relateWorkItemDefinitions(ID + "." + TeamState.Implement.getPageName(),
peerCommitBranchRule.getId());
}
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CancelledDateColumnTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CancelledDateColumnTest.java
index e5b466f8fac..847495182ff 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CancelledDateColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CancelledDateColumnTest.java
@@ -12,8 +12,9 @@ import org.eclipse.osee.ats.column.AssigneeColumn;
import org.eclipse.osee.ats.column.CancelledDateColumn;
import org.eclipse.osee.ats.test.util.DemoTestUtil;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
@@ -45,8 +46,9 @@ public class CancelledDateColumnTest {
Assert.assertNull(date);
Assert.assertEquals("", CancelledDateColumn.getDateStr(teamArt));
+ TransitionManager transitionMgr = new TransitionManager(teamArt);
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), CancelledDateColumnTest.class.getSimpleName());
- teamArt.transitionToCancelled("reason", transaction, TransitionOption.OverrideTransitionValidityCheck);
+ transitionMgr.transitionToCancelled("reason", transaction, TransitionOption.OverrideTransitionValidityCheck);
transaction.execute();
date = CancelledDateColumn.getDate(teamArt);
@@ -56,7 +58,7 @@ public class CancelledDateColumnTest {
CancelledDateColumn.getInstance().getColumnText(teamArt, AssigneeColumn.getInstance(), 0));
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), CancelledDateColumnTest.class.getSimpleName());
- teamArt.transition(DefaultTeamState.Endorse.name(), UserManager.getUser(), transaction,
+ transitionMgr.transition(TeamState.Endorse, UserManager.getUser(), transaction,
TransitionOption.OverrideTransitionValidityCheck);
transaction.execute();
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CompletedDateColumnTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CompletedDateColumnTest.java
index 3aacee1a00e..f762a81e614 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CompletedDateColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/CompletedDateColumnTest.java
@@ -12,8 +12,9 @@ import org.eclipse.osee.ats.column.AssigneeColumn;
import org.eclipse.osee.ats.column.CompletedDateColumn;
import org.eclipse.osee.ats.test.util.DemoTestUtil;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
@@ -45,8 +46,9 @@ public class CompletedDateColumnTest {
Assert.assertNull(date);
Assert.assertEquals("", CompletedDateColumn.getDateStr(teamArt));
+ TransitionManager transitionMgr = new TransitionManager(teamArt);
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), CompletedDateColumnTest.class.getSimpleName());
- teamArt.transitionToCompleted("reason", transaction, TransitionOption.OverrideTransitionValidityCheck);
+ transitionMgr.transitionToCompleted("reason", transaction, TransitionOption.OverrideTransitionValidityCheck);
transaction.execute();
date = CompletedDateColumn.getDate(teamArt);
@@ -56,7 +58,7 @@ public class CompletedDateColumnTest {
CompletedDateColumn.getInstance().getColumnText(teamArt, AssigneeColumn.getInstance(), 0));
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), CompletedDateColumnTest.class.getSimpleName());
- teamArt.transition(DefaultTeamState.Endorse.name(), UserManager.getUser(), transaction,
+ transitionMgr.transition(TeamState.Endorse, UserManager.getUser(), transaction,
TransitionOption.OverrideTransitionValidityCheck);
transaction.execute();
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/DeadlineColumnTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/DeadlineColumnTest.java
index 4b1496f8e5f..66f457e018c 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/DeadlineColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/DeadlineColumnTest.java
@@ -40,7 +40,7 @@ public class DeadlineColumnTest {
Assert.assertNull(DeadlineColumn.getDate(teamArt));
- Date creationDate = teamArt.getLog().getCreationDate();
+ Date creationDate = teamArt.getCreatedDate();
Calendar calendar = DateUtil.getCalendar(creationDate);
calendar.add(Calendar.DAY_OF_MONTH, -1);
Date overdueDate = calendar.getTime();
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/EstimatedHoursColumnTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/EstimatedHoursColumnTest.java
index d2bde1be47d..4a8060da083 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/EstimatedHoursColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/EstimatedHoursColumnTest.java
@@ -5,6 +5,7 @@
*/
package org.eclipse.osee.ats.test.column;
+import java.util.Date;
import junit.framework.Assert;
import org.eclipse.osee.ats.artifact.ActionArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
@@ -15,6 +16,7 @@ import org.eclipse.osee.ats.column.EstimatedHoursColumn;
import org.eclipse.osee.ats.test.util.DemoTestUtil;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -41,9 +43,11 @@ public class EstimatedHoursColumnTest {
ActionArtifact actionArt = teamArt1.getParentActionArtifact();
TeamWorkFlowArtifact teamArt2 =
DemoTestUtil.addTeamWorkflow(actionArt, EstimatedHoursColumnTest.class.getSimpleName(), transaction);
- TaskArtifact taskArt1 = teamArt1.createNewTask(EstimatedHoursColumnTest.class.getSimpleName());
+ TaskArtifact taskArt1 =
+ teamArt1.createNewTask(EstimatedHoursColumnTest.class.getSimpleName(), new Date(), UserManager.getUser());
taskArt1.persist(transaction);
- TaskArtifact taskArt2 = teamArt1.createNewTask(EstimatedHoursColumnTest.class.getSimpleName());
+ TaskArtifact taskArt2 =
+ teamArt1.createNewTask(EstimatedHoursColumnTest.class.getSimpleName(), new Date(), UserManager.getUser());
taskArt2.persist(transaction);
PeerToPeerReviewArtifact peerArt =
ReviewManager.createNewPeerToPeerReview(teamArt1, getClass().getSimpleName(),
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/ParentStateAndIdColumnTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/ParentStateAndIdColumnTest.java
index bca127caed0..1498b83e9d9 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/ParentStateAndIdColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/ParentStateAndIdColumnTest.java
@@ -14,7 +14,7 @@ import org.eclipse.osee.ats.column.ParentIdColumn;
import org.eclipse.osee.ats.column.ParentStateColumn;
import org.eclipse.osee.ats.test.util.DemoTestUtil;
import org.eclipse.osee.ats.util.AtsRelationTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.support.test.util.DemoWorkType;
/**
@@ -36,7 +36,7 @@ public class ParentStateAndIdColumnTest {
PeerToPeerReviewArtifact peerArt =
(PeerToPeerReviewArtifact) codeArt.getRelatedArtifact(AtsRelationTypes.TeamWorkflowToReview_Review);
- Assert.assertEquals(DefaultTeamState.Implement.name(),
+ Assert.assertEquals(TeamState.Implement.getPageName(),
ParentStateColumn.getInstance().getColumnText(peerArt, AssigneeColumn.getInstance(), 0));
Assert.assertEquals(codeArt.getHumanReadableId(),
ParentIdColumn.getInstance().getColumnText(peerArt, AssigneeColumn.getInstance(), 0));
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/StateColumnTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/StateColumnTest.java
index b20aab0f3c5..4b15167d2a5 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/StateColumnTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/column/StateColumnTest.java
@@ -11,7 +11,7 @@ import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.column.AssigneeColumn;
import org.eclipse.osee.ats.column.StateColumn;
import org.eclipse.osee.ats.test.util.DemoTestUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.support.test.util.DemoWorkType;
/**
@@ -24,11 +24,11 @@ public class StateColumnTest {
public void testGetColumnText() throws Exception {
TeamWorkFlowArtifact reqArt =
(TeamWorkFlowArtifact) DemoTestUtil.getUncommittedActionWorkflow(DemoWorkType.Requirements);
- Assert.assertEquals(DefaultTeamState.Implement.name(),
+ Assert.assertEquals(TeamState.Implement.getPageName(),
StateColumn.getInstance().getColumnText(reqArt, AssigneeColumn.getInstance(), 0));
ActionArtifact actionArt = reqArt.getParentActionArtifact();
- Assert.assertEquals(DefaultTeamState.Implement.name(),
+ Assert.assertEquals(TeamState.Implement.getPageName(),
StateColumn.getInstance().getColumnText(actionArt, AssigneeColumn.getInstance(), 0));
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java
index d128b70ebc0..845608b36bd 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/config/AtsBranchConfigurationTest.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.test.config;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Date;
import java.util.logging.Level;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.osee.ats.artifact.ATSAttributes;
@@ -31,7 +32,7 @@ import org.eclipse.osee.ats.util.ActionManager;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.NamedIdentity;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
@@ -45,6 +46,7 @@ import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.OseeSystemArtifacts;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
@@ -154,7 +156,8 @@ public class AtsBranchConfigurationTest {
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Branch Configuration Test");
ActionArtifact actionArt =
ActionManager.createAction(null, AtsTestBranches.BranchViaVersions.getName() + " Req Changes", "description",
- ChangeType.Problem, "1", false, null, selectedActionableItems, transaction);
+ ChangeType.Problem, "1", false, null, selectedActionableItems, new Date(), UserManager.getUser(),
+ transaction);
actionArt.getTeamWorkFlowArtifacts().iterator().next().addRelation(
AtsRelationTypes.TeamWorkflowTargetedForVersion_Version, verArtToTarget);
actionArt.getTeamWorkFlowArtifacts().iterator().next().persist(transaction);
@@ -167,7 +170,7 @@ public class AtsBranchConfigurationTest {
OseeLog.log(AtsPlugin.class, Level.INFO, "Transitioning to Implement state");
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Branch Configuration Test");
- dtwm.transitionTo(DefaultTeamState.Implement, null, false, transaction);
+ dtwm.transitionTo(TeamState.Implement, null, false, transaction);
teamWf.persist(transaction);
transaction.execute();
@@ -252,7 +255,7 @@ public class AtsBranchConfigurationTest {
String actionTitle = AtsTestBranches.BranchViaTeamDef.getName() + " Req Changes";
ActionArtifact actionArt =
ActionManager.createAction(null, actionTitle, "description", ChangeType.Problem, "1", false, null,
- selectedActionableItems, transaction);
+ selectedActionableItems, new Date(), UserManager.getUser(), transaction);
transaction.execute();
final TeamWorkFlowArtifact teamWf = actionArt.getTeamWorkFlowArtifacts().iterator().next();
@@ -262,7 +265,7 @@ public class AtsBranchConfigurationTest {
OseeLog.log(AtsPlugin.class, Level.INFO, "Transitioning to Implement state");
transaction =
new SkynetTransaction(AtsUtil.getAtsBranch(), "Test branch via team definition: Transition to desired state");
- dtwm.transitionTo(DefaultTeamState.Implement, null, false, transaction);
+ dtwm.transitionTo(TeamState.Implement, null, false, transaction);
teamWf.persist(transaction);
transaction.execute();
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToTaskEditorTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToTaskEditorTest.java
index d6e1610d5fb..2c4fc400520 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToTaskEditorTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToTaskEditorTest.java
@@ -114,7 +114,8 @@ public class AtsNavigateItemsToTaskEditorTest {
AtsUtil.getAtsBranch());
Set<Artifact> selectedUsers = new HashSet<Artifact>();
TaskEditor editor = getSingleEditorOrFail();
- ((TaskSearchWorldSearchItem) editor.getTaskActionPage().getDynamicWidgetLayoutListener()).setIncludeCompletedCancelledCheckbox(selected);
+ ((TaskSearchWorldSearchItem) editor.getTaskActionPage().getDynamicWidgetLayoutListener()).setIncludeCompletedCheckbox(selected);
+ ((TaskSearchWorldSearchItem) editor.getTaskActionPage().getDynamicWidgetLayoutListener()).setIncludeCancelledCheckbox(selected);
if (selected) {
// select the group
selectedUsers.add(groupArt);
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java
index e5e0023af92..19a3e4c12ae 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/navigate/AtsNavigateItemsToWorldViewTest.java
@@ -200,7 +200,8 @@ public class AtsNavigateItemsToWorldViewTest {
NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, TaskArtifact.class, DemoTestUtil.getNumTasks());
NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, TeamWorkFlowArtifact.class, 18);
NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, PeerToPeerReviewArtifact.class, 7);
- NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, DecisionReviewArtifact.class, 7);
+ // Only 2 decision reviews should have been created by Joe, rest are Rule reviews created by OseeSystem user
+ NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, DecisionReviewArtifact.class, 2);
}
@org.junit.Test
@@ -216,7 +217,7 @@ public class AtsNavigateItemsToWorldViewTest {
Collection<Artifact> arts = editor.getLoadedArtifacts();
NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, TaskArtifact.class, DemoTestUtil.getNumTasks());
NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, TeamWorkFlowArtifact.class, 25);
- NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, PeerToPeerReviewArtifact.class, 7);
+ NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, PeerToPeerReviewArtifact.class, 8);
NavigateTestUtil.testExpectedVersusActual(item.getName(), arts, DecisionReviewArtifact.class, 8);
runGeneralXColTest(84, false);
}
@@ -400,7 +401,8 @@ public class AtsNavigateItemsToWorldViewTest {
private void runGeneralTeamWorkflowSearchOnCompletedCancelledTest(XNavigateItem item, boolean selected, int expectedNum) throws Exception {
WorldEditor editor = getSingleEditorOrFail();
- ((TeamWorkflowSearchWorkflowSearchItem) editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener()).includeCompletedCancelledCheckbox(selected);
+ ((TeamWorkflowSearchWorkflowSearchItem) editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener()).setIncludeCompletedCheckbox(selected);
+ ((TeamWorkflowSearchWorkflowSearchItem) editor.getWorldXWidgetActionPage().getDynamicWidgetLayoutListener()).setIncludeCancelledCheckbox(selected);
runGeneralTeamWorkflowSearchTest(item, expectedNum);
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsDeleteManagerTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsDeleteManagerTest.java
index 79721cefce5..90b31b152e9 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsDeleteManagerTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsDeleteManagerTest.java
@@ -14,6 +14,7 @@ import static org.eclipse.osee.framework.core.enums.DeletionFlag.EXCLUDE_DELETED
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
import org.eclipse.osee.ats.artifact.ActionArtifact;
@@ -25,12 +26,13 @@ import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsDeleteManager;
import org.eclipse.osee.ats.util.AtsDeleteManager.DeleteOption;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.Named;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.CountingMap;
+import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
@@ -194,9 +196,11 @@ public class AtsDeleteManagerTest {
}
private TeamWorkFlowArtifact createAction(TestNames testName, Collection<ActionableItemArtifact> actionableItems, SkynetTransaction transaction) throws OseeCoreException {
+ Date createdDate = new Date();
+ User createdBy = UserManager.getUser();
ActionArtifact actionArt =
ActionManager.createAction(null, testName.name(), "Description", ChangeType.Improvement, "2", false, null,
- actionableItems, transaction);
+ actionableItems, createdDate, createdBy, transaction);
TeamWorkFlowArtifact teamArt = null;
for (TeamWorkFlowArtifact team : actionArt.getTeamWorkFlowArtifacts()) {
@@ -205,12 +209,13 @@ public class AtsDeleteManagerTest {
}
}
- teamArt.createTasks(Arrays.asList(testName.name() + "Task 1", testName.name() + "Task 2"), null, transaction);
+ teamArt.createTasks(Arrays.asList(testName.name() + "Task 1", testName.name() + "Task 2"), null, createdDate,
+ createdBy, transaction);
DecisionReviewArtifact decRev =
ReviewManager.createNewDecisionReview(teamArt, ReviewBlockType.None, testName.name(),
- DefaultTeamState.Endorse.name(), "Description", ReviewManager.getDefaultDecisionReviewOptions(),
- Arrays.asList(UserManager.getUser()));
+ TeamState.Endorse.getPageName(), "Description", ReviewManager.getDefaultDecisionReviewOptions(),
+ Arrays.asList(UserManager.getUser()), createdDate, createdBy);
decRev.persist(transaction);
return teamArt;
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
index 051799053fc..19ce61ff32b 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsNotifyUsersTest.java
@@ -17,12 +17,13 @@ import java.util.Collections;
import java.util.List;
import junit.framework.Assert;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.util.AtsNotifyUsers;
import org.eclipse.osee.ats.util.AtsNotifyUsers.NotifyType;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.ats.util.SubscribeManager;
+import org.eclipse.osee.ats.util.TeamState;
+import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
@@ -71,7 +72,7 @@ public class AtsNotifyUsersTest {
atsNotifyUsers.setInTest(true);
TeamWorkFlowArtifact teamArt = DemoTestUtil.createSimpleAction(AtsNotifyUsersTest.class.getSimpleName(), null);
- teamArt.setOriginator(kay_ValidEmail);
+ teamArt.internalSetCreatedBy(kay_ValidEmail);
List<User> assignees =
Arrays.asList(inactiveSteve, alex_NoValidEmail, jason_ValidEmail, kay_ValidEmail, joeSmith_CurrentUser);
teamArt.getStateMgr().setAssignees(assignees);
@@ -88,11 +89,11 @@ public class AtsNotifyUsersTest {
event.getDescription());
notifyManager.clear();
- teamArt.setOriginator(inactiveSteve);
+ teamArt.internalSetCreatedBy(inactiveSteve);
teamArt.persist();
AtsNotifyUsers.getInstance().notify(teamArt, NotifyType.Originator);
Assert.assertEquals(0, notifyManager.getNotificationEvents().size());
- teamArt.setOriginator(kay_ValidEmail);
+ teamArt.internalSetCreatedBy(kay_ValidEmail);
teamArt.persist();
notifyManager.clear();
@@ -140,7 +141,7 @@ public class AtsNotifyUsersTest {
Assert.assertEquals(0, notifyManager.getNotificationEvents().size());
notifyManager.clear();
- teamArt.getStateMgr().initializeStateMachine(DefaultTeamState.Completed.name());
+ teamArt.getStateMgr().initializeStateMachine(TeamState.Completed);
AtsNotifyUsers.getInstance().notify(teamArt, NotifyType.Completed);
event = notifyManager.getNotificationEvents().get(0);
Assert.assertEquals(NotifyType.Completed.name(), event.getType());
@@ -148,18 +149,21 @@ public class AtsNotifyUsersTest {
Assert.assertEquals("[Demo Code Team Workflow] titled [AtsNotifyUsersTest] is Completed", event.getDescription());
notifyManager.clear();
- teamArt.setOriginator(inactiveSteve);
+ teamArt.internalSetCreatedBy(inactiveSteve);
teamArt.persist();
- teamArt.getStateMgr().initializeStateMachine(DefaultTeamState.Completed.name());
+ teamArt.getStateMgr().initializeStateMachine(TeamState.Completed);
AtsNotifyUsers.getInstance().notify(teamArt, NotifyType.Completed);
Assert.assertEquals(0, notifyManager.getNotificationEvents().size());
- teamArt.setOriginator(kay_ValidEmail);
+ teamArt.internalSetCreatedBy(kay_ValidEmail);
teamArt.persist();
notifyManager.clear();
- teamArt.getLog().addLog(LogType.StateCancelled, "Endorse", "this is the reason");
- teamArt.getStateMgr().initializeStateMachine(DefaultTeamState.Cancelled.name());
- AtsNotifyUsers.getInstance().notify(teamArt, NotifyType.Cancelled);
+ teamArt.getStateMgr().initializeStateMachine(TeamState.Endorse);
+ TransitionManager transMgr = new TransitionManager(teamArt);
+ transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), getClass().getSimpleName());
+ transMgr.transitionToCancelled("this is the reason", transaction,
+ TransitionOption.OverrideTransitionValidityCheck);
+ transaction.execute();
Assert.assertEquals(1, notifyManager.getNotificationEvents().size());
event = notifyManager.getNotificationEvents().get(0);
Assert.assertEquals(NotifyType.Cancelled.name(), event.getType());
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsPurgeTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsPurgeTest.java
index 8f4dfb42b8f..8f4666dfff4 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsPurgeTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsPurgeTest.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.test.util;
import static org.junit.Assert.assertFalse;
import java.util.Arrays;
+import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -23,6 +24,7 @@ import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.util.ActionManager;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsUtil;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.PurgeArtifacts;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
@@ -74,7 +76,7 @@ public class AtsPurgeTest {
org.eclipse.osee.framework.jdk.core.util.Collections.castAll(
ActionableItemArtifact.class,
ArtifactQuery.getArtifactListFromTypeAndName(AtsArtifactTypes.ActionableItem, "SAW Test",
- AtsUtil.getAtsBranch())), transaction);
+ AtsUtil.getAtsBranch())), new Date(), UserManager.getUser(), transaction);
actionArt.persist(transaction);
transaction.execute();
@@ -83,7 +85,8 @@ public class AtsPurgeTest {
for (int x = 0; x < 30; x++) {
TaskArtifact taskArt =
- actionArt.getTeamWorkFlowArtifacts().iterator().next().createNewTask(getClass().getSimpleName() + x);
+ actionArt.getTeamWorkFlowArtifacts().iterator().next().createNewTask(getClass().getSimpleName() + x,
+ new Date(), UserManager.getUser());
taskArt.persist();
artsToPurge.add(taskArt);
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java
index 81077e6fb37..bd1b879093b 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/AtsQueryPerformanceTests.java
@@ -49,8 +49,8 @@ public class AtsQueryPerformanceTests {
@org.junit.Test
public void testTeamWorldSearchItem() throws Exception {
TeamWorldSearchItem searchItem =
- new TeamWorldSearchItem("Show Open OSEE Actions", Arrays.asList("ATS", "Define", "OTE"), false, true, false,
- null, null, null, null);
+ new TeamWorldSearchItem("Show Open OSEE Actions", Arrays.asList("ATS", "Define", "OTE"), false, false, true,
+ false, null, null, null, null);
long startTime = System.currentTimeMillis();
Collection<Artifact> artifacts = searchItem.performSearch(SearchType.Search);
long elapsedTime = System.currentTimeMillis() - startTime;
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java
index cd58c345b04..6ca19276c3e 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/DemoTestUtil.java
@@ -14,6 +14,7 @@ import static org.eclipse.osee.framework.core.enums.DeletionFlag.EXCLUDE_DELETED
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -99,7 +100,7 @@ public class DemoTestUtil {
ActionArtifact actionArt =
ActionManager.createAction(null, title, "Description", ChangeType.Improvement, "2", false, null,
ActionableItemArtifact.getActionableItems(Arrays.asList(DemoActionableItems.SAW_Code.getName())),
- transaction);
+ new Date(), UserManager.getUser(), transaction);
TeamWorkFlowArtifact teamArt = null;
for (TeamWorkFlowArtifact team : actionArt.getTeamWorkFlowArtifacts()) {
@@ -116,7 +117,7 @@ public class DemoTestUtil {
Collection<TeamDefinitionArtifact> teamDefs = TeamDefinitionArtifact.getImpactedTeamDefs(actionableItems);
ActionManager.createTeamWorkflow(actionArt, teamDefs.iterator().next(), actionableItems,
- Arrays.asList(UserManager.getUser()), transaction);
+ Arrays.asList(UserManager.getUser()), transaction, new Date(), UserManager.getUser());
TeamWorkFlowArtifact teamArt = null;
for (TeamWorkFlowArtifact team : actionArt.getTeamWorkFlowArtifacts()) {
@@ -135,7 +136,8 @@ public class DemoTestUtil {
for (int x = 1; x < numTasks + 1; x++) {
names.add(title + " " + x);
}
- return teamArt.createTasks(names, Arrays.asList(UserManager.getUser()), transaction);
+ return teamArt.createTasks(names, Arrays.asList(UserManager.getUser()), new Date(), UserManager.getUser(),
+ transaction);
}
/**
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java
index 3b7dd09387d..8cee48aab07 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/util/SMATestUtil.java
@@ -15,7 +15,8 @@ import java.util.Collection;
import junit.framework.Assert;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.internal.workflow.SMAState;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
/**
* @author Donald G. Dunne
@@ -31,7 +32,7 @@ public class SMATestUtil {
for (AbstractWorkflowArtifact sma : smas) {
Assert.assertEquals("Current State wrong for " + sma.getHumanReadableId(),
sma.getStateMgr().getCurrentStateName(), stateName);
- if (sma.isCancelledOrCompleted()) {
+ if (sma.isCompletedOrCancelled()) {
Assert.assertEquals("ats.CurrentState wrong " + sma.getHumanReadableId(),
sma.getStateMgr().getCurrentStateName() + ";;;",
sma.getSoleAttributeValue(AtsAttributeTypes.CurrentState));
@@ -40,13 +41,21 @@ public class SMATestUtil {
totalPercent);
Assert.assertEquals("Hours Spent wrong for " + sma.getHumanReadableId(), sma.getWorldViewHoursSpentTotal(),
hoursSpent);
- for (String stateValue : sma.getAttributesToStringList(AtsAttributeTypes.CurrentState)) {
- if (stateValue.startsWith(DefaultTeamState.Completed.name())) {
- Assert.assertEquals("ats.State wrong " + sma.getHumanReadableId(), stateValue, "Completed;;;");
- } else if (stateValue.startsWith(DefaultTeamState.Cancelled.name())) {
- Assert.assertEquals("ats.State wrong " + sma.getHumanReadableId(), stateValue, "Cancelled;;;");
+
+ for (String stateValue : sma.getAttributesToStringList(AtsAttributeTypes.State)) {
+ SMAState smaState = new SMAState();
+ smaState.setFromXml(stateValue);
+ boolean isCompletedCancelledState = isCompletedCancelledState(sma, smaState.getName());
+ if (isCompletedCancelledState) {
+ Assert.assertTrue(
+ "completed/cancelled ats.State [" + stateValue + "] wrong " + sma.getHumanReadableId(),
+ stateValue.endsWith(";;;"));
}
}
}
}
+
+ public static boolean isCompletedCancelledState(AbstractWorkflowArtifact aba, String stateName) throws OseeCoreException {
+ return aba.getWorkFlowDefinition().getWorkPageDefinitionByName(stateName).isCompletedOrCancelledPage();
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java
index ab295f433bc..86d3f06e9fd 100644
--- a/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java
+++ b/plugins/org.eclipse.osee.ats.test/src/org/eclipse/osee/ats/test/workflow/SMAPromptChangeStatusTest.java
@@ -16,15 +16,16 @@ import static org.junit.Assert.assertTrue;
import java.util.Collection;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.TaskArtifact;
-import org.eclipse.osee.ats.artifact.TaskArtifact.TaskStates;
+import org.eclipse.osee.ats.artifact.TaskStates;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.editor.SMAPromptChangeStatus;
import org.eclipse.osee.ats.test.util.DemoTestUtil;
import org.eclipse.osee.ats.test.util.SMATestUtil;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
import org.eclipse.osee.ats.util.widgets.dialog.SimpleTaskResolutionOptionsRule;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
@@ -72,23 +73,23 @@ public class SMAPromptChangeStatusTest {
// Change two to 100, 1 hr split
SMAPromptChangeStatus.performChangeStatus(tasks, null, null, 1, 100, true, true);
- SMATestUtil.validateSMAs(tasks, TaskStates.Completed.name(), 100, 0.25);
+ SMATestUtil.validateSMAs(tasks, TaskStates.Completed.getPageName(), 100, 0.25);
// Change two to 100, 1 hr split
// hours should be added to inwork state; make sure completed state isn't statused
SMAPromptChangeStatus.performChangeStatus(tasks, null, null, 1, 100, true, true);
- SMATestUtil.validateSMAs(tasks, TaskStates.Completed.name(), 100, 0.50);
+ SMATestUtil.validateSMAs(tasks, TaskStates.Completed.getPageName(), 100, 0.50);
// Change two to 99, 1 hr split
// transitions to InWork and adds hours
// make sure hours not added to completed state
SMAPromptChangeStatus.performChangeStatus(tasks, null, null, 1, 99, true, true);
- SMATestUtil.validateSMAs(tasks, TaskStates.InWork.name(), 99, 0.75);
+ SMATestUtil.validateSMAs(tasks, TaskStates.InWork.getPageName(), 99, 0.75);
// Change two to 55, 0
// no transition, no hours spent
SMAPromptChangeStatus.performChangeStatus(tasks, null, null, 0, 55, true, true);
- SMATestUtil.validateSMAs(tasks, TaskStates.InWork.name(), 55, 0.75);
+ SMATestUtil.validateSMAs(tasks, TaskStates.InWork.getPageName(), 55, 0.75);
}
@@ -108,26 +109,26 @@ public class SMAPromptChangeStatusTest {
// Change two to 100, 1 hr split
SMAPromptChangeStatus.performChangeStatus(tasks, optionsRule.getOptions(),
SimpleTaskResolutionOptionsRule.States.Complete.name(), 1, 100, true, true);
- SMATestUtil.validateSMAs(tasks, TaskStates.Completed.name(), 100, 0.25);
+ SMATestUtil.validateSMAs(tasks, TaskStates.Completed.getPageName(), 100, 0.25);
// Change two to 100, 1 hr split
// hours should be added to inwork state; make sure completed state isn't statused
SMAPromptChangeStatus.performChangeStatus(tasks, optionsRule.getOptions(),
SimpleTaskResolutionOptionsRule.States.Complete.name(), 1, 100, true, true);
- SMATestUtil.validateSMAs(tasks, TaskStates.Completed.name(), 100, 0.50);
+ SMATestUtil.validateSMAs(tasks, TaskStates.Completed.getPageName(), 100, 0.50);
// Change two to 99, 1 hr split
// transitions to InWork and adds hours
// make sure hours not added to completed state
SMAPromptChangeStatus.performChangeStatus(tasks, optionsRule.getOptions(),
SimpleTaskResolutionOptionsRule.States.In_Work.name(), 1, 99, true, true);
- SMATestUtil.validateSMAs(tasks, TaskStates.InWork.name(), 99, 0.75);
+ SMATestUtil.validateSMAs(tasks, TaskStates.InWork.getPageName(), 99, 0.75);
// Change two to 55, 0
// no transition, no hours spent
SMAPromptChangeStatus.performChangeStatus(tasks, optionsRule.getOptions(),
SimpleTaskResolutionOptionsRule.States.In_Work.name(), 0, 55, true, true);
- SMATestUtil.validateSMAs(tasks, TaskStates.InWork.name(), 55, 0.75);
+ SMATestUtil.validateSMAs(tasks, TaskStates.InWork.getPageName(), 55, 0.75);
}
@org.junit.Test
@@ -142,7 +143,8 @@ public class SMAPromptChangeStatusTest {
// test that if one task is cancelled, can't change status
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Prompt Change Status Test");
- cancelTask.transition(TaskStates.Cancelled.name(), (User) null, transaction, TransitionOption.Persist);
+ TransitionManager transitionMgr = new TransitionManager(cancelTask);
+ transitionMgr.transition(TaskStates.Cancelled, (User) null, transaction, TransitionOption.Persist);
transaction.execute();
Result result = SMAPromptChangeStatus.isValidToChangeStatus(tasks);
assertTrue(result.isFalse());
@@ -162,7 +164,7 @@ public class SMAPromptChangeStatusTest {
// test that if task not in related-to state of workflows's current status, can't change status
transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Prompt Change Status Test");
- taskArt.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, DefaultTeamState.Analyze.name());
+ taskArt.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, TeamState.Analyze.getPageName());
transaction.execute();
Result result = SMAPromptChangeStatus.isValidToChangeStatus(tasks);
assertTrue(result.isFalse());
diff --git a/plugins/org.eclipse.osee.ats/images/transition.gif b/plugins/org.eclipse.osee.ats/images/transition.gif
new file mode 100644
index 00000000000..2451c5d363a
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/images/transition.gif
Binary files differ
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsImage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsImage.java
index f6c9c3752a7..15ffc560303 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsImage.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsImage.java
@@ -61,6 +61,7 @@ public enum AtsImage implements KeyedImage {
TASK_SELECTED("taskSelected.gif"),
TEAM_DEFINITION("team.gif"),
TEAM_WORKFLOW("workflow.gif"),
+ TRANSITION("transition.gif"),
VERSION_LOCKED("yellowV_8_8.gif"),
WORKFLOW_CONFIG("workflow.gif"),
TOOL("T.gif"),
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AtsLogHistoryAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AtsLogHistoryAction.java
new file mode 100644
index 00000000000..aa972ea011d
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AtsLogHistoryAction.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.logging.OseeLevel;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
+import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
+import org.eclipse.osee.framework.ui.swt.ImageManager;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AtsLogHistoryAction extends Action {
+
+ private final AbstractWorkflowArtifact sma;
+
+ public AtsLogHistoryAction(AbstractWorkflowArtifact sma) {
+ super("ATS Log History");
+ setToolTipText(getText());
+ this.sma = sma;
+ setToolTipText(getText());
+ }
+
+ @Override
+ public void run() {
+ try {
+ ResultsEditor.open("ATS Log History", String.format("ATS Log History for [%s]", sma.toStringWithId()),
+ sma.getLog().getHtml(true));
+
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+ }
+
+ @Override
+ public ImageDescriptor getImageDescriptor() {
+ return ImageManager.getImageDescriptor(FrameworkImage.EDIT);
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewDecisionReviewJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewDecisionReviewJob.java
index a2c0e8b404c..528fd750b03 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewDecisionReviewJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/NewDecisionReviewJob.java
@@ -12,13 +12,14 @@
package org.eclipse.osee.ats.actions;
import java.util.Collection;
+import java.util.Date;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.osee.ats.AtsOpenOption;
-import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
+import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsUtil;
@@ -36,8 +37,10 @@ public class NewDecisionReviewJob extends Job {
private final String options;
private final Collection<User> assignees;
private final String description;
+ private final Date createdDate;
+ private final User createdBy;
- public NewDecisionReviewJob(TeamWorkFlowArtifact teamParent, ReviewBlockType reviewBlockType, String reviewTitle, String againstState, String description, String options, Collection<User> assignees) {
+ public NewDecisionReviewJob(TeamWorkFlowArtifact teamParent, ReviewBlockType reviewBlockType, String reviewTitle, String againstState, String description, String options, Collection<User> assignees, Date createdDate, User createdBy) {
super("Creating New Decision Review");
this.teamParent = teamParent;
this.reviewTitle = reviewTitle;
@@ -46,6 +49,8 @@ public class NewDecisionReviewJob extends Job {
this.description = description;
this.options = options;
this.assignees = assignees;
+ this.createdDate = createdDate;
+ this.createdBy = createdBy;
}
@Override
@@ -53,7 +58,7 @@ public class NewDecisionReviewJob extends Job {
try {
DecisionReviewArtifact decArt =
ReviewManager.createNewDecisionReview(teamParent, reviewBlockType, reviewTitle, againstState, description,
- options, assignees);
+ options, assignees, createdDate, createdBy);
decArt.persist();
AtsUtil.openATSAction(decArt, AtsOpenOption.OpenOneOrPopupSelect);
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java
index c6459e9deaa..055d38f97ab 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionJob.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.ActionManager;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.skynet.notify.OseeNotificationManager;
import org.eclipse.osee.framework.ui.skynet.util.ChangeType;
@@ -66,7 +67,7 @@ public class NewActionJob extends Job {
}
actionArt =
ActionManager.createAction(monitor, title, desc, changeType, priority, validationRequired, needByDate,
- actionableItems, transaction);
+ actionableItems, new Date(), UserManager.getUser(), transaction);
if (wizard != null) {
wizard.notifyAtsWizardItemExtensions(actionArt, transaction);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java
index f22d5bb4040..bfa279e9095 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractTaskableArtifact.java
@@ -13,13 +13,12 @@ package org.eclipse.osee.ats.artifact;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
-import org.eclipse.osee.ats.artifact.TaskArtifact.TaskStates;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.config.AtsCacheManager;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
@@ -36,6 +35,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactFactory;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
/**
@@ -79,13 +79,13 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
}
public Collection<TaskArtifact> getTaskArtifactsFromCurrentState() throws OseeCoreException {
- return getTaskArtifacts(getStateMgr().getCurrentStateName());
+ return getTaskArtifacts(getStateMgr().getCurrentState());
}
- public Collection<TaskArtifact> getTaskArtifacts(String stateName) throws OseeCoreException {
+ public Collection<TaskArtifact> getTaskArtifacts(IWorkPage state) throws OseeCoreException {
List<TaskArtifact> arts = new ArrayList<TaskArtifact>();
for (TaskArtifact taskArt : getTaskArtifacts()) {
- if (taskArt.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "").equals(stateName)) {
+ if (taskArt.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "").equals(state.getPageName())) {
arts.add(taskArt);
}
}
@@ -96,22 +96,14 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
return getRelatedArtifactsCount(AtsRelationTypes.SmaToTask_Task) > 0;
}
- public TaskArtifact createNewTask(String title) throws OseeCoreException {
- return createNewTask(Arrays.asList(UserManager.getUser()), title);
+ public TaskArtifact createNewTask(String title, Date createdDate, User createdBy) throws OseeCoreException {
+ return createNewTask(Arrays.asList(UserManager.getUser()), title, createdDate, createdBy);
}
- public TaskArtifact createNewTask(User assignee, String title) throws OseeCoreException {
- return createNewTask(Arrays.asList(assignee), title);
- }
-
- public TaskArtifact createNewTask(Collection<User> assignees, String title) throws OseeCoreException {
+ public TaskArtifact createNewTask(Collection<User> assignees, String title, Date createdDate, User createdBy) throws OseeCoreException {
TaskArtifact taskArt = null;
taskArt = (TaskArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.Task, AtsUtil.getAtsBranch(), title);
- taskArt.getLog().addLog(LogType.Originated, "", "");
-
- // Initialize state machine
- taskArt.getStateMgr().initializeStateMachine(TaskStates.InWork.name(), assignees);
- taskArt.getLog().addLog(LogType.StateEntered, "InWork", "");
+ taskArt.initializeNewStateMachine(TaskStates.InWork, assignees, new Date(), UserManager.getUser());
// Set parent state task is related to
taskArt.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, getStateMgr().getCurrentStateName());
@@ -135,9 +127,9 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
return Result.TrueResult;
}
- public Result areTasksComplete(String stateName) {
+ public Result areTasksComplete(IWorkPage state) {
try {
- for (TaskArtifact taskArt : getTaskArtifacts(stateName)) {
+ for (TaskArtifact taskArt : getTaskArtifacts(state)) {
if (taskArt.isInWork()) {
return new Result(false, "Task " + taskArt.getGuid() + " Not Complete");
}
@@ -166,13 +158,13 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
/**
* Return Estimated Task Hours of "Related to State" stateName
*
- * @param relatedToStateName state name of parent workflow's state
+ * @param relatedToState state name of parent workflow's state
* @return Returns the Estimated Hours
*/
@Override
- public double getEstimatedHoursFromTasks(String relatedToStateName) throws OseeCoreException {
+ public double getEstimatedHoursFromTasks(IWorkPage relatedToState) throws OseeCoreException {
double hours = 0;
- for (TaskArtifact taskArt : getTaskArtifacts(relatedToStateName)) {
+ for (TaskArtifact taskArt : getTaskArtifacts(relatedToState)) {
hours += taskArt.getEstimatedHoursTotal();
}
return hours;
@@ -194,12 +186,12 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
/**
* Return Remain Task Hours of "Related to State" stateName
*
- * @param relatedToStateName state name of parent workflow's state
+ * @param relatedToState state name of parent workflow's state
* @return Returns the Remain Hours
*/
- public double getRemainHoursFromTasks(String relatedToStateName) throws OseeCoreException {
+ public double getRemainHoursFromTasks(IWorkPage relatedToState) throws OseeCoreException {
double hours = 0;
- for (TaskArtifact taskArt : getTaskArtifacts(relatedToStateName)) {
+ for (TaskArtifact taskArt : getTaskArtifacts(relatedToState)) {
hours += taskArt.getRemainHoursFromArtifact();
}
return hours;
@@ -220,12 +212,12 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
/**
* Return Hours Spent for Tasks of "Related to State" stateName
*
- * @param relatedToStateName state name of parent workflow's state
+ * @param relatedToState state name of parent workflow's state
* @return Returns the Hours Spent
*/
- public double getHoursSpentFromTasks(String relatedToStateName) throws OseeCoreException {
+ public double getHoursSpentFromTasks(IWorkPage relatedToState) throws OseeCoreException {
double spent = 0;
- for (TaskArtifact taskArt : getTaskArtifacts(relatedToStateName)) {
+ for (TaskArtifact taskArt : getTaskArtifacts(relatedToState)) {
spent += taskArt.getHoursSpentSMATotal();
}
return spent;
@@ -234,12 +226,12 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
/**
* Return Total Percent Complete / # Tasks for "Related to State" stateName
*
- * @param relatedToStateName state name of parent workflow's state
+ * @param relatedToState state name of parent workflow's state
* @return Returns the Percent Complete.
*/
- public int getPercentCompleteFromTasks(String relatedToStateName) throws OseeCoreException {
+ public int getPercentCompleteFromTasks(IWorkPage relatedToState) throws OseeCoreException {
int spent = 0;
- Collection<TaskArtifact> taskArts = getTaskArtifacts(relatedToStateName);
+ Collection<TaskArtifact> taskArts = getTaskArtifacts(relatedToState);
for (TaskArtifact taskArt : taskArts) {
spent += taskArt.getPercentCompleteSMATotal();
}
@@ -249,10 +241,10 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact
return spent / taskArts.size();
}
- public Collection<TaskArtifact> createTasks(List<String> titles, List<User> assignees, SkynetTransaction transaction) throws OseeCoreException {
+ public Collection<TaskArtifact> createTasks(List<String> titles, List<User> assignees, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
List<TaskArtifact> tasks = new ArrayList<TaskArtifact>();
for (String title : titles) {
- TaskArtifact taskArt = createNewTask(title);
+ TaskArtifact taskArt = createNewTask(title, createdDate, createdBy);
if (assignees != null && !assignees.isEmpty()) {
Set<User> users = new HashSet<User>(); // NOPMD by b0727536 on 9/29/10 8:51 AM
for (User art : assignees) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java
index 985afbe25bd..f4b26902f45 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AbstractWorkflowArtifact.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.ats.artifact;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
@@ -29,20 +28,18 @@ import org.eclipse.osee.ats.artifact.note.ArtifactNote;
import org.eclipse.osee.ats.artifact.note.AtsNote;
import org.eclipse.osee.ats.column.TargetedVersionColumn;
import org.eclipse.osee.ats.editor.SMAEditor;
-import org.eclipse.osee.ats.editor.stateItem.AtsStateItemManager;
-import org.eclipse.osee.ats.editor.stateItem.IAtsStateItem;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.notify.AtsNotification;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
-import org.eclipse.osee.ats.util.AtsNotifyUsers;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.SimpleTeamState;
import org.eclipse.osee.ats.util.StateManager;
-import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.ats.workflow.ATSXWidgetOptionResolver;
import org.eclipse.osee.ats.workflow.AtsWorkPage;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.ats.workflow.item.AtsStatePercentCompleteWeightRule;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.world.IWorldViewArtifact;
@@ -64,17 +61,20 @@ import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactFactory;
+import org.eclipse.osee.framework.skynet.core.artifact.Attribute;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
+import org.eclipse.osee.framework.skynet.core.relation.RelationManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.FrameworkArtifactImageProvider;
import org.eclipse.osee.framework.ui.skynet.group.IGroupExplorerProvider;
-import org.eclipse.osee.framework.ui.skynet.notify.OseeNotificationManager;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinitionFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkRuleDefinition;
import org.eclipse.swt.graphics.Image;
@@ -101,12 +101,6 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
}
@Override
- public void onBirth() throws OseeCoreException {
- super.onBirth();
- setSoleAttributeValue(AtsAttributeTypes.CurrentState, "");
- }
-
- @Override
public void onInitializationComplete() throws OseeCoreException {
super.onInitializationComplete();
initializeSMA();
@@ -125,6 +119,14 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
public void initalizePreSaveCache() {
try {
+ if (getSoleAttributeValue(AtsAttributeTypes.CurrentStateType, null) == null) {
+ if (getSoleAttributeValue(AtsAttributeTypes.CurrentState, null) == null) {
+ setSoleAttributeValue(AtsAttributeTypes.CurrentState, "");
+ }
+ if (isAttributeTypeValid(AtsAttributeTypes.CurrentStateType)) {
+ setSoleAttributeValue(AtsAttributeTypes.CurrentStateType, WorkPageType.Working.name());
+ }
+ }
stateMgr = new StateManager(this);
atsLog = new AtsLog(new ArtifactLog(this));
atsNote = new AtsNote(new ArtifactNote(this));
@@ -135,6 +137,19 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
}
}
+ public void initializeNewStateMachine(IWorkPage state, Collection<User> assignees, Date createdDate, User createdBy) throws OseeCoreException {
+ getStateMgr().initializeStateMachine(state, assignees);
+ setCreatedBy(createdBy, true, createdDate);
+ (new TransitionManager(this)).logStateStartedEvent(state, createdDate, createdBy);
+ }
+
+ public boolean isTargetedVersionable() throws OseeCoreException {
+ if (!isTeamWorkflow()) {
+ return false;
+ }
+ return ((TeamWorkFlowArtifact) this).getTeamDefinition().getTeamDefinitionHoldingVersions() != null && ((TeamWorkFlowArtifact) this).getTeamDefinition().getTeamDefinitionHoldingVersions().isTeamUsesVersions();
+ }
+
public String getHelpContext() {
return "atsWorkflowEditorWorkflowTab";
}
@@ -149,7 +164,6 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
}
@SuppressWarnings("unused")
- @Override
public double getWorldViewWeeklyBenefit() throws OseeCoreException {
return 0;
}
@@ -230,27 +244,23 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
super.atsDelete(deleteArts, allRelated);
}
- @Override
public String getType() {
return getArtifactTypeName();
}
- @SuppressWarnings("unused")
- @Override
- public String getWorldViewTitle() throws OseeCoreException {
- return getName();
+ public String getCurrentStateName() {
+ return getStateMgr().getCurrentStateName();
}
- @Override
- public String getState() {
- return getStateMgr().getCurrentStateName();
+ public boolean isInState(IWorkPage state) {
+ return getStateMgr().isInState(state);
}
public String implementersStr = null;
@Override
public String getAssigneeStr() throws OseeCoreException {
- if (isCancelledOrCompleted()) {
+ if (isCompletedOrCancelled()) {
if (implementersStr == null && !getImplementers().isEmpty()) {
implementersStr = "(" + Artifacts.toString("; ", getImplementers()) + ")";
}
@@ -259,12 +269,6 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
return Artifacts.toString("; ", getStateMgr().getAssignees());
}
- @SuppressWarnings("unused")
- @Override
- public String getWorldViewID() throws OseeCoreException {
- return getHumanReadableId();
- }
-
public double getEstimatedHoursFromArtifact() throws OseeCoreException {
if (isAttributeTypeValid(AtsAttributeTypes.EstimatedHours)) {
return getSoleAttributeValue(AtsAttributeTypes.EstimatedHours, 0.0);
@@ -272,7 +276,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
return 0;
}
- public double getEstimatedHoursFromTasks(String relatedToState) throws OseeCoreException {
+ public double getEstimatedHoursFromTasks(IWorkPage relatedToState) throws OseeCoreException {
if (!(this instanceof AbstractTaskableArtifact)) {
return 0;
}
@@ -293,14 +297,14 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
return 0;
}
- public double getEstimatedHoursFromReviews(String relatedToState) throws OseeCoreException {
+ public double getEstimatedHoursFromReviews(IWorkPage relatedToState) throws OseeCoreException {
if (isTeamWorkflow()) {
return ReviewManager.getEstimatedHours((TeamWorkFlowArtifact) this, relatedToState);
}
return 0;
}
- public double getEstimatedHoursTotal(String relatedToState) throws OseeCoreException {
+ public double getEstimatedHoursTotal(IWorkPage relatedToState) throws OseeCoreException {
return getEstimatedHoursFromArtifact() + getEstimatedHoursFromTasks(relatedToState) + getEstimatedHoursFromReviews(relatedToState);
}
@@ -343,7 +347,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
}
public int getWorldViewStatePercentComplete() throws OseeCoreException {
- return getPercentCompleteSMAStateTotal(getStateMgr().getCurrentStateName());
+ return getPercentCompleteSMAStateTotal(getStateMgr().getCurrentState());
}
/**
@@ -357,8 +361,19 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
getSmaArtifactsOneLevel(this, artifacts);
for (Artifact artifact : artifacts) {
if (artifact.isDirty()) {
- return new Result(true, String.format("Artifact [%s][%s] is dirty", artifact.getHumanReadableId(),
- artifact));
+ String rString = null;
+ for (Attribute<?> attribute : artifact.internalGetAttributes()) {
+ if (attribute.isDirty()) {
+ rString = "Attribute: " + attribute.getNameValueDescription();
+ break;
+ }
+ }
+
+ if (rString == null) {
+ rString = RelationManager.reportHasDirtyLinks(artifact);
+ }
+ return new Result(true, String.format("Artifact [%s][%s] is dirty\n\n%s", artifact.getHumanReadableId(),
+ artifact, rString));
}
}
} catch (Exception ex) {
@@ -440,26 +455,26 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
/**
* Return hours spent working ONLY the SMA stateName (not children SMAs)
*/
- public double getHoursSpentSMAState(String stateName) throws OseeCoreException {
- return getStateMgr().getHoursSpent(stateName);
+ public double getHoursSpentSMAState(IWorkPage state) throws OseeCoreException {
+ return getStateMgr().getHoursSpent(state);
}
/**
* Return hours spent working ONLY on tasks related to stateName
*/
- public double getHoursSpentSMAStateTasks(String stateName) throws OseeCoreException {
+ public double getHoursSpentSMAStateTasks(IWorkPage state) throws OseeCoreException {
if (!(this instanceof AbstractTaskableArtifact)) {
return 0;
}
- return ((AbstractTaskableArtifact) this).getHoursSpentFromTasks(stateName);
+ return ((AbstractTaskableArtifact) this).getHoursSpentFromTasks(state);
}
/**
* Return hours spent working ONLY on reviews related to stateName
*/
- public double getHoursSpentSMAStateReviews(String stateName) throws OseeCoreException {
+ public double getHoursSpentSMAStateReviews(IWorkPage state) throws OseeCoreException {
if (isTeamWorkflow()) {
- return ReviewManager.getHoursSpent((TeamWorkFlowArtifact) this, stateName);
+ return ReviewManager.getHoursSpent((TeamWorkFlowArtifact) this, state);
}
return 0;
}
@@ -467,13 +482,13 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
/**
* Return hours spent working on all things (including children SMAs) related to stateName
*/
- public double getHoursSpentSMAStateTotal(String stateName) throws OseeCoreException {
- return getHoursSpentSMAState(stateName) + getHoursSpentSMAStateTasks(stateName) + getHoursSpentSMAStateReviews(stateName);
+ public double getHoursSpentSMAStateTotal(IWorkPage state) throws OseeCoreException {
+ return getHoursSpentSMAState(state) + getHoursSpentSMAStateTasks(state) + getHoursSpentSMAStateReviews(state);
}
@Override
public double getWorldViewHoursSpentStateTotal() throws OseeCoreException {
- return getHoursSpentSMAStateTotal(getStateMgr().getCurrentStateName());
+ return getHoursSpentSMAStateTotal(getStateMgr().getCurrentState());
}
/**
@@ -482,7 +497,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
public double getHoursSpentSMATotal() throws OseeCoreException {
double hours = 0.0;
for (String stateName : getStateMgr().getVisitedStateNames()) {
- hours += getHoursSpentSMAStateTotal(stateName);
+ hours += getHoursSpentSMAStateTotal(new SimpleTeamState(stateName, WorkPageType.Working));
}
return hours;
}
@@ -490,26 +505,26 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
/**
* Return Percent Complete working ONLY the SMA stateName (not children SMAs)
*/
- public int getPercentCompleteSMAState(String stateName) throws OseeCoreException {
- return getStateMgr().getPercentComplete(stateName);
+ public int getPercentCompleteSMAState(IWorkPage state) throws OseeCoreException {
+ return getStateMgr().getPercentComplete(state);
}
/**
* Return Percent Complete ONLY on tasks related to stateName. Total Percent / # Tasks
*/
- public int getPercentCompleteSMAStateTasks(String stateName) throws OseeCoreException {
+ public int getPercentCompleteSMAStateTasks(IWorkPage state) throws OseeCoreException {
if (!(this instanceof AbstractTaskableArtifact)) {
return 0;
}
- return ((AbstractTaskableArtifact) this).getPercentCompleteFromTasks(stateName);
+ return ((AbstractTaskableArtifact) this).getPercentCompleteFromTasks(state);
}
/**
* Return Percent Complete ONLY on reviews related to stateName. Total Percent / # Reviews
*/
- public int getPercentCompleteSMAStateReviews(String stateName) throws OseeCoreException {
+ public int getPercentCompleteSMAStateReviews(IWorkPage state) throws OseeCoreException {
if (isTeamWorkflow()) {
- return ReviewManager.getPercentComplete((TeamWorkFlowArtifact) this, stateName);
+ return ReviewManager.getPercentComplete((TeamWorkFlowArtifact) this, state);
}
return 0;
}
@@ -518,8 +533,8 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
* Return Percent Complete on all things (including children SMAs) related to stateName. Total Percent for state,
* tasks and reviews / 1 + # Tasks + # Reviews
*/
- public int getPercentCompleteSMAStateTotal(String stateName) throws OseeCoreException {
- return getStateMetricsData(stateName).getResultingPercent();
+ public int getPercentCompleteSMAStateTotal(IWorkPage state) throws OseeCoreException {
+ return getStateMetricsData(state).getResultingPercent();
}
/**
@@ -528,29 +543,29 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
* percent = all state's percents / number of states (minus completed/cancelled)
*/
public int getPercentCompleteSMATotal() throws OseeCoreException {
- if (isCancelledOrCompleted()) {
+ if (isCompletedOrCancelled()) {
return 100;
}
Map<String, Double> stateToWeightMap = getStatePercentCompleteWeight();
if (!stateToWeightMap.isEmpty()) {
// Calculate total percent using configured weighting
int percent = 0;
- for (String stateName : getWorkFlowDefinition().getPageNames()) {
- if (!stateName.equals(DefaultTeamState.Completed.name()) && !stateName.equals(DefaultTeamState.Cancelled.name())) {
- Double weight = stateToWeightMap.get(stateName);
+ for (WorkPageDefinition workPage : getWorkFlowDefinition().getPages()) {
+ if (!workPage.isCompletedPage() && !workPage.isCancelledPage()) {
+ Double weight = stateToWeightMap.get(workPage);
if (weight == null) {
weight = 0.0;
}
- percent += weight * getPercentCompleteSMAStateTotal(stateName);
+ percent += weight * getPercentCompleteSMAStateTotal(workPage);
}
}
return percent;
} else {
int percent = 0;
int numStates = 0;
- for (String stateName : getWorkFlowDefinition().getPageNames()) {
- if (!stateName.equals(DefaultTeamState.Completed.name()) && !stateName.equals(DefaultTeamState.Cancelled.name())) {
- percent += getPercentCompleteSMAStateTotal(stateName);
+ for (WorkPageDefinition workPage : getWorkFlowDefinition().getPages()) {
+ if (!workPage.isCompletedPage() && !workPage.isCancelledPage()) {
+ percent += getPercentCompleteSMAStateTotal(workPage);
numStates++;
}
}
@@ -582,14 +597,14 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
return stateToWeight;
}
- private StateMetricsData getStateMetricsData(String stateName) throws OseeCoreException {
+ private StateMetricsData getStateMetricsData(IWorkPage teamState) throws OseeCoreException {
// Add percent and bump objects 1 for state percent
- int percent = getPercentCompleteSMAState(stateName);
+ int percent = getPercentCompleteSMAState(teamState);
int numObjects = 1; // the state itself is one object
// Add percent for each task and bump objects for each task
if (this instanceof AbstractTaskableArtifact) {
- Collection<TaskArtifact> tasks = ((AbstractTaskableArtifact) this).getTaskArtifacts(stateName);
+ Collection<TaskArtifact> tasks = ((AbstractTaskableArtifact) this).getTaskArtifacts(teamState);
for (TaskArtifact taskArt : tasks) {
percent += taskArt.getPercentCompleteSMATotal();
}
@@ -598,7 +613,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
// Add percent for each review and bump objects for each review
if (isTeamWorkflow()) {
- Collection<AbstractReviewArtifact> reviews = ReviewManager.getReviews((TeamWorkFlowArtifact) this, stateName);
+ Collection<AbstractReviewArtifact> reviews = ReviewManager.getReviews((TeamWorkFlowArtifact) this, teamState);
for (AbstractReviewArtifact reviewArt : reviews) {
percent += reviewArt.getPercentCompleteSMATotal();
}
@@ -629,17 +644,17 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
@Override
public double getWorldViewHoursSpentState() throws OseeCoreException {
- return getHoursSpentSMAState(getStateMgr().getCurrentStateName());
+ return getHoursSpentSMAState(getStateMgr().getCurrentState());
}
@Override
public double getWorldViewHoursSpentStateReview() throws OseeCoreException {
- return getHoursSpentSMAStateReviews(getStateMgr().getCurrentStateName());
+ return getHoursSpentSMAStateReviews(getStateMgr().getCurrentState());
}
@Override
public double getWorldViewHoursSpentStateTask() throws OseeCoreException {
- return getHoursSpentSMAStateTasks(getStateMgr().getCurrentStateName());
+ return getHoursSpentSMAStateTasks(getStateMgr().getCurrentState());
}
@Override
@@ -649,17 +664,17 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
@Override
public int getWorldViewPercentCompleteState() throws OseeCoreException {
- return getPercentCompleteSMAState(getStateMgr().getCurrentStateName());
+ return getPercentCompleteSMAState(getStateMgr().getCurrentState());
}
@Override
public int getWorldViewPercentCompleteStateReview() throws OseeCoreException {
- return getPercentCompleteSMAStateReviews(getStateMgr().getCurrentStateName());
+ return getPercentCompleteSMAStateReviews(getStateMgr().getCurrentState());
}
@Override
public int getWorldViewPercentCompleteStateTask() throws OseeCoreException {
- return getPercentCompleteSMAStateTasks(getStateMgr().getCurrentStateName());
+ return getPercentCompleteSMAStateTasks(getStateMgr().getCurrentState());
}
@Override
@@ -736,18 +751,6 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
return AccessControlManager.hasPermission(this, PermissionEnum.WRITE);
}
- public User getOriginator() throws OseeCoreException {
- return atsLog.getOriginator();
- }
-
- public String getOriginatorStr() throws OseeCoreException {
- return getOriginator().getName();
- }
-
- public void setOriginator(User user) throws OseeCoreException {
- atsLog.addLog(LogType.Originated, "", "Changed by " + UserManager.getUser().getName(), user);
- }
-
/**
* @return true if this is a TeamWorkflow and it uses versions
*/
@@ -849,216 +852,212 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
return TargetedVersionColumn.getTargetedVersionStr(this);
}
- public boolean isCompleted() {
- return stateMgr.getCurrentStateName().equals(DefaultTeamState.Completed.name());
- }
-
- public Date getCompletedDate() throws OseeCoreException {
- LogItem item = getLog().getCompletedLogItem();
- if (item != null) {
- return item.getDate();
+ public boolean isCompleted() throws OseeCoreException {
+ if (isAttributeTypeValid(AtsAttributeTypes.CurrentStateType)) {
+ return getSoleAttributeValue(AtsAttributeTypes.CurrentStateType, "").equals(WorkPageType.Completed.name());
+ } else {
+ return getCurrentStateName().equals(TeamState.Completed.getPageName());
}
- return null;
}
- public Date getCancelledDate() throws OseeCoreException {
- LogItem item = getLog().getCancelledLogItem();
- if (item != null) {
- return item.getDate();
+ public void setCreatedBy(User user, boolean logChange, Date date) throws OseeCoreException {
+ if (logChange) {
+ if (getSoleAttributeValue(AtsAttributeTypes.CreatedBy, null) == null) {
+ atsLog.addLog(LogType.Originated, "", "", date, user);
+ } else {
+ atsLog.addLog(LogType.Originated, "", "Changed by " + UserManager.getUser().getName(), date, user);
+ atsLog.internalResetOriginator(UserManager.getUser());
+ }
+ }
+ if (isAttributeTypeValid(AtsAttributeTypes.CreatedBy)) {
+ setSoleAttributeValue(AtsAttributeTypes.CreatedBy, UserManager.getUser().getUserId());
}
- return null;
- }
-
- public boolean isCancelled() {
- return stateMgr.getCurrentStateName().equals(DefaultTeamState.Cancelled.name());
}
- public boolean isCancelledOrCompleted() {
- return isCompleted() || isCancelled();
+ public void internalSetCreatedBy(User user) throws OseeCoreException {
+ atsLog.internalResetOriginator(user);
+ if (isAttributeTypeValid(AtsAttributeTypes.CreatedBy)) {
+ setSoleAttributeValue(AtsAttributeTypes.CreatedBy, user.getUserId());
+ }
}
- public boolean isCurrentState(String stateName) {
- return stateName.equals(stateMgr.getCurrentStateName());
+ public void internalSetCreatedDate(Date date) throws OseeCoreException {
+ atsLog.internalResetCreatedDate(date);
+ if (isAttributeTypeValid(AtsAttributeTypes.CreatedDate)) {
+ setSoleAttributeValue(AtsAttributeTypes.CreatedDate, date);
+ }
}
- public void setTransitionAssignees(Collection<User> assignees) throws OseeCoreException {
- if (assignees.contains(UserManager.getUser(SystemUser.OseeSystem)) || assignees.contains(UserManager.getUser(SystemUser.Guest))) {
- throw new OseeArgumentException("Can not assign workflow to OseeSystem or Guest");
+ public Date getCreatedDate() throws OseeCoreException {
+ Date date = getSoleAttributeValue(AtsAttributeTypes.CreatedDate, null);
+ if (date == null) {
+ // Keep this for backward compatibility
+ return getLog().internalGetCreationDate();
}
- if (assignees.size() > 1 && assignees.contains(UserManager.getUser(SystemUser.UnAssigned))) {
- throw new OseeArgumentException("Can not assign to user and UnAssigned");
- }
- transitionAssignees = assignees;
+ return date;
}
- public boolean isAssigneeMe() throws OseeCoreException {
- return stateMgr.getAssignees().contains(UserManager.getUser());
+ public User getCreatedBy() throws OseeCoreException {
+ String userId = getSoleAttributeValue(AtsAttributeTypes.CreatedBy, null);
+ if (!Strings.isValid(userId)) {
+ return getLog().internalGetOriginator();
+ } else {
+ return UserManager.getUserByUserId(userId);
+ }
}
- public Collection<User> getTransitionAssignees() throws OseeCoreException {
- if (transitionAssignees != null) {
- if (!transitionAssignees.isEmpty() && transitionAssignees.contains(UserManager.getUser(SystemUser.UnAssigned))) {
- transitionAssignees.remove(UserManager.getUser(SystemUser.UnAssigned));
- }
- if (!transitionAssignees.isEmpty()) {
- return transitionAssignees;
+ public Date internalGetCancelledDate() throws OseeCoreException {
+ Date date = getSoleAttributeValue(AtsAttributeTypes.CancelledDate, null);
+ if (date == null) {
+ // Keep this for backward compatibility
+ LogItem item = getLog().internalGetCancelledLogItem();
+ if (item != null) {
+ return item.getDate();
}
+ return null;
}
- return stateMgr.getAssignees();
+ return date;
}
- public String getTransitionAssigneesStr() throws OseeCoreException {
- return Artifacts.toTextList(getTransitionAssignees(), ";");
- }
-
- public Result transitionToCancelled(String reason, SkynetTransaction transaction, TransitionOption... transitionOption) {
- Result result =
- transition(DefaultTeamState.Cancelled.name(), Arrays.asList(new User[] {}), reason, transaction,
- transitionOption);
- return result;
- }
-
- public Result transitionToCompleted(String reason, SkynetTransaction transaction, TransitionOption... transitionOption) {
- Result result =
- transition(DefaultTeamState.Completed.name(), Arrays.asList(new User[] {}), reason, transaction,
- transitionOption);
- return result;
- }
-
- public Result isTransitionValid(final String toStateName, final Collection<User> toAssignees, TransitionOption... transitionOption) throws OseeCoreException {
- boolean overrideTransitionCheck =
- org.eclipse.osee.framework.jdk.core.util.Collections.getAggregate(transitionOption).contains(
- TransitionOption.OverrideTransitionValidityCheck);
- boolean overrideAssigneeCheck =
- org.eclipse.osee.framework.jdk.core.util.Collections.getAggregate(transitionOption).contains(
- TransitionOption.OverrideAssigneeCheck);
- // Validate assignees
- if (!overrideAssigneeCheck && (getStateMgr().getAssignees().contains(UserManager.getUser(SystemUser.OseeSystem)) || getStateMgr().getAssignees().contains(
- UserManager.getUser(SystemUser.Guest)) || getStateMgr().getAssignees().contains(
- UserManager.getUser(SystemUser.UnAssigned)))) {
- return new Result("Can not transition with \"Guest\", \"UnAssigned\" or \"OseeSystem\" user as assignee.");
+ public User internalGetCancelledBy() throws OseeCoreException {
+ String userId = getSoleAttributeValue(AtsAttributeTypes.CancelledBy, null);
+ if (!Strings.isValid(userId)) {
+ // Keep this for backward compatibility
+ LogItem item = getLog().internalGetCancelledLogItem();
+ if (item != null) {
+ return item.getUser();
+ }
+ return null;
+ } else {
+ return UserManager.getUserByUserId(userId);
}
+ }
- // Validate toState name
- final WorkPageDefinition fromWorkPageDefinition = getWorkPageDefinition();
- final WorkPageDefinition toWorkPageDefinition = getWorkPageDefinitionByName(toStateName);
- if (toWorkPageDefinition == null) {
- return new Result("Invalid toState \"" + toStateName + "\"");
+ public String getCancelledReason() throws OseeCoreException {
+ String reason = getSoleAttributeValue(AtsAttributeTypes.CancelledReason, null);
+ if (!Strings.isValid(reason)) {
+ // Keep this for backward compatibility
+ LogItem item = getLog().internalGetCancelledLogItem();
+ if (item != null) {
+ return item.getMsg();
+ }
+ return null;
}
+ return reason;
+ }
- // Validate transition from fromPage to toPage
- if (!overrideTransitionCheck && !getWorkFlowDefinition().getToPages(fromWorkPageDefinition).contains(
- toWorkPageDefinition)) {
- String errStr =
- "Not configured to transition to \"" + toStateName + "\" from \"" + fromWorkPageDefinition.getPageName() + "\"";
- OseeLog.log(AtsPlugin.class, Level.SEVERE, errStr);
- return new Result(errStr);
- }
- // Don't transition with existing working branch
- if (toStateName.equals(DefaultTeamState.Cancelled.name()) && isTeamWorkflow() && ((TeamWorkFlowArtifact) this).getBranchMgr().isWorkingBranchInWork()) {
- return new Result("Working Branch exists. Please delete working branch before cancelling.");
+ public void setCancellationReason(String reason) throws OseeCoreException {
+ // Keep this for backward compatibility
+ getLog().internalSetCancellationReason(reason);
+ if (isAttributeTypeValid(AtsAttributeTypes.CancelledReason)) {
+ setSoleAttributeValue(AtsAttributeTypes.CancelledReason, reason);
}
+ }
- // Don't transition with uncommitted branch if this is a commit state
- if (AtsWorkDefinitions.isAllowCommitBranch(getWorkPageDefinition()) && isTeamWorkflow() && ((TeamWorkFlowArtifact) this).getBranchMgr().isWorkingBranchInWork()) {
- return new Result("Working Branch exists. Please commit or delete working branch before transition.");
+ public String getCancelledFromState() throws OseeCoreException {
+ String fromState = getSoleAttributeValue(AtsAttributeTypes.CancelledFromState, null);
+ if (!Strings.isValid(fromState)) {
+ // Keep this for backward compatibility
+ return getLog().internalGetCancelledFromState();
}
+ return fromState;
+ }
- // Check extension points for valid transition
- List<IAtsStateItem> atsStateItems = AtsStateItemManager.getStateItems(fromWorkPageDefinition.getId());
- for (IAtsStateItem item : atsStateItems) {
- Result result = item.transitioning(this, fromWorkPageDefinition.getPageName(), toStateName, toAssignees);
- if (result.isFalse()) {
- return result;
- }
- }
- for (IAtsStateItem item : atsStateItems) {
- Result result = item.transitioning(this, fromWorkPageDefinition.getPageName(), toStateName, toAssignees);
- if (result.isFalse()) {
- return result;
+ public Date getCompletedDate() throws OseeCoreException {
+ Date date = getSoleAttributeValue(AtsAttributeTypes.CompletedDate, null);
+ if (date == null) {
+ // Keep this for backward compatibility
+ LogItem item = getLog().internalGetCompletedLogItem();
+ if (item != null) {
+ return item.getDate();
}
+ return null;
}
- return Result.TrueResult;
+ return date;
}
- public Result transition(String toStateName, User toAssignee, SkynetTransaction transaction, TransitionOption... transitionOption) {
- List<User> users = new ArrayList<User>();
- if (toAssignee != null && !toStateName.equals(DefaultTeamState.Completed.name()) && !toStateName.equals(DefaultTeamState.Cancelled.name())) {
- users.add(toAssignee);
+ public User getCompletedBy() throws OseeCoreException {
+ String userId = getSoleAttributeValue(AtsAttributeTypes.CompletedBy, null);
+ if (!Strings.isValid(userId)) {
+ // Keep this for backward compatibility
+ LogItem item = getLog().internalGetCompletedLogItem();
+ if (item != null) {
+ return item.getUser();
+ }
+ return null;
+ } else {
+ return UserManager.getUserByUserId(userId);
}
- return transition(toStateName, users, transaction, transitionOption);
}
- public boolean isTargetedVersionable() throws OseeCoreException {
- if (!isTeamWorkflow()) {
- return false;
- }
- return ((TeamWorkFlowArtifact) this).getTeamDefinition().getTeamDefinitionHoldingVersions() != null && ((TeamWorkFlowArtifact) this).getTeamDefinition().getTeamDefinitionHoldingVersions().isTeamUsesVersions();
+ public LogItem getStateCompletedData(IWorkPage state) throws OseeCoreException {
+ return getLog().getStateEvent(LogType.StateComplete, state.getPageName());
}
- public Result transition(String toStateName, Collection<User> toAssignees, SkynetTransaction transaction, TransitionOption... transitionOption) {
- return transition(toStateName, toAssignees, (String) null, transaction, transitionOption);
+ public LogItem getStateStartedData(IWorkPage state) throws OseeCoreException {
+ return getLog().getStateEvent(LogType.StateEntered, state.getPageName());
}
- private Result transition(final String toStateName, final Collection<User> toAssignees, final String completeOrCancelReason, SkynetTransaction transaction, TransitionOption... transitionOption) {
- try {
- final boolean persist =
- org.eclipse.osee.framework.jdk.core.util.Collections.getAggregate(transitionOption).contains(
- TransitionOption.Persist);
-
- Result result = isTransitionValid(toStateName, toAssignees, transitionOption);
- if (result.isFalse()) {
- return result;
- }
-
- final WorkPageDefinition fromWorkPageDefinition = getWorkPageDefinition();
- final WorkPageDefinition toWorkPageDefinition = getWorkPageDefinitionByName(toStateName);
-
- transitionHelper(toAssignees, persist, fromWorkPageDefinition, toWorkPageDefinition, toStateName,
- completeOrCancelReason, transaction);
- if (persist) {
- OseeNotificationManager.getInstance().sendNotifications();
- }
- } catch (Exception ex) {
- OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
- return new Result("Transaction failed " + ex.getLocalizedMessage());
+ public String getCompletedFromState() throws OseeCoreException {
+ String fromState = getSoleAttributeValue(AtsAttributeTypes.CompletedFromState, null);
+ if (!Strings.isValid(fromState)) {
+ return getLog().internalGetCompletedFromState();
}
- return Result.TrueResult;
+ return fromState;
}
- private void transitionHelper(Collection<User> toAssignees, boolean persist, WorkPageDefinition fromPage, WorkPageDefinition toPage, String toStateName, String completeOrCancelReason, SkynetTransaction transaction) throws OseeCoreException {
- // Log transition
- if (toPage.isCancelledPage()) {
- atsLog.addLog(LogType.StateCancelled, stateMgr.getCurrentStateName(), completeOrCancelReason);
+ public boolean isInWork() throws OseeCoreException {
+ // Backward compatibility; remove this once 0.9.7 released
+ if (isAttributeTypeValid(AtsAttributeTypes.CurrentStateType)) {
+ return getSoleAttributeValue(AtsAttributeTypes.CurrentStateType, "").equals(WorkPageType.Working.name());
} else {
- atsLog.addLog(LogType.StateComplete, stateMgr.getCurrentStateName(),
- (completeOrCancelReason == null ? "" : completeOrCancelReason));
+ return !isCompletedOrCancelled();
}
- atsLog.addLog(LogType.StateEntered, toStateName, "");
- stateMgr.transitionHelper(toAssignees, persist, fromPage, toPage, toStateName, completeOrCancelReason);
+ }
- if (isValidationRequired() && isTeamWorkflow()) {
- ReviewManager.createValidateReview((TeamWorkFlowArtifact) this, false, transaction);
+ public boolean isCancelled() throws OseeCoreException {
+ // Backward compatibility; remove this once 0.9.7 released
+ if (isAttributeTypeValid(AtsAttributeTypes.CurrentStateType)) {
+ return getSoleAttributeValue(AtsAttributeTypes.CurrentStateType, "").equals(WorkPageType.Cancelled.name());
+ } else {
+ return getCurrentStateName().equals(TeamState.Cancelled.getPageName());
}
- AtsNotifyUsers.getInstance().notify(this, AtsNotifyUsers.NotifyType.Subscribed,
- AtsNotifyUsers.NotifyType.Completed, AtsNotifyUsers.NotifyType.Completed);
+ }
+
+ public boolean isCompletedOrCancelled() throws OseeCoreException {
+ return isCompleted() || isCancelled();
+ }
- // Persist
- if (persist) {
- persist(transaction);
+ public void setTransitionAssignees(Collection<User> assignees) throws OseeCoreException {
+ if (assignees.contains(UserManager.getUser(SystemUser.OseeSystem)) || assignees.contains(UserManager.getUser(SystemUser.Guest))) {
+ throw new OseeArgumentException("Can not assign workflow to OseeSystem or Guest");
+ }
+ if (assignees.size() > 1 && assignees.contains(UserManager.getUser(SystemUser.UnAssigned))) {
+ throw new OseeArgumentException("Can not assign to user and UnAssigned");
}
+ transitionAssignees = assignees;
+ }
- transitioned(fromPage, toPage, toAssignees, true, transaction);
+ public boolean isAssigneeMe() throws OseeCoreException {
+ return stateMgr.getAssignees().contains(UserManager.getUser());
+ }
- // Notify extension points of transition
- for (IAtsStateItem item : AtsStateItemManager.getStateItems(fromPage.getId())) {
- item.transitioned(this, fromPage.getPageName(), toStateName, toAssignees, transaction);
- }
- for (IAtsStateItem item : AtsStateItemManager.getStateItems(toPage.getId())) {
- item.transitioned(this, fromPage.getPageName(), toStateName, toAssignees, transaction);
+ public Collection<User> getTransitionAssignees() throws OseeCoreException {
+ if (transitionAssignees != null) {
+ if (!transitionAssignees.isEmpty() && transitionAssignees.contains(UserManager.getUser(SystemUser.UnAssigned))) {
+ transitionAssignees.remove(UserManager.getUser(SystemUser.UnAssigned));
+ }
+ if (!transitionAssignees.isEmpty()) {
+ return transitionAssignees;
+ }
}
+ return stateMgr.getAssignees();
+ }
+
+ public String getTransitionAssigneesStr() throws OseeCoreException {
+ return Artifacts.toTextList(getTransitionAssignees(), ";");
}
public SMAEditor getEditor() {
@@ -1095,7 +1094,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple
public AtsWorkPage getCurrentAtsWorkPage() throws OseeCoreException {
for (AtsWorkPage atsWorkPage : getAtsWorkPages()) {
- if (isCurrentState(atsWorkPage.getName())) {
+ if (getStateMgr().isInState(atsWorkPage)) {
return atsWorkPage;
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java
index 7209c960e4d..541ad2e3fcb 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/ActionArtifact.java
@@ -16,13 +16,11 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.osee.ats.column.ChangeTypeColumn;
import org.eclipse.osee.ats.column.PriorityColumn;
-import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.world.IWorldViewArtifact;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
-import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.User;
@@ -153,30 +151,11 @@ public class ActionArtifact extends AbstractAtsArtifact implements IWorldViewArt
}
@Override
- public String getType() {
- return AtsArtifactTypes.Action.getName();
- }
-
- @Override
- public String getWorldViewTitle() {
- return getName();
- }
-
- @Override
- public String getState() throws OseeCoreException {
- Set<String> strs = new HashSet<String>();
- for (TeamWorkFlowArtifact team : getTeamWorkFlowArtifacts()) {
- strs.add(team.getState());
- }
- return Collections.toString(";", strs);
- }
-
- @Override
public String getAssigneeStr() throws OseeCoreException {
Set<User> pocs = new HashSet<User>();
Set<User> implementers = new HashSet<User>();
for (TeamWorkFlowArtifact team : getTeamWorkFlowArtifacts()) {
- if (team.isCancelledOrCompleted()) {
+ if (team.isCompletedOrCancelled()) {
implementers.addAll(team.getImplementers());
} else {
pocs.addAll(team.getStateMgr().getAssignees());
@@ -187,11 +166,6 @@ public class ActionArtifact extends AbstractAtsArtifact implements IWorldViewArt
}
@Override
- public String getWorldViewID() {
- return getHumanReadableId();
- }
-
- @Override
public Image getAssigneeImage() throws OseeCoreException {
for (TeamWorkFlowArtifact team : getTeamWorkFlowArtifacts()) {
Image image = team.getAssigneeImage();
@@ -238,18 +212,6 @@ public class ActionArtifact extends AbstractAtsArtifact implements IWorldViewArt
}
@Override
- public double getWorldViewWeeklyBenefit() throws OseeCoreException {
- double hours = 0;
- // Add up hours for all children
- for (TeamWorkFlowArtifact team : getTeamWorkFlowArtifacts()) {
- if (!team.isCompleted() && !team.isCancelled()) {
- hours += team.getWorldViewWeeklyBenefit();
- }
- }
- return hours;
- }
-
- @Override
public double getWorldViewHoursSpentState() throws OseeCoreException {
double hours = 0;
for (TeamWorkFlowArtifact team : getTeamWorkFlowArtifacts()) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java
index 30034964ece..a322685aa5a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/AtsAttributeTypes.java
@@ -29,12 +29,29 @@ public class AtsAttributeTypes extends NamedIdentity implements IAttributeType {
public static final IAttributeType AllowCreateBranch = new AtsAttributeTypes("AAMFEbARuQEvi6rtY5gA", "Allow Create Branch");
public static final IAttributeType BaselineBranchGuid = new AtsAttributeTypes("AAMFEdIjJ2za2fblEVgA", "Baseline Branch Guid", "Basline branch associated with ATS object.");
public static final IAttributeType BlockingReview = new AtsAttributeTypes("AAMFEctKkjMRrIy1C7gA", "Blocking Review");
+
public static final IAttributeType Category1 = new AtsAttributeTypes("AAMFEdrYniOQYrYUKKQA", "Category", "Open field for user to be able to enter text to use for categorizing/sorting.");
public static final IAttributeType Category2 = new AtsAttributeTypes("AAMFEdthBkolbJKLXuAA", "Category2", Category1.getDescription());
public static final IAttributeType Category3 = new AtsAttributeTypes("AAMFEd06oxr8LMzZxdgA", "Category3", Category1.getDescription());
+
public static final IAttributeType ChangeType = new AtsAttributeTypes("AAMFEc+MwGHnPCv7HlgA", "Change Type", "Type of change.");
+
+ public static final IAttributeType CancelledDate = new AtsAttributeTypes("AXnyKG1waCcPPHHGEFQA", "Cancelled Date", "Date the workflow was cancelled.");
+ public static final IAttributeType CancelledBy = new AtsAttributeTypes("AXpNsieBHnqaJJfduGgA", "Cancelled By", "UserId of the user who cancelled workflow.");
+ public static final IAttributeType CancelledReason = new AtsAttributeTypes("AXqJE0SmwRQzvzlqC9gA", "Cancelled Reason", "Explanation of why worklfow was cancelled.");
+ public static final IAttributeType CancelledFromState = new AtsAttributeTypes("AXrxlXOwGiAnlaUNX6AA", "Cancelled From State", "State workflow was in when cancelled.");
+
+ public static final IAttributeType CreatedDate = new AtsAttributeTypes("AXny90bBpmfNkLpNhqwA", "Created Date", "Date the workflow was created.");
+ public static final IAttributeType CreatedBy = new AtsAttributeTypes("AXpTVIExV1p0kp9IKKQA", "Created By", "UserId of the user who created the workflow.");
+
+ public static final IAttributeType CompletedDate = new AtsAttributeTypes("AXnxSfRg6UhirNzaZnQA", "Completed Date", "Date the workflow was completed.");
+ public static final IAttributeType CompletedBy = new AtsAttributeTypes("AXo6tqxrOStgd9P16XQA", "Completed By", "UserId of the user who completed workflow.");
+ public static final IAttributeType CompletedFromState = new AtsAttributeTypes("AXr9OO909xRiI3MFNOwA", "Completed From State", "State workflow was in when completed.");
+
public static final IAttributeType CurrentState = new AtsAttributeTypes("AAMFEdOWL3u6hmX2VbwA", "Current State", "Current state of workflow state machine.");
+ public static final IAttributeType CurrentStateType = new AtsAttributeTypes("ATOWheEyGUJmPmPuqyAA", "Current State Type", "Type of Current State: InWork, Completed or Cancelled.");
public static final IAttributeType Decision = new AtsAttributeTypes("AAMFEd7uDXcmqq_FrCQA", "Decision", "Option selected during decision review.");
+
public static final IAttributeType DecisionReviewOptions = new AtsAttributeTypes("AAMFEd5hRy1+SRJRqfwA", "Decision Review Options", "Options available for selection in review. Each line is a separate option. Format: <option name>;<state to transition to>;<assignee>");
public static final IAttributeType Description = new AtsAttributeTypes("AAMFEdWJ_ChxX6+YKbwA", "Description", "Detailed explanation.");
public static final IAttributeType EstimatedCompletionDate = new AtsAttributeTypes("AAMFEc18k3Gh+GP7zqAA", "Estimated Completion Date", "Date the changes will be completed.");
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java
index 0468ac4af64..ce343b5c4c0 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewArtifact.java
@@ -26,12 +26,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact;
public class DecisionReviewArtifact extends AbstractReviewArtifact implements IReviewArtifact, IATSStateMachineArtifact {
public XDecisionOptions decisionOptions;
- public static enum DecisionReviewState {
- Prepare,
- Decision,
- Followup,
- Completed
- };
public DecisionReviewArtifact(ArtifactFactory parentFactory, String guid, String humanReadableId, Branch branch, IArtifactType artifactType) throws OseeCoreException {
super(parentFactory, guid, humanReadableId, branch, artifactType);
@@ -45,7 +39,7 @@ public class DecisionReviewArtifact extends AbstractReviewArtifact implements IR
@Override
public Collection<User> getImplementers() throws OseeCoreException {
- return StateManager.getImplementersByState(this, DecisionReviewState.Decision.name());
+ return StateManager.getImplementersByState(this, DecisionReviewState.Decision);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewState.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewState.java
new file mode 100644
index 00000000000..ff02b737f29
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewState.java
@@ -0,0 +1,48 @@
+package org.eclipse.osee.ats.artifact;
+
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
+
+public enum DecisionReviewState implements IWorkPage {
+ Prepare(WorkPageType.Working),
+ Decision(WorkPageType.Working),
+ Followup(WorkPageType.Working),
+ Completed(WorkPageType.Completed);
+
+ private final WorkPageType workPageType;
+
+ private DecisionReviewState(WorkPageType workPageType) {
+ this.workPageType = workPageType;
+ }
+
+ @Override
+ public WorkPageType getWorkPageType() {
+ return workPageType;
+ }
+
+ @Override
+ public String getPageName() {
+ return name();
+ }
+
+ @Override
+ public boolean isCompletedOrCancelledPage() {
+ return getWorkPageType().isCompletedOrCancelledPage();
+ }
+
+ @Override
+ public boolean isCompletedPage() {
+ return getWorkPageType().isCompletedPage();
+ }
+
+ @Override
+ public boolean isCancelledPage() {
+ return getWorkPageType().isCancelledPage();
+ }
+
+ @Override
+ public boolean isWorkingPage() {
+ return getWorkPageType().isWorkingPage();
+ }
+
+};
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java
index 2cd6d16749d..9d0724d6bb0 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/DecisionReviewWorkflowManager.java
@@ -12,10 +12,13 @@
package org.eclipse.osee.ats.artifact;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* Methods in support of programatically transitioning the Decision Review Workflow through it's states. Only to be used
@@ -35,35 +38,34 @@ public final class DecisionReviewWorkflowManager {
*
* @param user User to transition to OR null if should use user of current state
*/
- public static Result transitionTo(DecisionReviewArtifact reviewArt, DecisionReviewArtifact.DecisionReviewState toState, User user, boolean popup, SkynetTransaction transaction) throws OseeCoreException {
+ public static Result transitionTo(DecisionReviewArtifact reviewArt, DecisionReviewState toState, User user, boolean popup, SkynetTransaction transaction) throws OseeCoreException {
Result result = Result.TrueResult;
// If in Prepare state, set data and transition to Decision
- if (reviewArt.getStateMgr().getCurrentStateName().equals(
- DecisionReviewArtifact.DecisionReviewState.Prepare.name())) {
+ if (reviewArt.isInState(DecisionReviewState.Prepare)) {
result = setPrepareStateData(popup, reviewArt, 100, 3, .2);
if (result.isFalse()) {
return result;
}
result =
- transitionToState(popup, DecisionReviewArtifact.DecisionReviewState.Decision.name(), reviewArt, user,
+ transitionToState(toState.getWorkPageType(), popup, DecisionReviewState.Decision, reviewArt, user,
transaction);
if (result.isFalse()) {
return result;
}
}
- if (toState == DecisionReviewArtifact.DecisionReviewState.Decision) {
+ if (toState == DecisionReviewState.Decision) {
return Result.TrueResult;
}
// If desired to transition to follow-up, then decision is false
- boolean decision = toState != DecisionReviewArtifact.DecisionReviewState.Followup;
+ boolean decision = toState != DecisionReviewState.Followup;
result = setDecisionStateData(popup, reviewArt, decision, 100, .2);
if (result.isFalse()) {
return result;
}
- result = transitionToState(popup, toState.name(), reviewArt, user, transaction);
+ result = transitionToState(toState.getWorkPageType(), popup, toState, reviewArt, user, transaction);
if (result.isFalse()) {
return result;
}
@@ -71,8 +73,7 @@ public final class DecisionReviewWorkflowManager {
}
public static Result setPrepareStateData(boolean popup, DecisionReviewArtifact reviewArt, int statePercentComplete, double estimateHours, double stateHoursSpent) throws OseeCoreException {
- if (!reviewArt.getStateMgr().getCurrentStateName().equals(
- DecisionReviewArtifact.DecisionReviewState.Prepare.name())) {
+ if (!reviewArt.isInState(DecisionReviewState.Prepare)) {
Result result = new Result("Action not in Prepare state");
if (result.isFalse() && popup) {
result.popup();
@@ -84,9 +85,10 @@ public final class DecisionReviewWorkflowManager {
return Result.TrueResult;
}
- public static Result transitionToState(boolean popup, String toState, DecisionReviewArtifact reviewArt, User user, SkynetTransaction transaction) throws OseeCoreException {
+ public static Result transitionToState(WorkPageType workPageType, boolean popup, IWorkPage toState, DecisionReviewArtifact reviewArt, User user, SkynetTransaction transaction) throws OseeCoreException {
+ TransitionManager transitionMgr = new TransitionManager(reviewArt);
Result result =
- reviewArt.transition(toState,
+ transitionMgr.transition(toState,
(user == null ? reviewArt.getStateMgr().getAssignees().iterator().next() : user), transaction,
TransitionOption.None);
if (result.isFalse() && popup) {
@@ -96,8 +98,7 @@ public final class DecisionReviewWorkflowManager {
}
public static Result setDecisionStateData(boolean popup, DecisionReviewArtifact reviewArt, boolean decision, int statePercentComplete, double stateHoursSpent) throws OseeCoreException {
- if (!reviewArt.getStateMgr().getCurrentStateName().equals(
- DecisionReviewArtifact.DecisionReviewState.Decision.name())) {
+ if (!reviewArt.isInState(DecisionReviewState.Decision)) {
Result result = new Result("Action not in Decision state");
if (result.isFalse() && popup) {
result.popup();
@@ -108,5 +109,4 @@ public final class DecisionReviewWorkflowManager {
reviewArt.getStateMgr().updateMetrics(stateHoursSpent, statePercentComplete, true);
return Result.TrueResult;
}
-
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalArtifact.java
index e4177070ffe..65b53b28ffe 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalArtifact.java
@@ -27,12 +27,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactFactory;
*/
public class GoalArtifact extends AbstractWorkflowArtifact {
- public static enum GoalState {
- InWork,
- Completed,
- Cancelled
- };
-
public GoalArtifact(ArtifactFactory parentFactory, String guid, String humanReadableId, Branch branch, IArtifactType artifactType) throws OseeCoreException {
super(parentFactory, guid, humanReadableId, branch, artifactType);
registerAtsWorldRelation(AtsRelationTypes.Goal_Member);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalState.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalState.java
new file mode 100644
index 00000000000..de12f3083ca
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/GoalState.java
@@ -0,0 +1,47 @@
+package org.eclipse.osee.ats.artifact;
+
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
+
+public enum GoalState implements IWorkPage {
+ InWork(WorkPageType.Working),
+ Completed(WorkPageType.Completed),
+ Cancelled(WorkPageType.Cancelled);
+
+ private final WorkPageType workPageType;
+
+ private GoalState(WorkPageType workPageType) {
+ this.workPageType = workPageType;
+ }
+
+ @Override
+ public WorkPageType getWorkPageType() {
+ return workPageType;
+ }
+
+ @Override
+ public String getPageName() {
+ return name();
+ }
+
+ @Override
+ public boolean isCompletedOrCancelledPage() {
+ return getWorkPageType().isCompletedOrCancelledPage();
+ }
+
+ @Override
+ public boolean isCompletedPage() {
+ return getWorkPageType().isCompletedPage();
+ }
+
+ @Override
+ public boolean isCancelledPage() {
+ return getWorkPageType().isCancelledPage();
+ }
+
+ @Override
+ public boolean isWorkingPage() {
+ return getWorkPageType().isWorkingPage();
+ }
+
+};
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java
index 3fe6a0b609e..f0a594f2a7c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewArtifact.java
@@ -30,12 +30,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact;
*/
public class PeerToPeerReviewArtifact extends AbstractReviewArtifact implements IReviewArtifact, IATSStateMachineArtifact {
- public static enum PeerToPeerReviewState {
- Prepare,
- Review,
- Completed
- };
-
public PeerToPeerReviewArtifact(ArtifactFactory parentFactory, String guid, String humanReadableId, Branch branch, IArtifactType artifactType) throws OseeCoreException {
super(parentFactory, guid, humanReadableId, branch, artifactType);
defectManager = new DefectManager(this);
@@ -54,7 +48,7 @@ public class PeerToPeerReviewArtifact extends AbstractReviewArtifact implements
return new Status(IStatus.ERROR, namespace, "Must have at least one Reviewer");
}
// If in review state, all roles must have hours spent entered
- if (getStateMgr().getCurrentStateName().equals(PeerToPeerReviewArtifact.PeerToPeerReviewState.Review.name())) {
+ if (isInState(PeerToPeerReviewState.Review)) {
for (UserRole uRole : userRoleManager.getUserRoles()) {
if (uRole.getHoursSpent() == null) {
return new Status(IStatus.ERROR, AtsPlugin.PLUGIN_ID, "Hours spent must be entered for each role.");
@@ -71,7 +65,7 @@ public class PeerToPeerReviewArtifact extends AbstractReviewArtifact implements
@Override
public Collection<User> getImplementers() throws OseeCoreException {
- Collection<User> users = StateManager.getImplementersByState(this, PeerToPeerReviewState.Review.name());
+ Collection<User> users = StateManager.getImplementersByState(this, PeerToPeerReviewState.Review);
for (UserRole role : userRoleManager.getUserRoles()) {
users.add(role.getUser());
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewState.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewState.java
new file mode 100644
index 00000000000..5ddac2b0b85
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewState.java
@@ -0,0 +1,47 @@
+package org.eclipse.osee.ats.artifact;
+
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
+
+public enum PeerToPeerReviewState implements IWorkPage {
+ Prepare(WorkPageType.Working),
+ Review(WorkPageType.Working),
+ Completed(WorkPageType.Completed);
+
+ private final WorkPageType workPageType;
+
+ private PeerToPeerReviewState(WorkPageType workPageType) {
+ this.workPageType = workPageType;
+ }
+
+ @Override
+ public WorkPageType getWorkPageType() {
+ return workPageType;
+ }
+
+ @Override
+ public String getPageName() {
+ return name();
+ }
+
+ @Override
+ public boolean isCompletedOrCancelledPage() {
+ return getWorkPageType().isCompletedOrCancelledPage();
+ }
+
+ @Override
+ public boolean isCompletedPage() {
+ return getWorkPageType().isCompletedPage();
+ }
+
+ @Override
+ public boolean isCancelledPage() {
+ return getWorkPageType().isCancelledPage();
+ }
+
+ @Override
+ public boolean isWorkingPage() {
+ return getWorkPageType().isWorkingPage();
+ }
+
+};
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java
index 1e9446d9deb..d6bbc8101b9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/PeerToPeerReviewWorkflowManager.java
@@ -15,10 +15,13 @@ import java.util.Collection;
import org.eclipse.osee.ats.util.TransitionOption;
import org.eclipse.osee.ats.util.widgets.defect.DefectItem;
import org.eclipse.osee.ats.util.widgets.role.UserRole;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* Methods in support of programatically transitioning the Peer Review Workflow through it's states. Only to be used for
@@ -38,17 +41,18 @@ public final class PeerToPeerReviewWorkflowManager {
*
* @param user User to transition to OR null if should use user of current state
*/
- public static Result transitionTo(PeerToPeerReviewArtifact reviewArt, PeerToPeerReviewArtifact.PeerToPeerReviewState toState, Collection<UserRole> roles, Collection<DefectItem> defects, User user, boolean popup, SkynetTransaction transaction) throws OseeCoreException {
+ public static Result transitionTo(PeerToPeerReviewArtifact reviewArt, PeerToPeerReviewState toState, Collection<UserRole> roles, Collection<DefectItem> defects, User user, boolean popup, SkynetTransaction transaction) throws OseeCoreException {
Result result = setPrepareStateData(popup, reviewArt, roles, "DoThis.java", 100, .2, transaction);
if (result.isFalse()) {
return result;
}
result =
- transitionToState(popup, reviewArt, PeerToPeerReviewArtifact.PeerToPeerReviewState.Review.name(), transaction);
+ transitionToState(PeerToPeerReviewState.Review.getWorkPageType(), popup, reviewArt,
+ PeerToPeerReviewState.Review, transaction);
if (result.isFalse()) {
return result;
}
- if (toState == PeerToPeerReviewArtifact.PeerToPeerReviewState.Review) {
+ if (toState == PeerToPeerReviewState.Review) {
return Result.TrueResult;
}
@@ -58,17 +62,18 @@ public final class PeerToPeerReviewWorkflowManager {
}
result =
- transitionToState(popup, reviewArt, PeerToPeerReviewArtifact.PeerToPeerReviewState.Completed.name(),
- transaction);
+ transitionToState(PeerToPeerReviewState.Completed.getWorkPageType(), popup, reviewArt,
+ PeerToPeerReviewState.Completed, transaction);
if (result.isFalse()) {
return result;
}
return Result.TrueResult;
}
- private static Result transitionToState(boolean popup, PeerToPeerReviewArtifact teamArt, String toState, SkynetTransaction transaction) throws OseeCoreException {
+ private static Result transitionToState(WorkPageType workPageType, boolean popup, PeerToPeerReviewArtifact reviewArt, IWorkPage toState, SkynetTransaction transaction) throws OseeCoreException {
+ TransitionManager transitionMgr = new TransitionManager(reviewArt);
Result result =
- teamArt.transition(toState, teamArt.getStateMgr().getAssignees().iterator().next(), transaction,
+ transitionMgr.transition(toState, reviewArt.getStateMgr().getAssignees().iterator().next(), transaction,
TransitionOption.None);
if (result.isFalse() && popup) {
result.popup();
@@ -77,7 +82,7 @@ public final class PeerToPeerReviewWorkflowManager {
}
public static Result setPrepareStateData(boolean popup, PeerToPeerReviewArtifact reviewArt, Collection<UserRole> roles, String reviewMaterials, int statePercentComplete, double stateHoursSpent, SkynetTransaction transaction) throws OseeCoreException {
- if (!reviewArt.getStateMgr().getCurrentStateName().equals("Prepare")) {
+ if (!reviewArt.isInState(PeerToPeerReviewState.Prepare)) {
Result result = new Result("Action not in Prepare state");
if (result.isFalse() && popup) {
result.popup();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java
index 8bb2bd21882..b51680e7a2f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskArtifact.java
@@ -18,11 +18,12 @@ import java.util.logging.Level;
import org.eclipse.osee.ats.column.EstimatedHoursColumn;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsRelationTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.ats.util.StateManager;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
import org.eclipse.osee.ats.util.widgets.dialog.TaskResOptionDefinition;
import org.eclipse.osee.ats.util.widgets.dialog.TaskResolutionOptionRule;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeStateException;
@@ -43,12 +44,6 @@ import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
*/
public class TaskArtifact extends AbstractWorkflowArtifact implements IATSStateMachineArtifact {
- public static enum TaskStates {
- InWork,
- Completed,
- Cancelled
- };
-
public TaskArtifact(ArtifactFactory parentFactory, String guid, String humanReadableId, Branch branch, IArtifactType artifactType) throws OseeCoreException {
super(parentFactory, guid, humanReadableId, branch, artifactType);
}
@@ -110,12 +105,8 @@ public class TaskArtifact extends AbstractWorkflowArtifact implements IATSStateM
super.atsDelete(deleteArts, allRelated);
}
- public Boolean isInWork() {
- return getStateMgr().getCurrentStateName().equals(TaskStates.InWork.name());
- }
-
public void transitionToCompleted(double additionalHours, SkynetTransaction transaction, TransitionOption... transitionOption) {
- if (getStateMgr().getCurrentStateName().equals(DefaultTeamState.Completed.name())) {
+ if (isInState(TeamState.Completed)) {
return;
}
// Assign current user if unassigned
@@ -127,17 +118,19 @@ public class TaskArtifact extends AbstractWorkflowArtifact implements IATSStateM
} catch (Exception ex) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
- Result result = transition(DefaultTeamState.Completed.name(), (User) null, transaction, transitionOption);
+ TransitionManager transitionMgr = new TransitionManager(this);
+ Result result = transitionMgr.transition(TaskStates.Completed, (User) null, transaction, transitionOption);
if (result.isFalse()) {
result.popup();
}
}
public void transitionToInWork(User toUser, int percentComplete, double additionalHours, SkynetTransaction transaction, TransitionOption... transitionOption) throws OseeCoreException {
- if (getStateMgr().getCurrentStateName().equals(TaskStates.InWork.name())) {
+ if (isInState(TaskStates.InWork)) {
return;
}
- Result result = transition(TaskStates.InWork.name(), toUser, transaction, transitionOption);
+ TransitionManager transitionMgr = new TransitionManager(this);
+ Result result = transitionMgr.transition(TaskStates.InWork, toUser, transaction, transitionOption);
if (getStateMgr().getPercentComplete() != percentComplete || additionalHours > 0) {
getStateMgr().updateMetrics(additionalHours, percentComplete, true);
}
@@ -163,7 +156,7 @@ public class TaskArtifact extends AbstractWorkflowArtifact implements IATSStateM
// Case where already completed and statusing, just add additional hours to InWork state
else if (percentComplete == 100 && isCompleted()) {
if (additionalHours > 0) {
- getStateMgr().updateMetrics(TaskStates.InWork.name(), additionalHours, percentComplete, true);
+ getStateMgr().updateMetrics(TaskStates.InWork, additionalHours, percentComplete, true);
}
} else {
getStateMgr().updateMetrics(additionalHours, percentComplete, true);
@@ -171,9 +164,10 @@ public class TaskArtifact extends AbstractWorkflowArtifact implements IATSStateM
}
public void parentWorkFlowTransitioned(WorkPageDefinition fromWorkPageDefinition, WorkPageDefinition toWorkPageDefinition, Collection<User> toAssignees, boolean persist, SkynetTransaction transaction, TransitionOption... transitionOption) throws OseeCoreException {
- if (toWorkPageDefinition.getPageName().equals(DefaultTeamState.Cancelled.name()) && isInWork()) {
- transitionToCancelled("Parent Cancelled", transaction, transitionOption);
- } else if (fromWorkPageDefinition.getPageName().equals(DefaultTeamState.Cancelled.name()) && isCancelled()) {
+ if (toWorkPageDefinition.getPageName().equals(TeamState.Cancelled.getPageName()) && isInWork()) {
+ TransitionManager transitionMgr = new TransitionManager(this);
+ transitionMgr.transitionToCancelled("Parent Cancelled", transaction, transitionOption);
+ } else if (fromWorkPageDefinition.getPageName().equals(TeamState.Cancelled.getPageName()) && isCancelled()) {
transitionToInWork(UserManager.getUser(), 99, 0, transaction, transitionOption);
}
}
@@ -220,7 +214,7 @@ public class TaskArtifact extends AbstractWorkflowArtifact implements IATSStateM
@Override
public Collection<User> getImplementers() throws OseeCoreException {
- return StateManager.getImplementersByState(this, TaskStates.InWork.name());
+ return StateManager.getImplementersByState(this, TaskStates.InWork);
}
@Override
@@ -246,7 +240,7 @@ public class TaskArtifact extends AbstractWorkflowArtifact implements IATSStateM
if (getWorldViewStatePercentComplete() == 0) {
return est;
}
- double percent = getStateMgr().getPercentComplete(TaskStates.InWork.name());
+ double percent = getStateMgr().getPercentComplete(TaskStates.InWork);
if (percent == 0) {
return est;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskStates.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskStates.java
new file mode 100644
index 00000000000..328751347b2
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TaskStates.java
@@ -0,0 +1,46 @@
+package org.eclipse.osee.ats.artifact;
+
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
+
+public enum TaskStates implements IWorkPage {
+ InWork(WorkPageType.Working),
+ Completed(WorkPageType.Completed),
+ Cancelled(WorkPageType.Cancelled);
+
+ private final WorkPageType workPageType;
+
+ private TaskStates(WorkPageType workPageType) {
+ this.workPageType = workPageType;
+ }
+
+ @Override
+ public WorkPageType getWorkPageType() {
+ return workPageType;
+ }
+
+ @Override
+ public String getPageName() {
+ return name();
+ }
+
+ @Override
+ public boolean isCompletedOrCancelledPage() {
+ return getWorkPageType().isCompletedOrCancelledPage();
+ }
+
+ @Override
+ public boolean isCompletedPage() {
+ return getWorkPageType().isCompletedPage();
+ }
+
+ @Override
+ public boolean isCancelledPage() {
+ return getWorkPageType().isCancelledPage();
+ }
+
+ @Override
+ public boolean isWorkingPage() {
+ return getWorkPageType().isWorkingPage();
+ }
+};
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java
index f911e516c49..5ab69727815 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkFlowArtifact.java
@@ -20,8 +20,8 @@ import org.eclipse.osee.ats.config.AtsCacheManager;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsBranchManager;
import org.eclipse.osee.ats.util.AtsRelationTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.ats.util.StateManager;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.ats.util.widgets.XActionableItemsDam;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -201,7 +201,7 @@ public class TeamWorkFlowArtifact extends AbstractTaskableArtifact implements IB
@Override
public Collection<User> getImplementers() throws OseeCoreException {
- return StateManager.getImplementersByState(this, DefaultTeamState.Implement.name());
+ return StateManager.getImplementersByState(this, TeamState.Implement);
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java
index 2319c464b39..1ce056cf0be 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java
@@ -11,12 +11,14 @@
package org.eclipse.osee.ats.artifact;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
/**
* Methods in support of programatically transitioning the DefaultWorkFlow through it's states. Only to be used for the
@@ -38,14 +40,14 @@ public class TeamWorkflowManager {
*
* @param user User to transition to OR null if should use user of current state
*/
- public Result transitionTo(DefaultTeamState toState, User user, boolean popup, SkynetTransaction transaction) throws OseeCoreException {
- if (teamArt.getStateMgr().getCurrentStateName().equals(DefaultTeamState.Endorse.name())) {
+ public Result transitionTo(TeamState toState, User user, boolean popup, SkynetTransaction transaction) throws OseeCoreException {
+ if (teamArt.isInState(TeamState.Endorse)) {
Result result = processEndorseState(popup, teamArt, user, transaction);
if (result.isFalse()) {
return result;
}
}
- if (toState == DefaultTeamState.Analyze) {
+ if (toState == TeamState.Analyze) {
return Result.TrueResult;
}
@@ -54,7 +56,7 @@ public class TeamWorkflowManager {
return result;
}
- if (toState == DefaultTeamState.Authorize) {
+ if (toState == TeamState.Authorize) {
return Result.TrueResult;
}
@@ -63,11 +65,11 @@ public class TeamWorkflowManager {
return result;
}
- if (toState == DefaultTeamState.Implement) {
+ if (toState == TeamState.Implement) {
return Result.TrueResult;
}
- result = transitionToState(popup, teamArt, DefaultTeamState.Completed.name(), user, transaction);
+ result = transitionToState(popup, teamArt, TeamState.Completed, user, transaction);
if (result.isFalse()) {
return result;
}
@@ -80,7 +82,7 @@ public class TeamWorkflowManager {
if (result.isFalse()) {
return result;
}
- result = transitionToState(popup, teamArt, DefaultTeamState.Implement.name(), user, transaction);
+ result = transitionToState(popup, teamArt, TeamState.Implement, user, transaction);
if (result.isFalse()) {
return result;
}
@@ -92,7 +94,7 @@ public class TeamWorkflowManager {
if (result.isFalse()) {
return result;
}
- result = transitionToState(popup, teamArt, DefaultTeamState.Authorize.name(), user, transaction);
+ result = transitionToState(popup, teamArt, TeamState.Authorize, user, transaction);
if (result.isFalse()) {
return result;
}
@@ -104,17 +106,19 @@ public class TeamWorkflowManager {
if (result.isFalse()) {
return result;
}
- result = transitionToState(popup, teamArt, DefaultTeamState.Analyze.name(), user, transaction);
+ result = transitionToState(popup, teamArt, TeamState.Analyze, user, transaction);
if (result.isFalse()) {
return result;
}
return Result.TrueResult;
}
- private Result transitionToState(boolean popup, TeamWorkFlowArtifact teamArt, String toState, User user, SkynetTransaction transaction) throws OseeCoreException {
+ private Result transitionToState(boolean popup, TeamWorkFlowArtifact teamArt, IWorkPage toState, User user, SkynetTransaction transaction) throws OseeCoreException {
+ TransitionManager transitionMgr = new TransitionManager(teamArt);
Result result =
- teamArt.transition(toState, (user == null ? teamArt.getStateMgr().getAssignees().iterator().next() : user),
- transaction, TransitionOption.None);
+ transitionMgr.transition(toState,
+ (user == null ? teamArt.getStateMgr().getAssignees().iterator().next() : user), transaction,
+ TransitionOption.None);
if (result.isFalse() && popup) {
result.popup();
}
@@ -122,19 +126,19 @@ public class TeamWorkflowManager {
}
public Result setEndorseData(boolean popup, String propRes, int statePercentComplete, double stateHoursSpent) throws OseeCoreException {
- if (!teamArt.getStateMgr().getCurrentStateName().equals(DefaultTeamState.Endorse.name())) {
+ if (!teamArt.isInState(TeamState.Endorse)) {
Result result = new Result("Action not in Endorse state");
if (result.isFalse() && popup) {
result.popup();
return result;
}
}
- teamArt.getStateMgr().setMetrics(DefaultTeamState.Endorse.name(), stateHoursSpent, statePercentComplete, true);
+ teamArt.getStateMgr().setMetrics(TeamState.Endorse, stateHoursSpent, statePercentComplete, true);
return Result.TrueResult;
}
public Result setAnalyzeData(boolean popup, String problem, String propRes, double hourEstimate, int statePercentComplete, double stateHoursSpent) throws OseeCoreException {
- if (!teamArt.getStateMgr().getCurrentStateName().equals(DefaultTeamState.Analyze.name())) {
+ if (!teamArt.isInState(TeamState.Analyze)) {
Result result = new Result("Action not in Analyze state");
if (result.isFalse() && popup) {
result.popup();
@@ -142,31 +146,31 @@ public class TeamWorkflowManager {
}
}
teamArt.setSoleAttributeValue(AtsAttributeTypes.EstimatedHours, hourEstimate);
- teamArt.getStateMgr().setMetrics(DefaultTeamState.Analyze.name(), stateHoursSpent, statePercentComplete, true);
+ teamArt.getStateMgr().setMetrics(TeamState.Analyze, stateHoursSpent, statePercentComplete, true);
return Result.TrueResult;
}
public Result setAuthorizeData(boolean popup, int statePercentComplete, double stateHoursSpent) throws OseeCoreException {
- if (!teamArt.getStateMgr().getCurrentStateName().equals(DefaultTeamState.Authorize.name())) {
+ if (!teamArt.isInState(TeamState.Authorize)) {
Result result = new Result("Action not in Authorize state");
if (result.isFalse() && popup) {
result.popup();
return result;
}
}
- teamArt.getStateMgr().setMetrics(DefaultTeamState.Authorize.name(), stateHoursSpent, statePercentComplete, true);
+ teamArt.getStateMgr().setMetrics(TeamState.Authorize, stateHoursSpent, statePercentComplete, true);
return Result.TrueResult;
}
public Result setImplementData(boolean popup, String resolution, int statePercentComplete, double stateHoursSpent) throws OseeCoreException {
- if (!teamArt.getStateMgr().getCurrentStateName().equals(DefaultTeamState.Implement.name())) {
+ if (!teamArt.isInState(TeamState.Implement)) {
Result result = new Result("Action not in Implement state");
if (result.isFalse() && popup) {
result.popup();
return result;
}
}
- teamArt.getStateMgr().setMetrics(DefaultTeamState.Implement.name(), stateHoursSpent, statePercentComplete, true);
+ teamArt.getStateMgr().setMetrics(TeamState.Implement, stateHoursSpent, statePercentComplete, true);
return Result.TrueResult;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/AtsLog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/AtsLog.java
index 6775b3e46da..2ab71d1085e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/AtsLog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/AtsLog.java
@@ -20,7 +20,7 @@ import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.osee.ats.internal.AtsPlugin;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
import org.eclipse.osee.framework.jdk.core.util.AXml;
@@ -142,7 +142,10 @@ public class AtsLog {
return logItems;
}
- public void setOriginator(User user) throws OseeCoreException {
+ /**
+ * Used to reset the original originated user. Only for internal use. Kept for backward compatibility.
+ */
+ public void internalResetOriginator(User user) throws OseeCoreException {
List<LogItem> logItems = getLogItems();
for (LogItem item : logItems) {
if (item.getType() == LogType.Originated) {
@@ -153,7 +156,10 @@ public class AtsLog {
}
}
- public void setCreationDate(Date date) throws OseeCoreException {
+ /**
+ * Used to reset the original originated user. Only for internal use. Kept for backward compatibility.
+ */
+ public void internalResetCreatedDate(Date date) throws OseeCoreException {
List<LogItem> logItems = getLogItems();
for (LogItem item : logItems) {
if (item.getType() == LogType.Originated) {
@@ -164,15 +170,10 @@ public class AtsLog {
}
}
- public String getCancellationReason() throws OseeCoreException {
- LogItem item = getStateEvent(LogType.StateCancelled);
- if (item == null) {
- return "";
- }
- return item.getMsg();
- }
-
- public String getCancelledFromState() throws OseeCoreException {
+ /**
+ * This method is replaced by AbstractWorkflowArtifact.getCancelledFromState. Kept for backward compatibility.
+ */
+ public String internalGetCancelledFromState() throws OseeCoreException {
LogItem item = getStateEvent(LogType.StateCancelled);
if (item == null) {
return "";
@@ -180,7 +181,10 @@ public class AtsLog {
return item.getState();
}
- public String getCompletedFromState() throws OseeCoreException {
+ /**
+ * This method is replaced by AbstractWorkflowArtifact.getCompletedFromState. Kept for backward compatibility.
+ */
+ public String internalGetCompletedFromState() throws OseeCoreException {
LogItem item = getStateEvent(LogType.StateComplete);
if (item == null) {
return "";
@@ -188,7 +192,10 @@ public class AtsLog {
return item.getState();
}
- public void setCancellationReason(String reason) throws OseeCoreException {
+ /**
+ * This method is replaced by AbstractWorkflowArtifact.setCompletedFromState. Kept for backward compatibility.
+ */
+ public void internalSetCancellationReason(String reason) throws OseeCoreException {
List<LogItem> logItems = getLogItemsReversed();
for (LogItem item : logItems) {
if (item.getType() == LogType.StateCancelled) {
@@ -200,9 +207,10 @@ public class AtsLog {
}
/**
- * Since originator can be changed, return the date of the first originated log item
+ * Since originator can be changed, return the date of the first originated log item. Kept for backward
+ * compatibility.
*/
- public Date getCreationDate() throws OseeCoreException {
+ public Date internalGetCreationDate() throws OseeCoreException {
LogItem logItem = getEvent(LogType.Originated);
if (logItem == null) {
return null;
@@ -211,9 +219,9 @@ public class AtsLog {
}
/**
- * Since originator change be changed, return the last originated event's user
+ * Since originator change be changed, return the last originated event's user. Kept for backward compatibility.
*/
- public User getOriginator() throws OseeCoreException {
+ public User internalGetOriginator() throws OseeCoreException {
LogItem logItem = getLastEvent(LogType.Originated);
if (logItem == null) {
return null;
@@ -351,16 +359,23 @@ public class AtsLog {
return null;
}
- public LogItem getCancelledLogItem() throws OseeCoreException {
+ /**
+ * This method is replaced by Cancelled Date, By and Reason attributes. It will not work with multiple cancelled
+ * state design
+ */
+ public LogItem internalGetCancelledLogItem() throws OseeCoreException {
if (cancelledLogItem == null) {
- cancelledLogItem = getStateEvent(LogType.StateEntered, DefaultTeamState.Cancelled.name());
+ cancelledLogItem = getStateEvent(LogType.StateEntered, TeamState.Cancelled.getPageName());
}
return cancelledLogItem;
}
- public LogItem getCompletedLogItem() throws OseeCoreException {
+ /**
+ * This method is replaced by Completed Date, By attributes. It will not work with multiple completed state design
+ */
+ public LogItem internalGetCompletedLogItem() throws OseeCoreException {
if (completedLogItem == null) {
- completedLogItem = getStateEvent(LogType.StateEntered, DefaultTeamState.Completed.name());
+ completedLogItem = getStateEvent(LogType.StateEntered, TeamState.Completed.getPageName());
}
return completedLogItem;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java
index 56353296b5e..06cca3f8fbc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/log/LogType.java
@@ -8,29 +8,29 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.artifact.log;
-
-import org.eclipse.osee.framework.core.exception.OseeArgumentException;
-
-public enum LogType {
- None,
- Originated,
- StateComplete,
- StateCancelled,
- StateEntered,
- Released,
- Error,
- Assign,
- Note,
- Metrics;
-
- public static LogType getType(String type) throws OseeArgumentException {
- for (Enum<LogType> e : LogType.values()) {
- if (e.name().equals(type)) {
- return (LogType) e;
- }
- }
- throw new OseeArgumentException("Unhandled LogType: [%s]", type);
- }
-
-};
+package org.eclipse.osee.ats.artifact.log;
+
+import org.eclipse.osee.framework.core.exception.OseeArgumentException;
+
+public enum LogType {
+ None,
+ Assign,
+ Released,
+ Originated,
+ StateComplete,
+ StateCancelled,
+ StateEntered,
+ Error,
+ Note,
+ Metrics;
+
+ public static LogType getType(String type) throws OseeArgumentException {
+ for (Enum<LogType> e : LogType.values()) {
+ if (e.name().equals(type)) {
+ return (LogType) e;
+ }
+ }
+ throw new OseeArgumentException("Unhandled LogType: [%s]", type);
+ }
+
+};
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java
index 8307d488b52..69bf90d872a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java
@@ -65,7 +65,7 @@ public class CancelledDateColumn extends XViewerAtsColumn implements IXViewerVal
} else if (object instanceof AbstractWorkflowArtifact) {
AbstractWorkflowArtifact awa = (AbstractWorkflowArtifact) object;
if (((AbstractWorkflowArtifact) object).isCancelled()) {
- Date date = ((AbstractWorkflowArtifact) object).getCancelledDate();
+ Date date = ((AbstractWorkflowArtifact) object).internalGetCancelledDate();
if (date == null) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP,
"Cancelled with no date => " + awa.getHumanReadableId());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java
index 075f0979efe..151c8326730 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java
@@ -59,7 +59,7 @@ public class CreatedDateColumn extends XViewerAtsColumn implements IXViewerValue
if (object instanceof ActionArtifact) {
return getDate(((ActionArtifact) object).getTeamWorkFlowArtifacts().iterator().next());
} else if (object instanceof AbstractWorkflowArtifact) {
- return ((AbstractWorkflowArtifact) object).getLog().getCreationDate();
+ return ((AbstractWorkflowArtifact) object).getCreatedDate();
}
return null;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java
index 1d3f5fa9613..f369478f39c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java
@@ -7,6 +7,7 @@ package org.eclipse.osee.ats.column;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.nebula.widgets.xviewer.IAltLeftClickProvider;
@@ -101,6 +102,7 @@ public class OriginatorColumn extends XViewerAtsColumn implements IXViewerValueC
int result = ld.open();
if (result == 0) {
User selectedUser = ld.getSelection();
+ Date createdDate = new Date();
SkynetTransaction transaction = null;
if (persist) {
@@ -108,7 +110,7 @@ public class OriginatorColumn extends XViewerAtsColumn implements IXViewerValueC
}
for (AbstractWorkflowArtifact sma : smas) {
- sma.setOriginator(selectedUser);
+ sma.setCreatedBy(selectedUser, true, createdDate);
if (persist) {
sma.persist(transaction);
}
@@ -125,12 +127,12 @@ public class OriginatorColumn extends XViewerAtsColumn implements IXViewerValueC
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
try {
if (element instanceof AbstractWorkflowArtifact) {
- return ((AbstractWorkflowArtifact) element).getOriginatorStr();
+ return ((AbstractWorkflowArtifact) element).getCreatedBy().getName();
}
if (element instanceof ActionArtifact) {
Set<String> strs = new HashSet<String>();
for (TeamWorkFlowArtifact team : ((ActionArtifact) element).getTeamWorkFlowArtifacts()) {
- strs.add(team.getOriginatorStr());
+ strs.add(team.getCreatedBy().getName());
}
return Collections.toString("; ", strs);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ResolutionColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ResolutionColumn.java
index bbf7fcb26d8..1aef18ea110 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ResolutionColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ResolutionColumn.java
@@ -87,7 +87,7 @@ public class ResolutionColumn extends XViewerAtsAttributeValueColumn {
return false;
}
- public boolean isSelectedTaskArtifactsAreInWork(final Collection<? extends TaskArtifact> tasks) {
+ public boolean isSelectedTaskArtifactsAreInWork(final Collection<? extends TaskArtifact> tasks) throws OseeCoreException {
for (TaskArtifact taskArt : tasks) {
if (!taskArt.isInWork()) {
return false;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewDeciderColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewDeciderColumn.java
index 3ca27a5be08..80df74890a1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewDeciderColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ReviewDeciderColumn.java
@@ -9,7 +9,7 @@ import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerCells;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
-import org.eclipse.osee.ats.artifact.DecisionReviewArtifact.DecisionReviewState;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
import org.eclipse.osee.ats.world.WorldXViewerFactory;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -45,7 +45,7 @@ public class ReviewDeciderColumn extends XViewerAtsColumn implements IXViewerVal
try {
if (element instanceof DecisionReviewArtifact) {
return Artifacts.toString("; ",
- ((DecisionReviewArtifact) element).getStateMgr().getAssignees(DecisionReviewState.Decision.name()));
+ ((DecisionReviewArtifact) element).getStateMgr().getAssignees(DecisionReviewState.Decision));
}
} catch (OseeCoreException ex) {
XViewerCells.getCellExceptionString(ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java
index 221aff83bde..ad645513f33 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java
@@ -5,13 +5,18 @@
*/
package org.eclipse.osee.ats.column;
+import java.util.HashSet;
+import java.util.Set;
import org.eclipse.nebula.widgets.xviewer.IXViewerValueColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerCells;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
+import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.ActionArtifact;
+import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsColumn;
-import org.eclipse.osee.ats.world.IWorldViewArtifact;
import org.eclipse.osee.ats.world.WorldXViewerFactory;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.swt.SWT;
public class StateColumn extends XViewerAtsColumn implements IXViewerValueColumn {
@@ -41,8 +46,14 @@ public class StateColumn extends XViewerAtsColumn implements IXViewerValueColumn
@Override
public String getColumnText(Object element, XViewerColumn column, int columnIndex) {
try {
- if (element instanceof IWorldViewArtifact) {
- return ((IWorldViewArtifact) element).getState();
+ if (element instanceof AbstractWorkflowArtifact) {
+ return ((AbstractWorkflowArtifact) element).getCurrentStateName();
+ } else if (element instanceof ActionArtifact) {
+ Set<String> strs = new HashSet<String>();
+ for (TeamWorkFlowArtifact team : ((ActionArtifact) element).getTeamWorkFlowArtifacts()) {
+ strs.add(team.getCurrentStateName());
+ }
+ return Collections.toString(";", strs);
}
} catch (OseeCoreException ex) {
return XViewerCells.getCellExceptionString(ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java
index f239546943b..38e2a3ae065 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigManager.java
@@ -29,7 +29,7 @@ import org.eclipse.osee.ats.util.AtsFolderUtil;
import org.eclipse.osee.ats.util.AtsFolderUtil.AtsFolder;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.editor.wizard.AtsWorkflowConfigCreationWizard.WorkflowData;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
@@ -212,18 +212,18 @@ public class AtsConfigManager extends AbstractOperation {
newWorkflowArt.persist(transaction);
// Duplicate work pages w/ namespace changes
- for (DefaultTeamState state : DefaultTeamState.values()) {
+ for (TeamState state : TeamState.values()) {
Artifact defaultStateArt =
- WorkItemDefinitionFactory.getWorkItemDefinitionArtifact("osee.ats.teamWorkflow." + state.name());
+ WorkItemDefinitionFactory.getWorkItemDefinitionArtifact("osee.ats.teamWorkflow." + state.getPageName());
Artifact newStateArt = defaultStateArt.duplicate(AtsUtil.getAtsBranch());
for (Attribute<?> attr : newStateArt.getAttributes()) {
if (attr instanceof StringAttribute) {
attr.setFromString(attr.getDisplayableString().replaceAll("osee.ats.teamWorkflow", namespace));
}
}
- if (state == DefaultTeamState.Completed || state == DefaultTeamState.Cancelled) {
+ if (state.isCompletedOrCancelledPage()) {
newStateArt.setSoleAttributeFromString(CoreAttributeTypes.WorkParentId,
- "osee.ats.teamWorkflow." + state.name());
+ "osee.ats.teamWorkflow." + state.getPageName());
}
// Add same relations as default work pages to new work pages (widgets and rules)
@@ -237,7 +237,6 @@ public class AtsConfigManager extends AbstractOperation {
return new WorkflowData(new WorkFlowDefinition(newWorkflowArt), newWorkflowArt);
}
-
public static final class OpenAtsConfigEditors implements Display {
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAAssigneesHeader.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAAssigneesHeader.java
index 997256e0fa9..41344060ce8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAAssigneesHeader.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAAssigneesHeader.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.editor;
+import java.util.logging.Level;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.column.AssigneeColumn;
import org.eclipse.osee.ats.internal.AtsPlugin;
@@ -44,42 +45,46 @@ public class SMAAssigneesHeader extends Composite {
setLayout(ALayout.getZeroMarginLayout(2, false));
toolkit.adapt(this);
- if (!sma.isCancelled() && !sma.isCompleted()) {
- Hyperlink link = toolkit.createHyperlink(this, TARGET_VERSION, SWT.NONE);
- link.addHyperlinkListener(new IHyperlinkListener() {
+ try {
+ if (!sma.isCancelled() && !sma.isCompleted()) {
+ Hyperlink link = toolkit.createHyperlink(this, TARGET_VERSION, SWT.NONE);
+ link.addHyperlinkListener(new IHyperlinkListener() {
- @Override
- public void linkEntered(HyperlinkEvent e) {
- // do nothing
- }
+ @Override
+ public void linkEntered(HyperlinkEvent e) {
+ // do nothing
+ }
- @Override
- public void linkExited(HyperlinkEvent e) {
- // do nothing
- }
+ @Override
+ public void linkExited(HyperlinkEvent e) {
+ // do nothing
+ }
- @Override
- public void linkActivated(HyperlinkEvent e) {
- try {
- if (!isEditable && !sma.getStateMgr().getAssignees().contains(
- UserManager.getUser(SystemUser.UnAssigned)) && !sma.getStateMgr().getAssignees().contains(
- UserManager.getUser())) {
- AWorkbench.popup(
- "ERROR",
- "You must be assigned to modify assignees.\nContact current Assignee or Select Priviledged Edit for Authorized Overriders.");
- return;
- }
- if (AssigneeColumn.promptChangeAssignees(sma, false)) {
- sma.getEditor().doSave(null);
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
+ try {
+ if (!isEditable && !sma.getStateMgr().getAssignees().contains(
+ UserManager.getUser(SystemUser.UnAssigned)) && !sma.getStateMgr().getAssignees().contains(
+ UserManager.getUser())) {
+ AWorkbench.popup(
+ "ERROR",
+ "You must be assigned to modify assignees.\nContact current Assignee or Select Priviledged Edit for Authorized Overriders.");
+ return;
+ }
+ if (AssigneeColumn.promptChangeAssignees(sma, false)) {
+ sma.getEditor().doSave(null);
+ }
+ } catch (Exception ex) {
+ OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
}
- } catch (Exception ex) {
- OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
}
- }
- });
- } else {
- Label origLabel = toolkit.createLabel(this, TARGET_VERSION);
- origLabel.setLayoutData(new GridData());
+ });
+ } else {
+ Label origLabel = toolkit.createLabel(this, TARGET_VERSION);
+ origLabel.setLayoutData(new GridData());
+ }
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
valueLabel = toolkit.createLabel(this, "Not Set");
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
index b05a0d3ab8a..a7b1147cf26 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
@@ -41,7 +41,6 @@ import org.eclipse.osee.framework.access.AccessControlManager;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.plugin.core.IActionable;
@@ -61,6 +60,7 @@ import org.eclipse.osee.framework.ui.skynet.artifact.editor.AbstractArtifactEdit
import org.eclipse.osee.framework.ui.skynet.notify.OseeNotificationManager;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -487,13 +487,17 @@ public class SMAEditor extends AbstractArtifactEditor implements ISMAEditorEvent
}
@Override
- public Collection<TaskArtifact> getTaskArtifacts(String stateName) throws OseeCoreException {
+ public Collection<TaskArtifact> getTaskArtifacts(IWorkPage state) throws OseeCoreException {
if (sma instanceof AbstractTaskableArtifact) {
- if (!Strings.isValid(stateName)) {
- return ((AbstractTaskableArtifact) sma).getTaskArtifacts();
- } else {
- return ((AbstractTaskableArtifact) sma).getTaskArtifacts(stateName);
- }
+ return ((AbstractTaskableArtifact) sma).getTaskArtifacts(state);
+ }
+ return Collections.emptyList();
+ }
+
+ @Override
+ public Collection<TaskArtifact> getTaskArtifacts() throws OseeCoreException {
+ if (sma instanceof AbstractTaskableArtifact) {
+ return ((AbstractTaskableArtifact) sma).getTaskArtifacts();
}
return Collections.emptyList();
}
@@ -505,7 +509,12 @@ public class SMAEditor extends AbstractArtifactEditor implements ISMAEditorEvent
@Override
public boolean isTasksEditable() {
- if (!(sma instanceof AbstractTaskableArtifact) || sma.isCancelledOrCompleted()) {
+ try {
+ if (!(sma instanceof AbstractTaskableArtifact) || sma.isCompletedOrCancelled()) {
+ return false;
+ }
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
return false;
}
return true;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAHistorySection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAHistorySection.java
index 6b9afeb6c40..dbd58989d24 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAHistorySection.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAHistorySection.java
@@ -10,15 +10,46 @@
*******************************************************************************/
package org.eclipse.osee.ats.editor;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
import java.util.logging.Level;
+import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
+import org.eclipse.nebula.widgets.xviewer.XViewerColumn.SortDataType;
+import org.eclipse.nebula.widgets.xviewer.XViewerFactory;
+import org.eclipse.nebula.widgets.xviewer.customize.CustomizeData;
+import org.eclipse.nebula.widgets.xviewer.customize.IXViewerCustomizations;
+import org.eclipse.nebula.widgets.xviewer.customize.XViewerCustomizations;
+import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.ats.internal.workflow.SMAState;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.DateUtil;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.eclipse.osee.framework.skynet.core.change.Change;
+import org.eclipse.osee.framework.skynet.core.revision.ChangeManager;
+import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
+import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
-import org.eclipse.osee.framework.ui.skynet.results.html.XResultsComposite;
+import org.eclipse.osee.framework.ui.skynet.results.XResultData;
+import org.eclipse.osee.framework.ui.skynet.results.table.IResultsXViewerRow;
+import org.eclipse.osee.framework.ui.skynet.results.table.ResultsEditorTableTab;
+import org.eclipse.osee.framework.ui.skynet.results.table.ResultsXViewerRow;
+import org.eclipse.osee.framework.ui.skynet.results.table.xresults.ResultsXViewer;
+import org.eclipse.osee.framework.ui.skynet.results.table.xresults.ResultsXViewerLabelProvider;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
+import org.eclipse.osee.framework.ui.swt.ALayout;
+import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -70,16 +101,13 @@ public class SMAHistorySection extends SectionPart {
AbstractWorkflowArtifact sma = editor.getSma();
final FormToolkit toolkit = getManagedForm().getToolkit();
Composite composite = toolkit.createComposite(getSection(), toolkit.getBorderStyle() | SWT.WRAP);
- composite.setLayout(new GridLayout());
+ composite.setLayout(ALayout.getZeroMarginLayout());
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- XResultsComposite xResultsComp = new XResultsComposite(composite, SWT.BORDER);
- xResultsComp.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_BEGINNING));
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 500;
- xResultsComp.setLayoutData(gd);
try {
- xResultsComp.setHtmlText(sma.getLog().getHtml(true), sma.getArtifactTypeName() + " History");
+ ResultsEditorTableTab tableTab = createLogTable(sma);
+ tableTab.createTab(composite, null);
+ tableTab.getResultsXViewer().setLabelProvider(new HistoryXViewerLabelProvider(tableTab.getResultsXViewer()));
} catch (OseeCoreException ex) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
@@ -103,5 +131,216 @@ public class SMAHistorySection extends SectionPart {
sectionCreated = true;
}
+ private static enum Columns {
+ Transaction,
+ Event,
+ State,
+ Message,
+ User,
+ Date;
+ };
+ public XViewerColumn TransactionColumn = new XViewerColumn(Columns.Transaction.name(), Columns.Transaction.name(),
+ 80, SWT.LEFT, true, SortDataType.Integer, false, "");
+
+ public ResultsEditorTableTab createLogTable(AbstractWorkflowArtifact aba) throws OseeCoreException {
+ List<XViewerColumn> columns =
+ Arrays.asList(//
+ TransactionColumn,//
+ new XViewerColumn(Columns.Event.name(), Columns.Event.name(), 100, SWT.LEFT, true, SortDataType.String,
+ false, ""),//
+ new XViewerColumn(Columns.State.name(), Columns.State.name(), 100, SWT.LEFT, true, SortDataType.String,
+ false, ""),//
+ new XViewerColumn(Columns.Message.name(), Columns.Message.name(), 180, SWT.LEFT, true, SortDataType.String,
+ false, ""),//
+ new XViewerColumn(Columns.User.name(), Columns.User.name(), 160, SWT.LEFT, true, SortDataType.String,
+ false, ""),//
+ new XViewerColumn(Columns.Date.name(), Columns.Date.name(), 150, SWT.LEFT, true, SortDataType.Date, false,
+ "")//
+ );
+
+ List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>();
+ XResultData rd = new XResultData(false);
+ fillRows(aba, rows, rd);
+
+ ResultsEditorTableTab tab = new ResultsEditorTableTab("Data", columns, rows);
+ tab.setxViewerFactory(new HistoryXViewerFactory(columns));
+ return tab;
+ }
+
+ public void fillRows(AbstractWorkflowArtifact aba, List<IResultsXViewerRow> rows, XResultData rd) throws OseeCoreException {
+ Collection<Change> changes = ChangeManager.getChangesPerArtifact(aba, null);
+ for (Change change : changes) {
+ if (change.getItemTypeName().equals(AtsAttributeTypes.CurrentState.getName())) {
+ processCurrentStateChange(change, rows, rd);
+ }
+ if (change.getItemTypeName().equals(AtsAttributeTypes.CurrentStateType.getName())) {
+ processCurrentStateTypeChange(change, rows, rd);
+ }
+ }
+ }
+
+ public void processCurrentStateTypeChange(Change change, List<IResultsXViewerRow> rows, XResultData rd) {
+ try {
+ if (change.getIsValue().equals(WorkPageType.Completed.name())) {
+ rows.add(new ResultsXViewerRow(new String[] {
+ String.valueOf(change.getTxDelta().getEndTx().getId()),
+ "Completed",
+ "",
+ "",
+ UserManager.getUserNameById(change.getTxDelta().getEndTx().getAuthor()),
+ DateUtil.getMMDDYYHHMM(change.getTxDelta().getEndTx().getTimeStamp())}));
+
+ } else if (change.getIsValue().equals(WorkPageType.Cancelled.name())) {
+ rows.add(new ResultsXViewerRow(new String[] {
+ String.valueOf(change.getTxDelta().getEndTx().getId()),
+ "Cancelled",
+ "",
+ "",
+ UserManager.getUserNameById(change.getTxDelta().getEndTx().getAuthor()),
+ DateUtil.getMMDDYYHHMM(change.getTxDelta().getEndTx().getTimeStamp())}));
+ }
+ } catch (Exception ex) {
+ rd.logError("Error processing change type" + change.toString());
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ }
+ }
+
+ public void processCurrentStateChange(Change change, List<IResultsXViewerRow> rows, XResultData rd) {
+ try {
+ SMAState was = new SMAState();
+ was.setFromXml(change.getWasValue());
+ SMAState is = new SMAState();
+ is.setFromXml(change.getIsValue());
+ if (change.getWasValue().equals("")) {
+ rows.add(new ResultsXViewerRow(new String[] {
+ String.valueOf(change.getTxDelta().getEndTx().getId()),
+ "Created",
+ is.getName(),
+ " -> " + is.getName(),
+ UserManager.getUserNameById(change.getTxDelta().getEndTx().getAuthor()),
+ DateUtil.getMMDDYYHHMM(change.getTxDelta().getEndTx().getTimeStamp())}));
+ } else if (!was.getName().equals(is.getName())) {
+ rows.add(new ResultsXViewerRow(new String[] {
+ String.valueOf(change.getTxDelta().getEndTx().getId()),
+ "Transition",
+ is.getName(),
+ was.getName() + " -> " + is.getName(),
+ UserManager.getUserNameById(change.getTxDelta().getEndTx().getAuthor()),
+ DateUtil.getMMDDYYHHMM(change.getTxDelta().getEndTx().getTimeStamp())}));
+ }
+ if (was.getName().equals(is.getName()) && (was.getPercentComplete() != is.getPercentComplete() || !was.getHoursSpentStr().equals(
+ is.getHoursSpentStr()))) {
+ rows.add(new ResultsXViewerRow(new String[] {
+ String.valueOf(change.getTxDelta().getEndTx().getId()),
+ "Metrics",
+ is.getName(),
+ "%" + is.getPercentComplete() + " - " + is.getHoursSpentStr() + " hrs",
+ UserManager.getUserNameById(change.getTxDelta().getEndTx().getAuthor()),
+ DateUtil.getMMDDYYHHMM(change.getTxDelta().getEndTx().getTimeStamp())}));
+ }
+ Collection<User> wasAssignees = was.getAssignees();
+ Collection<User> isAssignees = is.getAssignees();
+ Set<User> assigned = new HashSet<User>();
+ Set<User> unAssigned = new HashSet<User>();
+ for (User isAssignee : isAssignees) {
+ if (!wasAssignees.contains(isAssignee)) {
+ assigned.add(isAssignee);
+ }
+ }
+ for (User wasAssignee : wasAssignees) {
+ if (!isAssignees.contains(wasAssignee)) {
+ unAssigned.add(wasAssignee);
+ }
+ }
+ if (unAssigned.size() > 0) {
+ rows.add(new ResultsXViewerRow(new String[] {
+ String.valueOf(change.getTxDelta().getEndTx().getId()),
+ "UnAssigned",
+ is.getName(),
+ Artifacts.toString("; ", unAssigned),
+ UserManager.getUserNameById(change.getTxDelta().getEndTx().getAuthor()),
+ DateUtil.getMMDDYYHHMM(change.getTxDelta().getEndTx().getTimeStamp())}));
+ }
+ if (assigned.size() > 0) {
+ rows.add(new ResultsXViewerRow(new String[] {
+ String.valueOf(change.getTxDelta().getEndTx().getId()),
+ "Assigned",
+ is.getName(),
+ Artifacts.toString("; ", assigned),
+ UserManager.getUserNameById(change.getTxDelta().getEndTx().getAuthor()),
+ DateUtil.getMMDDYYHHMM(change.getTxDelta().getEndTx().getTimeStamp())}));
+ }
+ } catch (Exception ex) {
+ rd.logError("Error processing change " + change.toString());
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ }
+ }
+ // Provide own factory so can get default sorting
+ public class HistoryXViewerFactory extends XViewerFactory {
+
+ public HistoryXViewerFactory(List<XViewerColumn> columns) {
+ super("xviewer.test");
+ for (XViewerColumn xCol : columns) {
+ registerColumns(xCol);
+ }
+ }
+
+ @Override
+ public IXViewerCustomizations getXViewerCustomizations() {
+ return new XViewerCustomizations();
+ }
+
+ @Override
+ public boolean isAdmin() {
+ return true;
+ }
+
+ @Override
+ public String getNamespace() {
+ return "org.eclipse.osee.ats.history";
+ }
+
+ @Override
+ public CustomizeData getDefaultTableCustomizeData() {
+ CustomizeData customizeData = super.getDefaultTableCustomizeData();
+ for (XViewerColumn xCol : customizeData.getColumnData().getColumns()) {
+ if (xCol.getId() == TransactionColumn.getId()) {
+ xCol.setSortForward(false);
+ }
+ }
+ customizeData.getSortingData().setSortingNames(TransactionColumn.getId());
+ return customizeData;
+ }
+
+ }
+
+ public class HistoryXViewerLabelProvider extends ResultsXViewerLabelProvider {
+
+ public HistoryXViewerLabelProvider(ResultsXViewer resultsXViewer) {
+ super(resultsXViewer);
+ }
+
+ @Override
+ public Image getColumnImage(Object element, XViewerColumn col, int columnIndex) throws Exception {
+ if (col.getName().equals("Event")) {
+ String text = getColumnText(element, col, columnIndex);
+ if (text.equals("Assigned") || text.equals("UnAssigned")) {
+ return ImageManager.getImage(FrameworkImage.USERS);
+ } else if (text.equals("Metrics")) {
+ return ImageManager.getImage(FrameworkImage.GREEN_PLUS);
+ } else if (text.equals("Transition")) {
+ return ImageManager.getImage(AtsImage.TRANSITION);
+ } else if (text.equals("Created")) {
+ return ImageManager.getImage(AtsImage.ACTION);
+ } else if (text.equals("Completed")) {
+ return ImageManager.getImage(FrameworkImage.DOT_GREEN);
+ } else if (text.equals("Cancelled")) {
+ return ImageManager.getImage(FrameworkImage.X_RED);
+ }
+ }
+ return super.getColumnImage(element, col, columnIndex);
+ }
+
+ }
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java
index fb7d4884ec6..d56b671bc01 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.osee.ats.actions.AccessControlAction;
+import org.eclipse.osee.ats.actions.AtsLogHistoryAction;
import org.eclipse.osee.ats.actions.ConvertActionableItemsAction;
import org.eclipse.osee.ats.actions.DeletePurgeAtsArtifactsAction;
import org.eclipse.osee.ats.actions.DirtyReportAction;
@@ -215,6 +216,7 @@ public class SMAOperationsSection extends SectionPart {
new XButtonViaAction(new OpenInAtsWorldAction(editor.getSma())).createWidgets(sectionBody, 2);
new XButtonViaAction(new OpenInSkyWalkerAction(editor.getSma())).createWidgets(sectionBody, 2);
new XButtonViaAction(new ResourceHistoryAction(editor.getSma())).createWidgets(sectionBody, 2);
+ new XButtonViaAction(new AtsLogHistoryAction(editor.getSma())).createWidgets(sectionBody, 2);
if (editor.getSma().getParentSMA() != null) {
new XButtonViaAction(new OpenParentAction(editor.getSma())).createWidgets(sectionBody, 2);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOriginatorHeader.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOriginatorHeader.java
index 3ed2418b4f0..8996b2af47f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOriginatorHeader.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOriginatorHeader.java
@@ -61,7 +61,7 @@ public class SMAOriginatorHeader extends Composite {
public void linkActivated(HyperlinkEvent e) {
try {
if (OriginatorColumn.promptChangeOriginator(sma, true)) {
- origLabel.setText(sma.getOriginator().getName());
+ origLabel.setText(sma.getCreatedBy().getName());
origLabel.getParent().layout();
sma.getEditor().onDirtied();
}
@@ -70,19 +70,19 @@ public class SMAOriginatorHeader extends Composite {
}
}
});
- if (sma.getOriginator() == null) {
+ if (sma.getCreatedBy() == null) {
Label errorLabel = toolkit.createLabel(this, "Error: No originator identified.");
errorLabel.setForeground(Displays.getSystemColor(SWT.COLOR_RED));
} else {
- origLabel = toolkit.createLabel(this, sma.getOriginator().getName());
+ origLabel = toolkit.createLabel(this, sma.getCreatedBy().getName());
origLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
} else {
- if (sma.getOriginator() == null) {
+ if (sma.getCreatedBy() == null) {
Label errorLabel = toolkit.createLabel(this, "Error: No originator identified.");
errorLabel.setForeground(Displays.getSystemColor(SWT.COLOR_RED));
} else {
- Label origLabel = toolkit.createLabel(this, ORIGINATOR + sma.getOriginator().getName());
+ Label origLabel = toolkit.createLabel(this, ORIGINATOR + sma.getCreatedBy().getName());
origLabel.setLayoutData(new GridData());
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
index dd7fc37dbab..cad43d489c8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAPrint.java
@@ -72,15 +72,15 @@ public class SMAPrint extends Action {
resultData.addRaw(AHTML.beginMultiColumnTable(100));
resultData.addRaw(AHTML.addRowMultiColumnTable(new String[] {
//
- AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Current State: ", sma.getState()),
+ AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Current State: ", sma.getCurrentStateName()),
//
AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Team: ", TeamColumn.getName(sma)),
//
AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Assignees: ", ((IWorldViewArtifact) sma).getAssigneeStr()),
//
- AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Originator: ", sma.getOriginatorStr()),
+ AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Originator: ", sma.getCreatedBy().getName()),
//
- AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Created: ", DateUtil.getMMDDYYHHMM(sma.getLog().getCreationDate()))
+ AHTML.getLabelValueStr(AHTML.LABEL_FONT, "Created: ", DateUtil.getMMDDYYHHMM(sma.getCreatedDate()))
}));
resultData.addRaw(AHTML.endMultiColumnTable());
@@ -153,9 +153,9 @@ public class SMAPrint extends Action {
private void getWorkFlowHtml(XResultData rd) throws OseeCoreException {
// Only display current or past states
for (AtsWorkPage atsWorkPage : sma.getAtsWorkPages()) {
- if (sma.isCurrentState(atsWorkPage.getName()) || sma.getStateMgr().isStateVisited(atsWorkPage.getName())) {
+ if (sma.isInState(atsWorkPage) || sma.getStateMgr().isStateVisited(atsWorkPage)) {
// Don't show completed or cancelled state if not currently those state
- if (atsWorkPage.isCompletePage() && !sma.isCompleted()) {
+ if (atsWorkPage.isCompletedPage() && !sma.isCompleted()) {
continue;
}
if (atsWorkPage.isCancelledPage() && !sma.isCancelled()) {
@@ -163,15 +163,14 @@ public class SMAPrint extends Action {
}
StringBuffer notesSb = new StringBuffer();
for (NoteItem note : sma.getNotes().getNoteItems()) {
- if (note.getState().equals(atsWorkPage.getName())) {
+ if (note.getState().equals(atsWorkPage.getPageName())) {
notesSb.append(note.toHTML());
notesSb.append(AHTML.newline());
}
}
- if (sma.isCurrentState(atsWorkPage.getName()) || sma.getStateMgr().isStateVisited(atsWorkPage.getName()) && sma.isTeamWorkflow()) {
+ if (sma.isInState(atsWorkPage) || sma.getStateMgr().isStateVisited(atsWorkPage) && sma.isTeamWorkflow()) {
atsWorkPage.generateLayoutDatas(sma);
- rd.addRaw(atsWorkPage.getHtml(
- sma.isCurrentState(atsWorkPage.getName()) ? AtsUtil.activeColor : AtsUtil.normalColor,
+ rd.addRaw(atsWorkPage.getHtml(sma.isInState(atsWorkPage) ? AtsUtil.activeColor : AtsUtil.normalColor,
notesSb.toString(), getStateHoursSpentHtml(atsWorkPage) + getReviewData(sma, atsWorkPage)));
rd.addRaw(AHTML.newline());
}
@@ -181,14 +180,14 @@ public class SMAPrint extends Action {
private String getReviewData(AbstractWorkflowArtifact sma, AtsWorkPage page) throws OseeCoreException {
if (sma instanceof TeamWorkFlowArtifact) {
- return ReviewInfoXWidget.toHTML((TeamWorkFlowArtifact) sma, page.getName());
+ return ReviewInfoXWidget.toHTML((TeamWorkFlowArtifact) sma, page);
}
return "";
}
private String getStateHoursSpentHtml(WorkPage page) throws OseeCoreException {
return AHTML.getLabelValueStr("State Hours Spent",
- AtsUtil.doubleToI18nString(sma.getStateMgr().getHoursSpent(page.getName())) + "<br>");
+ AtsUtil.doubleToI18nString(sma.getStateMgr().getHoursSpent(page)) + "<br>");
}
public boolean isIncludeTaskList() {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMARelationsHyperlinkComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMARelationsHyperlinkComposite.java
index 8afa0fb4d58..aa14fc45731 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMARelationsHyperlinkComposite.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMARelationsHyperlinkComposite.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.ats.editor;
+import java.util.logging.Level;
import org.eclipse.osee.ats.AtsOpenOption;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
@@ -108,8 +109,8 @@ public class SMARelationsHyperlinkComposite extends Composite {
return false;
}
- private String getCompletedCancelledString(Artifact art) {
- if (art instanceof AbstractWorkflowArtifact && ((AbstractWorkflowArtifact) art).isCancelledOrCompleted()) {
+ private String getCompletedCancelledString(Artifact art) throws OseeCoreException {
+ if (art instanceof AbstractWorkflowArtifact && ((AbstractWorkflowArtifact) art).isCompletedOrCancelled()) {
return " " + ((AbstractWorkflowArtifact) art).getStateMgr().getCurrentStateName() + " ";
}
return "";
@@ -126,39 +127,42 @@ public class SMARelationsHyperlinkComposite extends Composite {
}
private void createLink(final Artifact art, String prefix, String action, Artifact thisArt) {
- toolkit.createLabel(
- this,
- prefix + " \"" + thisArt.getArtifactTypeName() + "\" " + action + getCompletedCancelledString(art) + " \"" + art.getArtifactTypeName() + "\" ");
- Hyperlink link =
- toolkit.createHyperlink(this, String.format("\"%s\" - %s",
- art.getName().length() < 60 ? art.getName() : art.getName().substring(0, 60), art.getHumanReadableId()),
- SWT.NONE);
- link.addHyperlinkListener(new IHyperlinkListener() {
-
- @Override
- public void linkEntered(HyperlinkEvent e) {
- // do nothing
- }
+ try {
+ toolkit.createLabel(
+ this,
+ prefix + " \"" + thisArt.getArtifactTypeName() + "\" " + action + getCompletedCancelledString(art) + " \"" + art.getArtifactTypeName() + "\" ");
+ Hyperlink link =
+ toolkit.createHyperlink(this, String.format("\"%s\" - %s",
+ art.getName().length() < 60 ? art.getName() : art.getName().substring(0, 60), art.getHumanReadableId()),
+ SWT.NONE);
+ link.addHyperlinkListener(new IHyperlinkListener() {
+
+ @Override
+ public void linkEntered(HyperlinkEvent e) {
+ // do nothing
+ }
- @Override
- public void linkExited(HyperlinkEvent e) {
- // do nothing
- }
+ @Override
+ public void linkExited(HyperlinkEvent e) {
+ // do nothing
+ }
- @Override
- public void linkActivated(HyperlinkEvent e) {
- if (art instanceof IATSArtifact) {
- AtsUtil.openATSAction(art, AtsOpenOption.OpenOneOrPopupSelect);
- } else {
- try {
- RendererManager.open(art, PresentationType.DEFAULT_OPEN);
- } catch (OseeCoreException ex) {
- OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
+ if (art instanceof IATSArtifact) {
+ AtsUtil.openATSAction(art, AtsOpenOption.OpenOneOrPopupSelect);
+ } else {
+ try {
+ RendererManager.open(art, PresentationType.DEFAULT_OPEN);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
+ }
}
}
- }
- });
-
+ });
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ }
}
private void processReviewArtifact(final AbstractReviewArtifact reviewArt) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
index c70d0f6e1f9..8e0fa214a1f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java
@@ -28,7 +28,6 @@ import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.log.LogItem;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.editor.stateItem.AtsStateItemManager;
import org.eclipse.osee.ats.editor.stateItem.IAtsStateItem;
import org.eclipse.osee.ats.editor.widget.ReviewInfoXWidget;
@@ -37,16 +36,16 @@ import org.eclipse.osee.ats.editor.widget.StatePercentCompleteXWidget;
import org.eclipse.osee.ats.editor.widget.TaskInfoXWidget;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
import org.eclipse.osee.ats.util.XCancellationReasonTextWidget;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.ats.util.widgets.dialog.SMAStatusDialog;
import org.eclipse.osee.ats.workflow.AtsWorkPage;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.core.data.SystemUser;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeStateException;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -65,6 +64,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
import org.eclipse.osee.framework.ui.skynet.widgets.dialog.EntryDialog;
import org.eclipse.osee.framework.ui.skynet.widgets.dialog.UserCheckTreeDialog;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayout;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinitionLabelProvider;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinitionViewSorter;
@@ -116,7 +116,7 @@ public class SMAWorkFlowSection extends SectionPart {
isEditable = isEditable(sma, page);
isGlobalEditable =
!sma.isReadOnly() && sma.isAccessControlWrite() && sma.getEditor().isPriviledgedEditModeEnabled();
- isCurrentState = sma.isCurrentState(page.getName());
+ isCurrentState = sma.isInState(page);
// parent.setBackground(Displays.getSystemColor(SWT.COLOR_CYAN));
}
@@ -127,14 +127,14 @@ public class SMAWorkFlowSection extends SectionPart {
section = getSection();
try {
section.setText(getCurrentStateTitle());
- if (sma.isCurrentState(atsWorkPage.getName())) {
+ if (sma.isInState(atsWorkPage)) {
section.setTitleBarForeground(Displays.getSystemColor(SWT.COLOR_DARK_GREEN));
section.setBackground(AtsUtil.ACTIVE_COLOR);
}
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
// section.setBackground(Displays.getSystemColor(SWT.COLOR_MAGENTA));
- boolean isCurrentSectionExpanded = isCurrentSectionExpanded(atsWorkPage.getName());
+ boolean isCurrentSectionExpanded = isCurrentSectionExpanded(atsWorkPage);
if (isCurrentSectionExpanded) {
createSection(section);
@@ -162,8 +162,8 @@ public class SMAWorkFlowSection extends SectionPart {
/**
* Override to apply different algorithm to current section expansion.
*/
- public boolean isCurrentSectionExpanded(String stateName) {
- return sma.getStateMgr().getCurrentStateName().equals(stateName);
+ public boolean isCurrentSectionExpanded(IWorkPage state) {
+ return sma.isInState(state);
}
private synchronized void createSection(Section section) throws OseeCoreException {
@@ -177,7 +177,7 @@ public class SMAWorkFlowSection extends SectionPart {
// mainComp.setBackground(Displays.getSystemColor(SWT.COLOR_DARK_YELLOW));
mainComp.layout();
- SMAWorkFlowTab.createStateNotesHeader(mainComp, toolkit, sma, 2, atsWorkPage.getName());
+ SMAWorkFlowTab.createStateNotesHeader(mainComp, toolkit, sma, 2, atsWorkPage.getPageName());
Composite workComp = createWorkArea(mainComp, atsWorkPage, toolkit);
@@ -211,14 +211,14 @@ public class SMAWorkFlowSection extends SectionPart {
}
}
- if (atsWorkPage.isCompleteCancelledState()) {
+ if (atsWorkPage.isCompletedOrCancelledPage()) {
Composite completeComp = new Composite(workComp, SWT.None);
GridLayout layout = new GridLayout(1, false);
completeComp.setLayout(layout);
completeComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
if (atsWorkPage.isCancelledPage()) {
createCancelledPageWidgets(completeComp);
- } else if (atsWorkPage.isCompletePage()) {
+ } else if (atsWorkPage.isCompletedPage()) {
createCompletedPageWidgets(completeComp);
}
}
@@ -240,8 +240,8 @@ public class SMAWorkFlowSection extends SectionPart {
}
}
- createTaskFooter(workComp, atsWorkPage.getName());
- createReviewFooter(workComp, atsWorkPage.getName());
+ createTaskFooter(workComp, atsWorkPage);
+ createReviewFooter(workComp, atsWorkPage);
// Set all XWidget labels to bold font
for (XWidget xWidget : allXWidgets) {
@@ -264,7 +264,7 @@ public class SMAWorkFlowSection extends SectionPart {
private void createCancelledPageWidgets(Composite parent) throws OseeCoreException {
XWidget xWidget = null;
- xWidget = new XLabelValue("Cancelled from State", sma.getLog().getCancelledFromState());
+ xWidget = new XLabelValue("Cancelled from State", sma.getCancelledFromState());
xWidget.createWidgets(parent, 1);
allXWidgets.add(xWidget);
@@ -272,7 +272,7 @@ public class SMAWorkFlowSection extends SectionPart {
xWidget = new XCancellationReasonTextWidget(sma);
xWidget.addXModifiedListener(xModListener);
} else {
- xWidget = new XLabelValue("Cancellation Reason", sma.getLog().getCancellationReason());
+ xWidget = new XLabelValue("Cancellation Reason", sma.getCancelledReason());
}
xWidget.createWidgets(parent, 1);
allXWidgets.add(xWidget);
@@ -280,13 +280,13 @@ public class SMAWorkFlowSection extends SectionPart {
private void createCompletedPageWidgets(Composite parent) throws OseeCoreException {
XWidget xWidget = null;
- xWidget = new XLabelValue("Completed from State", sma.getLog().getCompletedFromState());
+ xWidget = new XLabelValue("Completed from State", sma.getCompletedFromState());
xWidget.createWidgets(parent, 1);
allXWidgets.add(xWidget);
}
private void createMetricsHeader(Composite parent) {
- if (!atsWorkPage.isCompleteCancelledState()) {
+ if (!atsWorkPage.isCompletedOrCancelledPage()) {
Composite comp = new Composite(parent, SWT.None);
GridLayout layout = ALayout.getZeroMarginLayout(4, false);
layout.marginLeft = 2;
@@ -299,24 +299,23 @@ public class SMAWorkFlowSection extends SectionPart {
}
}
- private void createReviewFooter(Composite parent, String forStateName) {
+ private void createReviewFooter(Composite parent, IWorkPage forState) {
if (isShowReviewInfo() && sma.isTeamWorkflow()) {
Composite comp = new Composite(parent, SWT.None);
GridLayout layout = new GridLayout(1, false);
comp.setLayout(layout);
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- allXWidgets.add(new ReviewInfoXWidget(getManagedForm(), toolkit, (TeamWorkFlowArtifact) sma, forStateName,
- comp, 1));
+ allXWidgets.add(new ReviewInfoXWidget(getManagedForm(), toolkit, (TeamWorkFlowArtifact) sma, forState, comp, 1));
}
}
- private void createTaskFooter(Composite parent, String forStateName) {
+ private void createTaskFooter(Composite parent, IWorkPage state) {
if (sma instanceof AbstractTaskableArtifact) {
Composite comp = new Composite(parent, SWT.None);
GridLayout layout = new GridLayout(6, false);
comp.setLayout(layout);
comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- allXWidgets.add(new TaskInfoXWidget(getManagedForm(), ((AbstractTaskableArtifact) sma), forStateName, comp, 2));
+ allXWidgets.add(new TaskInfoXWidget(getManagedForm(), ((AbstractTaskableArtifact) sma), state, comp, 2));
}
}
@@ -366,20 +365,16 @@ public class SMAWorkFlowSection extends SectionPart {
}
private String getCurrentStateTitle() throws OseeCoreException {
- StringBuffer sb = new StringBuffer(atsWorkPage.getName());
+ StringBuffer sb = new StringBuffer(atsWorkPage.getPageName());
if (isEditable && !sma.isCompleted() && !sma.isCancelled()) {
sb.append(" - Current State");
}
if (sma.isCancelled()) {
- LogItem item = sma.getLog().getStateEvent(LogType.StateCancelled);
- if (item == null) {
- throw new OseeStateException("ats.Log: Cancelled state has no logItem for [%s]", sma.getGuid());
- }
- if (item.getState().equals(atsWorkPage.getName())) {
+ if (atsWorkPage.isCancelledPage()) {
sb.append(" - Cancelled");
- if (!item.getMsg().equals("")) {
+ if (Strings.isValid(sma.getCancelledReason())) {
sb.append(" - Reason: ");
- sb.append(item.getMsg());
+ sb.append(Strings.isValid(sma.getCancelledReason()));
}
}
}
@@ -387,13 +382,13 @@ public class SMAWorkFlowSection extends SectionPart {
if (sma.isCompleted()) {
sb.append(" - ");
sb.append(DateUtil.getMMDDYYHHMM(sma.getCompletedDate()));
- LogItem item = sma.getLog().getStateEvent(LogType.StateEntered, atsWorkPage.getName());
+ LogItem item = sma.getStateStartedData(atsWorkPage);
sb.append(" by ");
sb.append(item.getUser().getName());
} else if (sma.isCancelled()) {
sb.append(" - ");
- sb.append(DateUtil.getMMDDYYHHMM(sma.getCancelledDate()));
- LogItem item = sma.getLog().getStateEvent(LogType.StateEntered, atsWorkPage.getName());
+ sb.append(DateUtil.getMMDDYYHHMM(sma.internalGetCancelledDate()));
+ LogItem item = sma.getStateStartedData(atsWorkPage);
sb.append(" by ");
sb.append(item.getUser().getName());
}
@@ -402,7 +397,7 @@ public class SMAWorkFlowSection extends SectionPart {
sb.append(sma.getStateMgr().getAssigneesStr(80));
}
} else {
- LogItem item = sma.getLog().getStateEvent(LogType.StateComplete, atsWorkPage.getName());
+ LogItem item = sma.getStateCompletedData(atsWorkPage);
if (item != null) {
sb.append(" - State Completed ");
sb.append(item.getDate(DateUtil.MMDDYYHHMM));
@@ -478,7 +473,7 @@ public class SMAWorkFlowSection extends SectionPart {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "No Transition State Selected");
return;
}
- if (toWorkPage.isCancelledPage() || toWorkPage.isCompletePage()) {
+ if (toWorkPage.isCancelledPage() || toWorkPage.isCompletedPage()) {
AWorkbench.popup("ERROR", "No Assignees in Completed and Cancelled states");
return;
}
@@ -538,12 +533,13 @@ public class SMAWorkFlowSection extends SectionPart {
defaultPage.add(atsWorkPage.getDefaultToPage());
transitionToStateCombo.setSelected(defaultPage);
}
- if (atsWorkPage.isCancelledPage()) {
- LogItem item = sma.getLog().getStateEvent(LogType.StateCancelled);
- if (item != null) {
- defaultPage.add(sma.getWorkPageDefinitionByName(item.getState()));
- transitionToStateCombo.setSelected(defaultPage);
- }
+ if (atsWorkPage.isCancelledPage() && Strings.isValid(sma.getCancelledFromState())) {
+ defaultPage.add(sma.getWorkPageDefinitionByName(sma.getCancelledFromState()));
+ transitionToStateCombo.setSelected(defaultPage);
+ }
+ if (atsWorkPage.isCompletedPage() && Strings.isValid(sma.getCompletedFromState())) {
+ defaultPage.add(sma.getWorkPageDefinitionByName(sma.getCompletedFromState()));
+ transitionToStateCombo.setSelected(defaultPage);
}
// Update transition based on state items
updateTransitionToState();
@@ -674,7 +670,7 @@ public class SMAWorkFlowSection extends SectionPart {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "No Transition State Selected");
return;
}
- if (toWorkPageDefinition.getPageName().equals(DefaultTeamState.Cancelled.name())) {
+ if (toWorkPageDefinition.isCancelledPage()) {
handleTransitionToCancelled();
return;
}
@@ -690,10 +686,13 @@ public class SMAWorkFlowSection extends SectionPart {
// Get transition to assignees
Collection<User> toAssignees;
- if (toWorkPageDefinition.isCancelledPage() || toWorkPageDefinition.isCompletePage()) {
+ if (toWorkPageDefinition.isCancelledPage() || toWorkPageDefinition.isCompletedPage()) {
toAssignees = new HashSet<User>();
} else {
toAssignees = sma.getTransitionAssignees();
+ if (toAssignees.isEmpty()) {
+ toAssignees.add(UserManager.getUser());
+ }
}
// If this is a return transition, don't require page/tasks to be complete
@@ -706,8 +705,9 @@ public class SMAWorkFlowSection extends SectionPart {
// Perform transition separate from persist of previous changes to state machine artifact
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "ATS Transition");
+ TransitionManager transitionMgr = new TransitionManager(sma);
Result result =
- sma.transition(toWorkPageDefinition.getPageName(), toAssignees, transaction, TransitionOption.Persist);
+ transitionMgr.transition(toWorkPageDefinition, toAssignees, transaction, TransitionOption.Persist);
transaction.execute();
if (result.isFalse()) {
result.popup();
@@ -729,7 +729,7 @@ public class SMAWorkFlowSection extends SectionPart {
}
// Loop through this state's tasks to confirm complete
- if (sma instanceof AbstractTaskableArtifact && !sma.isCancelledOrCompleted()) {
+ if (sma instanceof AbstractTaskableArtifact && !sma.isCompletedOrCancelled()) {
for (TaskArtifact taskArt : ((AbstractTaskableArtifact) sma).getTaskArtifactsFromCurrentState()) {
if (taskArt.isInWork()) {
AWorkbench.popup("Transition Blocked",
@@ -757,7 +757,7 @@ public class SMAWorkFlowSection extends SectionPart {
// Loop through this state's blocking reviews to confirm complete
if (sma.isTeamWorkflow()) {
for (AbstractReviewArtifact reviewArt : ReviewManager.getReviewsFromCurrentState((TeamWorkFlowArtifact) sma)) {
- if (reviewArt.getReviewBlockType() == ReviewBlockType.Transition && !reviewArt.isCancelledOrCompleted()) {
+ if (reviewArt.getReviewBlockType() == ReviewBlockType.Transition && !reviewArt.isCompletedOrCancelled()) {
AWorkbench.popup("Transition Blocked", "All Blocking Reviews must be completed before transition.");
return false;
}
@@ -767,9 +767,7 @@ public class SMAWorkFlowSection extends SectionPart {
// Check extension points for valid transition
for (IAtsStateItem item : AtsStateItemManager.getStateItems(atsWorkPage.getId())) {
try {
- result =
- item.transitioning(sma, sma.getStateMgr().getCurrentStateName(), toWorkPageDefinition.getPageName(),
- toAssignees);
+ result = item.transitioning(sma, sma.getStateMgr().getCurrentState(), toWorkPageDefinition, toAssignees);
if (result.isFalse()) {
result.popup();
return false;
@@ -792,7 +790,9 @@ public class SMAWorkFlowSection extends SectionPart {
return;
}
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "ATS Transition to Cancelled");
- Result result = sma.transitionToCancelled(cancelDialog.getEntry(), transaction, TransitionOption.Persist);
+ TransitionManager transitionMgr = new TransitionManager(sma);
+ Result result =
+ transitionMgr.transitionToCancelled(cancelDialog.getEntry(), transaction, TransitionOption.Persist);
transaction.execute();
if (result.isFalse()) {
result.popup();
@@ -806,7 +806,7 @@ public class SMAWorkFlowSection extends SectionPart {
if (sma.isTeamWorkflow() && ((TeamWorkFlowArtifact) sma).getBranchMgr().isWorkingBranchInWork()) {
if (((WorkPageDefinition) transitionToStateCombo.getSelected()).getPageName().equals(
- DefaultTeamState.Cancelled.name())) {
+ TeamState.Cancelled.getPageName())) {
AWorkbench.popup("Transition Blocked",
"Working Branch exists.\n\nPlease delete working branch before transition to cancel.");
return false;
@@ -862,7 +862,7 @@ public class SMAWorkFlowSection extends SectionPart {
}
public int getCreationToNowDateDeltaMinutes() throws OseeCoreException {
- Date createDate = sma.getLog().getStateEvent(LogType.StateEntered, atsWorkPage.getName()).getDate();
+ Date createDate = sma.getStateStartedData(atsWorkPage).getDate();
long createDateLong = createDate.getTime();
Date date = new Date();
float diff = date.getTime() - createDateLong;
@@ -904,7 +904,7 @@ public class SMAWorkFlowSection extends SectionPart {
// and access control writeable
sma.isAccessControlWrite() &&
// and current state
- (page == null || sma.isCurrentState(page.getName())) &&
+ (page == null || sma.isInState(page)) &&
// and one of these
//
// page is define to allow anyone to edit
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java
index e4482d2e516..b5e1b20245c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java
@@ -308,9 +308,9 @@ public class SMAWorkFlowTab extends FormPage implements IActionable {
// Only display current or past states
for (AtsWorkPage atsWorkPage : sma.getAtsWorkPages()) {
try {
- if (sma.isCurrentState(atsWorkPage.getName()) || sma.getStateMgr().isStateVisited(atsWorkPage.getName())) {
+ if (sma.isInState(atsWorkPage) || sma.getStateMgr().isStateVisited(atsWorkPage)) {
// Don't show completed or cancelled state if not currently those state
- if (atsWorkPage.isCompletePage() && !sma.isCompleted()) {
+ if (atsWorkPage.isCompletedPage() && !sma.isCompleted()) {
continue;
}
if (atsWorkPage.isCancelledPage() && !sma.isCancelled()) {
@@ -397,7 +397,7 @@ public class SMAWorkFlowTab extends FormPage implements IActionable {
// Current Assignees
if (isCurrentNonCompleteCanceledState) {
- boolean editable = !sma.isCancelledOrCompleted() && !sma.isReadOnly() &&
+ boolean editable = !sma.isCompletedOrCancelled() && !sma.isReadOnly() &&
// and access control writeable
sma.isAccessControlWrite() && //
@@ -583,8 +583,7 @@ public class SMAWorkFlowTab extends FormPage implements IActionable {
try {
FormsUtil.createLabelText(toolkit, topLineComp, "Current State: ", sma.getStateMgr().getCurrentStateName());
- FormsUtil.createLabelText(toolkit, topLineComp, "Created: ",
- DateUtil.getMMDDYYHHMM(sma.getLog().getCreationDate()));
+ FormsUtil.createLabelText(toolkit, topLineComp, "Created: ", DateUtil.getMMDDYYHHMM(sma.getCreatedDate()));
} catch (OseeCoreException ex) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java
index cbb6ea71ad2..b9e180a2911 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java
@@ -16,6 +16,7 @@ import java.util.List;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
import org.eclipse.osee.ats.editor.SMAWorkFlowSection;
import org.eclipse.osee.ats.util.widgets.DecisionOption;
import org.eclipse.osee.ats.util.widgets.XDecisionOptions;
@@ -72,9 +73,9 @@ public class AtsDecisionReviewDecisionStateItem extends AtsStateItem {
return null;
}
if (followUpRequired) {
- return DecisionReviewArtifact.DecisionReviewState.Followup.name();
+ return DecisionReviewState.Followup.getPageName();
} else {
- return DecisionReviewArtifact.DecisionReviewState.Completed.name();
+ return DecisionReviewState.Completed.getPageName();
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewPrepareStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewPrepareStateItem.java
index ae4b0bcab9a..51a9aa48d59 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewPrepareStateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewPrepareStateItem.java
@@ -11,12 +11,13 @@
package org.eclipse.osee.ats.editor.stateItem;
import java.util.Collection;
-import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
import org.eclipse.osee.ats.util.widgets.XDecisionOptions;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
/**
* @author Donald G. Dunne
@@ -29,8 +30,9 @@ public class AtsDecisionReviewPrepareStateItem extends AtsStateItem {
}
@Override
- public Result transitioning(AbstractWorkflowArtifact sma, String fromState, String toState, Collection<User> toAssignees) throws OseeCoreException {
- if (fromState.equals(DecisionReviewArtifact.DecisionReviewState.Prepare.name()) && toState.equals(DecisionReviewArtifact.DecisionReviewState.Decision.name())) {
+ public Result transitioning(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees) throws OseeCoreException {
+ if (fromState.getPageName().equals(DecisionReviewState.Prepare.getPageName()) && toState.getPageName().equals(
+ DecisionReviewState.Decision.getPageName())) {
XDecisionOptions decOptions = new XDecisionOptions(sma);
return decOptions.validateDecisionOptions();
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItem.java
index 16dd5edca16..2f2259ee6ee 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsForceAssigneesToTeamLeadsStateItem.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
/**
* @author Donald G. Dunne
@@ -32,9 +33,9 @@ public class AtsForceAssigneesToTeamLeadsStateItem extends AtsStateItem {
}
@Override
- public void transitioned(AbstractWorkflowArtifact sma, String fromState, String toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
+ public void transitioned(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
super.transitioned(sma, fromState, toState, toAssignees, transaction);
- if (sma.isTeamWorkflow() && AtsWorkDefinitions.isForceAssigneesToTeamLeads(sma.getWorkPageDefinitionByName(toState))) {
+ if (sma.isTeamWorkflow() && AtsWorkDefinitions.isForceAssigneesToTeamLeads(sma.getWorkPageDefinitionByName(toState.getPageName()))) {
// Set Assignees to all user roles users
try {
Collection<User> teamLeads = ((TeamWorkFlowArtifact) sma).getTeamDefinition().getLeads();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsHandleAddReviewRuleStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsHandleAddReviewRuleStateItem.java
index ca82f02fdc7..e16f68d6272 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsHandleAddReviewRuleStateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsHandleAddReviewRuleStateItem.java
@@ -12,19 +12,23 @@ package org.eclipse.osee.ats.editor.stateItem;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
+import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
-import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.workflow.item.AtsAddDecisionReviewRule;
import org.eclipse.osee.ats.workflow.item.AtsAddDecisionReviewRule.DecisionParameter;
import org.eclipse.osee.ats.workflow.item.AtsAddDecisionReviewRule.DecisionRuleOption;
import org.eclipse.osee.ats.workflow.item.AtsAddPeerToPeerReviewRule;
import org.eclipse.osee.ats.workflow.item.StateEventType;
+import org.eclipse.osee.framework.core.data.SystemUser;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkRuleDefinition;
/**
@@ -38,7 +42,7 @@ public class AtsHandleAddReviewRuleStateItem extends AtsStateItem {
}
@Override
- public void transitioned(AbstractWorkflowArtifact sma, String fromState, String toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
+ public void transitioned(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
super.transitioned(sma, fromState, toState, toAssignees, transaction);
// Create any decision or peerToPeer reviews for transitionTo and transitionFrom
@@ -47,7 +51,9 @@ public class AtsHandleAddReviewRuleStateItem extends AtsStateItem {
}
}
- public static void runRule(AbstractWorkflowArtifact sma, String toState, String ruleId, SkynetTransaction transaction) throws OseeCoreException {
+ public static void runRule(AbstractWorkflowArtifact sma, IWorkPage toState, String ruleId, SkynetTransaction transaction) throws OseeCoreException {
+ Date createdDate = new Date();
+ User createdBy = UserManager.getUser(SystemUser.OseeSystem);
for (WorkRuleDefinition workRuleDef : sma.getWorkRulesStartsWith(ruleId)) {
if (!sma.isTeamWorkflow()) {
continue;
@@ -57,11 +63,11 @@ public class AtsHandleAddReviewRuleStateItem extends AtsStateItem {
if (!Strings.isValid(forState)) {
continue;
}
- if (eventType != null && toState.equals(forState) && eventType == StateEventType.TransitionTo) {
+ if (eventType != null && toState.getPageName().equals(forState) && eventType == StateEventType.TransitionTo) {
if (ruleId.startsWith(AtsAddDecisionReviewRule.ID)) {
DecisionReviewArtifact decArt =
AtsAddDecisionReviewRule.createNewDecisionReview(workRuleDef, transaction,
- (TeamWorkFlowArtifact) sma, DecisionRuleOption.TransitionToDecision);
+ (TeamWorkFlowArtifact) sma, createdDate, createdBy, DecisionRuleOption.TransitionToDecision);
if (decArt != null) {
decArt.persist(transaction);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsLogWorkPage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsLogWorkPage.java
index 9609ff53831..7355b38e4d5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsLogWorkPage.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsLogWorkPage.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.editor.stateItem;
import org.eclipse.osee.ats.workflow.AtsWorkPage;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -30,7 +31,8 @@ public class AtsLogWorkPage extends AtsWorkPage {
}
public AtsLogWorkPage(String title) {
- super(new EmptyWorkFlowDefinition(title, PAGE_ID), new WorkPageDefinition(title, PAGE_ID, null), null, null);
+ super(new EmptyWorkFlowDefinition(title, PAGE_ID), new WorkPageDefinition(title, PAGE_ID, null,
+ WorkPageType.Working), null, null);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java
index 3570d4e7931..9c5ab034ecc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java
@@ -13,12 +13,14 @@ package org.eclipse.osee.ats.editor.stateItem;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
-import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
+import org.eclipse.osee.ats.artifact.PeerToPeerReviewState;
import org.eclipse.osee.ats.util.widgets.role.UserRole;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
/**
* @author Donald G. Dunne
@@ -31,9 +33,9 @@ public class AtsPeerToPeerReviewReviewStateItem extends AtsStateItem {
}
@Override
- public void transitioned(AbstractWorkflowArtifact sma, String fromState, String toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
+ public void transitioned(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
super.transitioned(sma, fromState, toState, toAssignees, transaction);
- if (!toState.equals(PeerToPeerReviewArtifact.PeerToPeerReviewState.Review.name())) {
+ if (!toState.getPageName().equals(PeerToPeerReviewState.Review.getPageName())) {
return;
}
// Set Assignees to all user roles users
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItem.java
index 8058a2c6fd3..af60dcf0524 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItem.java
@@ -24,6 +24,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.widgets.XModifiedListener;
import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
@@ -90,13 +91,13 @@ public abstract class AtsStateItem implements IAtsStateItem {
@SuppressWarnings("unused")
@Override
- public void transitioned(AbstractWorkflowArtifact sma, String fromState, String toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
+ public void transitioned(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException {
// provided for subclass implementation
}
@SuppressWarnings("unused")
@Override
- public Result transitioning(AbstractWorkflowArtifact sma, String fromState, String toState, Collection<User> toAssignees) throws OseeCoreException {
+ public Result transitioning(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees) throws OseeCoreException {
return Result.TrueResult;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/IAtsStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/IAtsStateItem.java
index b2c3da3848d..99608d112b2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/IAtsStateItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/IAtsStateItem.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.widgets.XModifiedListener;
import org.eclipse.osee.framework.ui.skynet.widgets.XWidget;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.ui.forms.widgets.FormToolkit;
/**
@@ -52,9 +53,9 @@ public interface IAtsStateItem {
/**
* @return Result of operation. If Result.isFalse(), transition will not continue and Result.popup will occur.
*/
- public Result transitioning(AbstractWorkflowArtifact sma, String fromState, String toState, Collection<User> toAssignees) throws OseeCoreException;
+ public Result transitioning(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees) throws OseeCoreException;
- public void transitioned(AbstractWorkflowArtifact sma, String fromState, String toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException;
+ public void transitioned(AbstractWorkflowArtifact sma, IWorkPage fromState, IWorkPage toState, Collection<User> toAssignees, SkynetTransaction transaction) throws OseeCoreException;
/**
* @return Result of operation. If Result.isFalse(), commit will not continue and Result.popup will occur.
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
index ad939a9b163..03d7aa97022 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.editor.widget;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import org.eclipse.core.runtime.jobs.Job;
@@ -29,6 +30,7 @@ import org.eclipse.osee.ats.util.Overview;
import org.eclipse.osee.ats.util.TransitionOption;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.ats.util.widgets.dialog.StateListAndTitleDialog;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -40,6 +42,7 @@ import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.XFormToolkit;
import org.eclipse.osee.framework.ui.skynet.widgets.XLabelValueBase;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.swt.ALayout;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.swt.SWT;
@@ -59,7 +62,7 @@ import org.eclipse.ui.forms.widgets.Hyperlink;
*/
public class ReviewInfoXWidget extends XLabelValueBase {
- private final String forStateName;
+ private final IWorkPage forState;
private final List<Label> labelWidgets = new ArrayList<Label>();
private Composite destroyableComposite = null;
private final Composite composite;
@@ -68,12 +71,12 @@ public class ReviewInfoXWidget extends XLabelValueBase {
private final XFormToolkit toolkit;
private final TeamWorkFlowArtifact teamArt;
- public ReviewInfoXWidget(IManagedForm managedForm, XFormToolkit toolkit, final TeamWorkFlowArtifact teamArt, final String forStateName, Composite composite, int horizontalSpan) {
- super("\"" + forStateName + "\" State Reviews");
+ public ReviewInfoXWidget(IManagedForm managedForm, XFormToolkit toolkit, final TeamWorkFlowArtifact teamArt, final IWorkPage forState, Composite composite, int horizontalSpan) {
+ super("\"" + forState.getPageName() + "\" State Reviews");
this.managedForm = managedForm;
this.toolkit = toolkit;
this.teamArt = teamArt;
- this.forStateName = forStateName;
+ this.forState = forState;
this.composite = composite;
this.horizontalSpan = horizontalSpan;
reDisplay();
@@ -94,7 +97,7 @@ public class ReviewInfoXWidget extends XLabelValueBase {
try {
addAdminRightClickOption();
- Collection<AbstractReviewArtifact> revArts = ReviewManager.getReviews(teamArt, forStateName);
+ Collection<AbstractReviewArtifact> revArts = ReviewManager.getReviews(teamArt, forState);
if (revArts.isEmpty()) {
setValueText("No Reviews Created");
}
@@ -119,7 +122,7 @@ public class ReviewInfoXWidget extends XLabelValueBase {
new StateListAndTitleDialog("Create Decision Review",
"Select state to that review will be associated with.",
teamArt.getWorkFlowDefinition().getPageNames());
- dialog.setInitialSelections(new Object[] {forStateName});
+ dialog.setInitialSelections(new Object[] {forState.getPageName()});
if (dialog.open() == 0) {
if (!Strings.isValid(dialog.getReviewTitle())) {
AWorkbench.popup("ERROR", "Must enter review title");
@@ -127,7 +130,8 @@ public class ReviewInfoXWidget extends XLabelValueBase {
}
NewDecisionReviewJob job =
new NewDecisionReviewJob(teamArt, null, dialog.getReviewTitle(), dialog.getSelectedState(),
- null, ReviewManager.getDefaultDecisionReviewOptions(), null);
+ null, ReviewManager.getDefaultDecisionReviewOptions(), null, new Date(),
+ UserManager.getUser());
job.setUser(true);
job.setPriority(Job.LONG);
job.schedule();
@@ -158,7 +162,7 @@ public class ReviewInfoXWidget extends XLabelValueBase {
new StateListAndTitleDialog("Add Peer to Peer Review",
"Select state to that review will be associated with.",
teamArt.getWorkFlowDefinition().getPageNames());
- dialog.setInitialSelections(new Object[] {forStateName});
+ dialog.setInitialSelections(new Object[] {forState.getPageName()});
dialog.setReviewTitle(PeerToPeerReviewArtifact.getDefaultReviewTitle(teamArt));
if (dialog.open() == 0) {
if (!Strings.isValid(dialog.getReviewTitle())) {
@@ -185,7 +189,7 @@ public class ReviewInfoXWidget extends XLabelValueBase {
workComp.setLayoutData(gd);
for (AbstractReviewArtifact revArt : revArts) {
- createReviewHyperlink(workComp, managedForm, toolkit, revArt, forStateName);
+ createReviewHyperlink(workComp, managedForm, toolkit, revArt, forState);
}
}
@@ -203,16 +207,17 @@ public class ReviewInfoXWidget extends XLabelValueBase {
}
}
- public static String toHTML(final TeamWorkFlowArtifact teamArt, String forStateName) throws OseeCoreException {
- if (ReviewManager.getReviews(teamArt, forStateName).isEmpty()) {
+ public static String toHTML(final TeamWorkFlowArtifact teamArt, IWorkPage forState) throws OseeCoreException {
+ if (ReviewManager.getReviews(teamArt, forState).isEmpty()) {
return "";
}
StringBuffer html = new StringBuffer();
try {
- html.append(AHTML.addSpace(1) + AHTML.getLabelStr(AHTML.LABEL_FONT, "\"" + forStateName + "\" State Reviews"));
+ html.append(AHTML.addSpace(1) + AHTML.getLabelStr(AHTML.LABEL_FONT,
+ "\"" + forState.getPageName() + "\" State Reviews"));
html.append(AHTML.startBorderTable(100, Overview.normalColor, ""));
html.append(AHTML.addHeaderRowMultiColumnTable(new String[] {"Review Type", "Title", "ID"}));
- for (AbstractReviewArtifact art : ReviewManager.getReviews(teamArt, forStateName)) {
+ for (AbstractReviewArtifact art : ReviewManager.getReviews(teamArt, forState)) {
html.append(AHTML.addRowMultiColumnTable(new String[] {
art.getArtifactTypeName(),
art.getName(),
@@ -227,10 +232,10 @@ public class ReviewInfoXWidget extends XLabelValueBase {
}
public String toHTML() throws OseeCoreException {
- return ReviewInfoXWidget.toHTML(teamArt, forStateName);
+ return ReviewInfoXWidget.toHTML(teamArt, forState);
}
- private void createReviewHyperlink(Composite comp, IManagedForm managedForm, XFormToolkit toolkit, final AbstractReviewArtifact revArt, String forStateName) throws OseeCoreException {
+ private void createReviewHyperlink(Composite comp, IManagedForm managedForm, XFormToolkit toolkit, final AbstractReviewArtifact revArt, IWorkPage forState) throws OseeCoreException {
Composite workComp = toolkit.createContainer(comp, 1);
workComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING));
@@ -238,21 +243,21 @@ public class ReviewInfoXWidget extends XLabelValueBase {
Label strLabel = new Label(workComp, SWT.NONE);
labelWidgets.add(strLabel);
- if (revArt.isBlocking() && !revArt.isCancelledOrCompleted()) {
+ if (revArt.isBlocking() && !revArt.isCompletedOrCancelled()) {
strLabel.setText("State Blocking [" + revArt.getArtifactTypeName() + "] must be completed: ");
IMessageManager messageManager = managedForm.getMessageManager();
if (messageManager != null) {
messageManager.addMessage(
"validation.error",
- "\"" + forStateName + "\" State has a blocking [" + revArt.getArtifactTypeName() + "] that must be completed.",
+ "\"" + forState.getPageName() + "\" State has a blocking [" + revArt.getArtifactTypeName() + "] that must be completed.",
null, IMessageProvider.ERROR, strLabel);
}
- } else if (!revArt.isCancelledOrCompleted()) {
+ } else if (!revArt.isCompletedOrCancelled()) {
strLabel.setText("Open [" + revArt.getArtifactTypeName() + "] exists: ");
IMessageManager messageManager = managedForm.getMessageManager();
if (messageManager != null) {
messageManager.addMessage("validation.error",
- "\"" + forStateName + "\" State has an open [" + revArt.getArtifactTypeName() + "].", null,
+ "\"" + forState.getPageName() + "\" State has an open [" + revArt.getArtifactTypeName() + "].", null,
IMessageProvider.WARNING, strLabel);
}
} else {
@@ -286,12 +291,13 @@ public class ReviewInfoXWidget extends XLabelValueBase {
SkynetTransaction transaction =
new SkynetTransaction(AtsUtil.getAtsBranch(), "ATS Auto Complete Reviews");
for (AbstractReviewArtifact revArt : ReviewManager.getReviewsFromCurrentState(teamArt)) {
- if (!revArt.isCancelledOrCompleted()) {
+ if (!revArt.isCompletedOrCancelled()) {
if (revArt.getStateMgr().isUnAssigned()) {
revArt.getStateMgr().setAssignee(UserManager.getUser());
}
+ TransitionManager transitionMgr = new TransitionManager(revArt);
Result result =
- revArt.transitionToCompleted("", transaction,
+ transitionMgr.transitionToCompleted("", transaction,
TransitionOption.OverrideTransitionValidityCheck, TransitionOption.Persist);
if (result.isFalse()) {
result.popup();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java
index 7ed5c5a75a0..806f4124d33 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java
@@ -36,7 +36,7 @@ public class StateHoursSpentXWidget extends XHyperlinkLabelValueSelection {
private final boolean isCurrentState;
public StateHoursSpentXWidget(IManagedForm managedForm, AtsWorkPage page, final AbstractWorkflowArtifact sma, Composite composite, int horizontalSpan, XModifiedListener xModListener, boolean isCurrentState) {
- super("\"" + page.getName() + "\"" + " State Hours Spent");
+ super("\"" + page.getPageName() + "\"" + " State Hours Spent");
this.page = page;
this.sma = sma;
this.isCurrentState = isCurrentState;
@@ -76,25 +76,24 @@ public class StateHoursSpentXWidget extends XHyperlinkLabelValueSelection {
}
try {
StringBuffer sb =
- new StringBuffer(String.format(" State Hours: %5.2f",
- sma.getStateMgr().getHoursSpent(page.getName())));
+ new StringBuffer(String.format(" State Hours: %5.2f", sma.getStateMgr().getHoursSpent(page)));
setEditable(isCurrentState && !sma.isReadOnly());
boolean breakoutNeeded = false;
if (sma instanceof AbstractTaskableArtifact && ((AbstractTaskableArtifact) sma).hasTaskArtifacts()) {
sb.append(String.format("\n Task Hours: %5.2f",
- ((AbstractTaskableArtifact) sma).getHoursSpentFromTasks(page.getName())));
+ ((AbstractTaskableArtifact) sma).getHoursSpentFromTasks(page)));
breakoutNeeded = true;
}
if (sma.isTeamWorkflow() && ReviewManager.hasReviews((TeamWorkFlowArtifact) sma)) {
sb.append(String.format("\n Review Hours: %5.2f",
- ReviewManager.getHoursSpent((TeamWorkFlowArtifact) sma, page.getName())));
+ ReviewManager.getHoursSpent((TeamWorkFlowArtifact) sma, page)));
breakoutNeeded = true;
}
if (breakoutNeeded) {
setToolTip(sb.toString());
- return String.format("%5.2f", sma.getHoursSpentSMAStateTotal(page.getName()));
+ return String.format("%5.2f", sma.getHoursSpentSMAStateTotal(page));
} else {
- return String.format("%5.2f", sma.getStateMgr().getHoursSpent(page.getName()));
+ return String.format("%5.2f", sma.getStateMgr().getHoursSpent(page));
}
} catch (Exception ex) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java
index 161fb0e1344..93793db89f4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java
@@ -36,7 +36,7 @@ public class StatePercentCompleteXWidget extends XHyperlinkLabelValueSelection {
private final boolean isCurrentState;
public StatePercentCompleteXWidget(IManagedForm managedForm, AtsWorkPage page, final AbstractWorkflowArtifact sma, Composite composite, int horizontalSpan, XModifiedListener xModListener, boolean isCurrentState) {
- super("\"" + page.getName() + "\"" + " State Percent Complete");
+ super("\"" + page.getPageName() + "\"" + " State Percent Complete");
this.page = page;
this.sma = sma;
this.isCurrentState = isCurrentState;
@@ -77,26 +77,25 @@ public class StatePercentCompleteXWidget extends XHyperlinkLabelValueSelection {
try {
setEditable(isCurrentState && !sma.isReadOnly());
StringBuffer sb =
- new StringBuffer(String.format(" State Percent: %d",
- sma.getStateMgr().getPercentComplete(page.getName())));
+ new StringBuffer(String.format(" State Percent: %d", sma.getStateMgr().getPercentComplete(page)));
boolean breakoutNeeded = false;
if (sma instanceof AbstractTaskableArtifact && ((AbstractTaskableArtifact) sma).hasTaskArtifacts()) {
sb.append(String.format("\n Task Percent: %d",
- ((AbstractTaskableArtifact) sma).getPercentCompleteFromTasks(page.getName())));
+ ((AbstractTaskableArtifact) sma).getPercentCompleteFromTasks(page)));
breakoutNeeded = true;
}
if (sma.isTeamWorkflow() && ReviewManager.hasReviews((TeamWorkFlowArtifact) sma)) {
sb.append(String.format("\n Review Percent: %d",
- ReviewManager.getPercentComplete((TeamWorkFlowArtifact) sma, page.getName())));
+ ReviewManager.getPercentComplete((TeamWorkFlowArtifact) sma, page)));
breakoutNeeded = true;
}
if (breakoutNeeded) {
if (!getControl().isDisposed()) {
setToolTip(sb.toString() + "\n" + TOOLTIP);
}
- return String.valueOf(sma.getPercentCompleteSMAStateTotal(page.getName()));
+ return String.valueOf(sma.getPercentCompleteSMAStateTotal(page));
} else {
- return String.valueOf(sma.getStateMgr().getPercentComplete(page.getName()));
+ return String.valueOf(sma.getStateMgr().getPercentComplete(page));
}
} catch (Exception ex) {
OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java
index 3d60d6ef336..3931e0ddcda 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/TaskInfoXWidget.java
@@ -13,11 +13,12 @@ package org.eclipse.osee.ats.editor.widget;
import java.util.logging.Level;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.AbstractTaskableArtifact;
+import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -25,6 +26,7 @@ import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.widgets.XLabelValueBase;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.Widgets;
import org.eclipse.swt.SWT;
@@ -39,15 +41,15 @@ import org.eclipse.ui.forms.IMessageManager;
*/
public class TaskInfoXWidget extends XLabelValueBase {
- private final String forStateName;
+ private final IWorkPage forState;
private final IManagedForm managedForm;
private final AbstractTaskableArtifact taskableArt;
- public TaskInfoXWidget(IManagedForm managedForm, final AbstractTaskableArtifact taskableArt, final String forStateName, Composite composite, int horizontalSpan) {
- super("\"" + forStateName + "\" State Tasks");
+ public TaskInfoXWidget(IManagedForm managedForm, final AbstractTaskableArtifact taskableArt, final IWorkPage forState, Composite composite, int horizontalSpan) {
+ super("\"" + forState.getPageName() + "\" State Tasks");
this.managedForm = managedForm;
this.taskableArt = taskableArt;
- this.forStateName = forStateName;
+ this.forState = forState;
setToolTip("Tasks must be completed before transtion. Select \"Task\" tab to view tasks");
setFillHorizontally(true);
createWidgets(managedForm, composite, horizontalSpan);
@@ -69,16 +71,17 @@ public class TaskInfoXWidget extends XLabelValueBase {
dispose();
}
try {
- if (taskableArt.getTaskArtifacts(forStateName).size() > 0) {
- setValueText(getStatus(taskableArt, forStateName));
+ if (taskableArt.getTaskArtifacts(forState).size() > 0) {
+ setValueText(getStatus(taskableArt, forState));
} else {
setValueText("No Tasks Created");
}
- if (taskableArt.areTasksComplete(forStateName).isFalse()) {
+ if (taskableArt.areTasksComplete(forState).isFalse()) {
IMessageManager messageManager = managedForm.getMessageManager();
if (messageManager != null) {
- messageManager.addMessage("validation.error", "State \"" + forStateName + "\" has uncompleted Tasks",
- null, IMessageProvider.ERROR, labelWidget);
+ messageManager.addMessage("validation.error",
+ "State \"" + forState.getPageName() + "\" has uncompleted Tasks", null, IMessageProvider.ERROR,
+ labelWidget);
}
} else {
if (Widgets.isAccessible(managedForm.getForm())) {
@@ -90,9 +93,9 @@ public class TaskInfoXWidget extends XLabelValueBase {
}
}
- private String getStatus(AbstractTaskableArtifact taskableArt, String stateName) throws OseeCoreException {
+ private String getStatus(AbstractTaskableArtifact taskableArt, IWorkPage state) throws OseeCoreException {
int completed = 0, cancelled = 0, inWork = 0;
- for (TaskArtifact taskArt : taskableArt.getTaskArtifacts(stateName)) {
+ for (TaskArtifact taskArt : taskableArt.getTaskArtifacts(state)) {
if (taskArt.isCompleted()) {
completed++;
} else if (taskArt.isCancelled()) {
@@ -102,7 +105,7 @@ public class TaskInfoXWidget extends XLabelValueBase {
}
}
return String.format("Total: %d - InWork: %d - Completed: %d - Cancelled: %d",
- taskableArt.getTaskArtifacts(stateName).size(), inWork, completed, cancelled);
+ taskableArt.getTaskArtifacts(state).size(), inWork, completed, cancelled);
}
public void addAdminRightClickOption() {
@@ -120,13 +123,14 @@ public class TaskInfoXWidget extends XLabelValueBase {
try {
SkynetTransaction transaction =
new SkynetTransaction(AtsUtil.getAtsBranch(), "ATS Auto Complete Tasks");
- for (TaskArtifact taskArt : taskableArt.getTaskArtifacts(forStateName)) {
- if (!taskArt.isCancelledOrCompleted()) {
+ for (TaskArtifact taskArt : taskableArt.getTaskArtifacts(forState)) {
+ if (!taskArt.isCompletedOrCancelled()) {
if (taskArt.getStateMgr().isUnAssigned()) {
taskArt.getStateMgr().setAssignee(UserManager.getUser());
}
+ TransitionManager transitionMgr = new TransitionManager(taskArt);
Result result =
- taskArt.transitionToCompleted("", transaction,
+ transitionMgr.transitionToCompleted("", transaction,
TransitionOption.OverrideTransitionValidityCheck, TransitionOption.Persist);
if (result.isFalse()) {
result.popup();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/GoalXViewerFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/GoalXViewerFactory.java
index 3cb1aa6897c..033fb7f096c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/GoalXViewerFactory.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/goal/GoalXViewerFactory.java
@@ -44,6 +44,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.column.HridCo
public class GoalXViewerFactory extends SkynetXViewerFactory {
private GoalArtifact soleGoalArtifact;
+ @SuppressWarnings("unchecked")
public static final List<? extends XViewerColumn> GoalViewerVisibleColumns = Arrays.asList(
GoalOrderColumn.getInstance(), GoalOrderVoteColumn.getInstance(), TitleColumn.getInstance(),
TypeColumn.getInstance(), StateColumn.getInstance(), PriorityColumn.getInstance(),
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
index b654d9c8b0a..e0586cc79bd 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
@@ -36,17 +36,17 @@ import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.VersionArtifact;
import org.eclipse.osee.ats.artifact.log.AtsLog;
import org.eclipse.osee.ats.artifact.log.LogItem;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.ats.internal.workflow.SMAState;
+import org.eclipse.osee.ats.internal.workflow.XCurrentStateDam;
+import org.eclipse.osee.ats.internal.workflow.XStateDam;
import org.eclipse.osee.ats.task.TaskEditor;
import org.eclipse.osee.ats.task.TaskEditorSimpleProvider;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsBranchManager;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.widgets.SMAState;
-import org.eclipse.osee.ats.util.widgets.XCurrentStateDam;
-import org.eclipse.osee.ats.util.widgets.XStateDam;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.world.WorldXNavigateItemAction;
import org.eclipse.osee.framework.access.AccessControlManager;
import org.eclipse.osee.framework.core.data.SystemUser;
@@ -81,6 +81,7 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLo
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.skynet.results.XResultData;
import org.eclipse.osee.framework.ui.skynet.util.email.EmailUtil;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.swt.Displays;
/**
@@ -443,7 +444,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
if (artifact instanceof AbstractWorkflowArtifact) {
XStateDam stateDam = new XStateDam((AbstractWorkflowArtifact) artifact);
for (SMAState state : stateDam.getStates()) {
- if (state.isCompletedOrCancelled() && state.getPercentComplete() != 0) {
+ if ((state.getName().equals("Completed") || state.getName().equals("Cancelled")) && state.getPercentComplete() != 0) {
testNameToResultsMap.put(
"testAtsAttributeValues",
"Error: ats.State error for SMA: " + XResultData.getHyperlink(artifact) + " State: " + state.getName() + " Percent: " + state.getPercentComplete());
@@ -460,7 +461,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
if (artifact instanceof AbstractWorkflowArtifact) {
XCurrentStateDam currentStateDam = new XCurrentStateDam((AbstractWorkflowArtifact) artifact);
SMAState state = currentStateDam.getState();
- if (state.isCompletedOrCancelled() && state.getPercentComplete() != 0) {
+ if ((state.getName().equals("Completed") || state.getName().equals("Cancelled")) && state.getPercentComplete() != 0) {
testNameToResultsMap.put(
"testAtsAttributeValues",
"Error: ats.CurrentState error for SMA: " + XResultData.getHyperlink(artifact) + " State: " + state.getName() + " Percent: " + state.getPercentComplete());
@@ -720,7 +721,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
AbstractWorkflowArtifact sma = (AbstractWorkflowArtifact) art;
try {
AtsLog log = sma.getLog();
- if (log.getOriginator() == null) {
+ if (sma.getCreatedBy() == null) {
try {
testNameToResultsMap.put(
"testAtsLogs",
@@ -731,14 +732,14 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
"Error: " + sma.getArtifactTypeName() + " " + XResultData.getHyperlink(sma) + " exception accessing originator: " + ex.getLocalizedMessage());
}
}
- for (String stateName : Arrays.asList("Completed", "Cancelled")) {
- if (sma.getStateMgr().getCurrentStateName().equals(stateName)) {
- LogItem logItem = log.getStateEvent(LogType.StateEntered, stateName);
+ for (IWorkPage state : Arrays.asList(TeamState.Completed, TeamState.Cancelled)) {
+ if (sma.isInState(state)) {
+ LogItem logItem = sma.getStateStartedData(state);
if (logItem == null) {
try {
testNameToResultsMap.put(
"testAtsLogs",
- "Error: " + sma.getArtifactTypeName() + " " + XResultData.getHyperlink(sma) + " state \"" + stateName + "\" logItem == null");
+ "Error: " + sma.getArtifactTypeName() + " " + XResultData.getHyperlink(sma) + " state \"" + state + "\" logItem == null");
} catch (Exception ex) {
testNameToResultsMap.put(
"testAtsLogs",
@@ -749,7 +750,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
try {
testNameToResultsMap.put(
"testAtsLogs",
- "Error: " + sma.getArtifactTypeName() + " " + XResultData.getHyperlink(sma) + " state \"" + stateName + "\" logItem.date == null");
+ "Error: " + sma.getArtifactTypeName() + " " + XResultData.getHyperlink(sma) + " state \"" + state + "\" logItem.date == null");
} catch (Exception ex) {
testNameToResultsMap.put(
"testAtsLogs",
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java
index c62c452fb70..883c4390e01 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/OseeAtsServiceImpl.java
@@ -31,6 +31,7 @@ import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
@@ -92,8 +93,12 @@ public class OseeAtsServiceImpl implements IOseeCmService {
@Override
public boolean isCompleted(Artifact artifact) {
- if (isPcrArtifact(artifact) && artifact instanceof AbstractWorkflowArtifact) {
- return ((AbstractWorkflowArtifact) artifact).isCancelledOrCompleted();
+ try {
+ if (isPcrArtifact(artifact) && artifact instanceof AbstractWorkflowArtifact) {
+ return ((AbstractWorkflowArtifact) artifact).isCompletedOrCancelled();
+ }
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
return false;
}
@@ -117,7 +122,7 @@ public class OseeAtsServiceImpl implements IOseeCmService {
try {
Artifact artifact = ArtifactQuery.getArtifactFromId(parentPcrGuid, AtsUtil.getAtsBranch());
if (artifact instanceof AbstractTaskableArtifact) {
- return ((AbstractTaskableArtifact) artifact).createNewTask(name);
+ return ((AbstractTaskableArtifact) artifact).createNewTask(name, new Date(), UserManager.getUser());
}
} catch (OseeCoreException ex) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/SMAState.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/SMAState.java
index f7827f24d4c..a3d14babd5a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/SMAState.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/SMAState.java
@@ -8,13 +8,14 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.util.widgets;
+package org.eclipse.osee.ats.internal.workflow;
import java.util.Collection;
import java.util.HashSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.AtsUtil;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.framework.core.data.SystemUser;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -96,7 +97,7 @@ public class SMAState {
if (assignees.size() > 1 && assignees.contains(UserManager.getUser(SystemUser.UnAssigned))) {
throw new OseeArgumentException("Can not assign to user and UnAssigned");
}
- if (assignees.size() > 0 && (name.equals(DefaultTeamState.Completed.name()) || name.equals(DefaultTeamState.Cancelled.name()))) {
+ if (assignees.size() > 0 && (name.equals(TeamState.Completed.getPageName()) || name.equals(TeamState.Cancelled.getPageName()))) {
throw new OseeStateException("Can't assign completed/cancelled states.");
}
} else {
@@ -115,7 +116,7 @@ public class SMAState {
* Sets the assignees but DOES NOT write to SMA. This method should NOT be called outside the StateMachineArtifact.
*/
public void setAssignee(User assignee) throws OseeCoreException {
- if (assignee != null && (name.equals(DefaultTeamState.Completed.name()) || name.equals(DefaultTeamState.Cancelled.name()))) {
+ if (assignee != null && (name.equals(TeamState.Completed.getPageName()) || name.equals(TeamState.Cancelled.getPageName()))) {
throw new OseeStateException("Can't assign completed/cancelled states.");
}
if (assignee == UserManager.getUser(SystemUser.OseeSystem) || assignee == UserManager.getUser(SystemUser.Guest)) {
@@ -198,7 +199,7 @@ public class SMAState {
}
public String getHoursSpentStr() {
- return String.valueOf(hoursSpent);
+ return AtsUtil.doubleToI18nString(hoursSpent, true);
}
public void setHoursSpent(double hoursSpent) {
@@ -213,15 +214,4 @@ public class SMAState {
this.percentComplete = percentComplete;
}
- public boolean isCompleted() {
- return getName().equals(DefaultTeamState.Completed.name());
- }
-
- public boolean isCancelled() {
- return getName().equals(DefaultTeamState.Cancelled.name());
- }
-
- public boolean isCompletedOrCancelled() {
- return isCompleted() || isCancelled();
- }
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XCurrentStateDam.java
index 350e7df5082..f1be041fccf 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XCurrentStateDam.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XCurrentStateDam.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.util.widgets;
+package org.eclipse.osee.ats.internal.workflow;
import java.util.Date;
import java.util.Set;
@@ -19,6 +19,7 @@ import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
/**
* @author Donald G. Dunne
@@ -55,7 +56,7 @@ public class XCurrentStateDam extends XStateAssigneesDam {
currState.setPercentComplete(percentComplete);
setState(currState);
if (logMetrics) {
- logMetrics();
+ logMetrics(getArtifact().getStateMgr().getCurrentState());
}
}
@@ -65,18 +66,14 @@ public class XCurrentStateDam extends XStateAssigneesDam {
currState.setPercentComplete(percentComplete);
setState(currState);
if (logMetrics) {
- logMetrics();
+ logMetrics(getArtifact().getStateMgr().getCurrentState());
}
}
- private void logMetrics() throws OseeCoreException {
- logMetrics("");
- }
-
- public static void logMetrics(AbstractWorkflowArtifact sma, String percent, String hours, String stateName, User user, Date date) throws OseeCoreException {
+ public static void logMetrics(AbstractWorkflowArtifact sma, String percent, String hours, IWorkPage state, User user, Date date) throws OseeCoreException {
LogItem logItem =
- new LogItem(LogType.Metrics, date, user, stateName, String.format("Percent %s Hours %s", percent, hours),
- sma.getHumanReadableId());
+ new LogItem(LogType.Metrics, date, user, state.getPageName(), String.format("Percent %s Hours %s", percent,
+ hours), sma.getHumanReadableId());
sma.getLog().addLogItem(logItem);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateAssigneesDam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XStateAssigneesDam.java
index 98ba164eb06..3172d74630e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateAssigneesDam.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XStateAssigneesDam.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.util.widgets;
+package org.eclipse.osee.ats.internal.workflow;
import java.util.Collection;
import java.util.Date;
@@ -24,6 +24,7 @@ import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Attribute;
import org.eclipse.osee.framework.ui.skynet.widgets.XTextDam;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
/**
* @author Donald G. Dunne
@@ -46,17 +47,17 @@ public abstract class XStateAssigneesDam extends XTextDam {
return (AbstractWorkflowArtifact) super.getArtifact();
}
- public SMAState getState(String stateName, boolean create) {
+ public SMAState getState(IWorkPage state, boolean create) {
try {
for (String stateXml : getArtifact().getAttributesToStringList(getAttributeType())) {
- if (stateXml.startsWith(stateName + ";")) {
- SMAState state = new SMAState();
- state.setFromXml(stateXml);
- return state;
+ if (stateXml.startsWith(state.getPageName() + ";")) {
+ SMAState smaState = new SMAState();
+ smaState.setFromXml(stateXml);
+ return smaState;
}
}
if (create) {
- return new SMAState(stateName);
+ return new SMAState(state.getPageName());
}
} catch (Exception ex) {
try {
@@ -68,31 +69,31 @@ public abstract class XStateAssigneesDam extends XTextDam {
return null;
}
- public void updateMetrics(String stateName, double additionalHours, int percentComplete, boolean logMetrics) throws OseeCoreException {
- SMAState currState = getState(stateName, false);
- currState.setHoursSpent(currState.getHoursSpent() + additionalHours);
- currState.setPercentComplete(percentComplete);
- setState(currState);
+ public void updateMetrics(IWorkPage state, double additionalHours, int percentComplete, boolean logMetrics) throws OseeCoreException {
+ SMAState smaState = getState(state, false);
+ smaState.setHoursSpent(smaState.getHoursSpent() + additionalHours);
+ smaState.setPercentComplete(percentComplete);
+ setState(smaState);
if (logMetrics) {
- logMetrics(stateName);
+ logMetrics(state);
}
}
- public void setMetrics(String stateName, double hours, int percentComplete, boolean logMetrics) throws OseeCoreException {
- SMAState currState = getState(stateName, false);
+ public void setMetrics(IWorkPage state, double hours, int percentComplete, boolean logMetrics) throws OseeCoreException {
+ SMAState currState = getState(state, false);
currState.setHoursSpent(hours);
currState.setPercentComplete(percentComplete);
setState(currState);
if (logMetrics) {
- logMetrics(stateName);
+ logMetrics(state);
}
}
- protected void logMetrics(String stateName) throws OseeCoreException {
+ protected void logMetrics(IWorkPage state) throws OseeCoreException {
AbstractWorkflowArtifact sma = getArtifact();
String hoursSpent = AtsUtil.doubleToI18nString(sma.getHoursSpentSMATotal());
- XCurrentStateDam.logMetrics(sma, sma.getPercentCompleteSMATotal() + "", hoursSpent, stateName,
- UserManager.getUser(), new Date());
+ XCurrentStateDam.logMetrics(sma, sma.getPercentCompleteSMATotal() + "", hoursSpent, state, UserManager.getUser(),
+ new Date());
}
public Set<SMAState> getStates() {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateDam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XStateDam.java
index ea24a84132d..982697b76c5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateDam.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/workflow/XStateDam.java
@@ -8,7 +8,7 @@
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
-package org.eclipse.osee.ats.util.widgets;
+package org.eclipse.osee.ats.internal.workflow;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsQuickSearchOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsQuickSearchOperation.java
index 712fae1b11b..e50687657cb 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsQuickSearchOperation.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsQuickSearchOperation.java
@@ -72,7 +72,7 @@ public class AtsQuickSearchOperation extends AbstractOperation implements IWorld
AbstractWorkflowArtifact sma = (AbstractWorkflowArtifact) art;
// default excludes canceled/completed
if (data.isIncludeCompleteCancelled() == false) {
- if (!sma.isCancelledOrCompleted()) {
+ if (!sma.isCompletedOrCancelled()) {
allArtifacts.add(art);
}
} else {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
index 5090cb00e94..25a749373e0 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java
@@ -27,8 +27,9 @@ import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.ats.world.WorldXNavigateItemAction;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -142,7 +143,8 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction {
private void makeChanges7(TeamWorkFlowArtifact teamArt) throws OseeCoreException {
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Remote Event Test");
- teamArt.transition(DefaultTeamState.Analyze.name(), Collections.singleton(UserManager.getUser()), transaction,
+ TransitionManager transitionMgr = new TransitionManager(teamArt);
+ transitionMgr.transition(TeamState.Analyze, Collections.singleton(UserManager.getUser()), transaction,
TransitionOption.Persist);
teamArt.persist(transaction);
transaction.execute();
@@ -261,7 +263,7 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction {
expectedTargetedVersion = "not set";
}
testEquals("Targeted Version", expectedTargetedVersion, "2.5.7");
- testEquals("State", DefaultTeamState.Analyze.name(), teamArt.getStateMgr().getCurrentStateName());
+ testEquals("State", TeamState.Analyze.getPageName(), teamArt.getStateMgr().getCurrentStateName());
}
private void testEquals(String name, Object expected, Object actual) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateGoalTestArtifacts.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateGoalTestArtifacts.java
index 895ecfde7c4..8a332b3953d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateGoalTestArtifacts.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateGoalTestArtifacts.java
@@ -12,6 +12,7 @@
package org.eclipse.osee.ats.navigate;
import java.util.Arrays;
+import java.util.Date;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.artifact.ActionArtifact;
@@ -27,6 +28,8 @@ import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.ats.world.WorldEditor;
import org.eclipse.osee.ats.world.WorldEditorSimpleProvider;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
@@ -39,6 +42,8 @@ import org.eclipse.osee.framework.ui.swt.Displays;
* @author Donald G. Dunne
*/
public class CreateGoalTestArtifacts extends XNavigateItemAction {
+ private Date createdDate;
+ private User createdBy;
public CreateGoalTestArtifacts(XNavigateItem parent) {
super(parent, "Create Test Goal Artifacts", AtsImage.GOAL);
@@ -53,6 +58,8 @@ public class CreateGoalTestArtifacts extends XNavigateItemAction {
if (!MessageDialog.openConfirm(Displays.getActiveShell(), getName(), getName())) {
return;
}
+ createdDate = new Date();
+ createdBy = UserManager.getUser();
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), getName());
GoalArtifact oteGoal = GoalManager.createGoal("OTE");
GoalArtifact atsGoal = GoalManager.createGoal("ATS");
@@ -73,7 +80,7 @@ public class CreateGoalTestArtifacts extends XNavigateItemAction {
for (String name : Arrays.asList("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
"Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "AA", "BB", "CC", "DD", "EE", "FF", "GG", "HH", "II", "JJ",
"KK", "LL", "MM", "NN", "OO", "PP", "QQ", "RR")) {
- TaskArtifact taskArt = teamArt.createNewTask("Task " + name);
+ TaskArtifact taskArt = teamArt.createNewTask("Task " + name, createdDate, createdBy);
defineGoal.addMember(taskArt);
taskArt.persist(transaction);
}
@@ -89,7 +96,7 @@ public class CreateGoalTestArtifacts extends XNavigateItemAction {
private void createAction7(SkynetTransaction transaction, GoalArtifact msaGoal) throws OseeCoreException {
ActionArtifact action =
ActionManager.createAction(null, "Add the Improvement", "Description", ChangeType.Improvement, "4", false,
- null, ActionableItemArtifact.getActionableItems(Arrays.asList("REQ")), transaction);
+ null, ActionableItemArtifact.getActionableItems(Arrays.asList("REQ")), createdDate, createdBy, transaction);
action.persist(transaction);
msaGoal.addMember(action);
msaGoal.persist(transaction);
@@ -99,14 +106,15 @@ public class CreateGoalTestArtifacts extends XNavigateItemAction {
for (String msaTool : Arrays.asList("TRAX", "REQ", "RCS")) {
ActionArtifact action =
ActionManager.createAction(null, "Fix " + msaTool + " button", "Description", ChangeType.Problem, "4",
- false, null, ActionableItemArtifact.getActionableItems(Arrays.asList(msaTool)), transaction);
+ false, null, ActionableItemArtifact.getActionableItems(Arrays.asList(msaTool)), createdDate, createdBy,
+ transaction);
action.persist(transaction);
msaGoal.addMember(action.getTeamWorkFlowArtifacts().iterator().next());
teamArt = action.getTeamWorkFlowArtifacts().iterator().next();
- TaskArtifact taskArt = teamArt.createNewTask("Task 1");
+ TaskArtifact taskArt = teamArt.createNewTask("Task 1", createdDate, createdBy);
oteGoal.addMember(taskArt);
taskArt.persist(transaction);
- taskArt = teamArt.createNewTask("Task 2");
+ taskArt = teamArt.createNewTask("Task 2", createdDate, createdBy);
msaGoal.addMember(taskArt);
taskArt.persist(transaction);
}
@@ -116,7 +124,8 @@ public class CreateGoalTestArtifacts extends XNavigateItemAction {
private void createAction3(SkynetTransaction transaction, GoalArtifact atsGoal, GoalArtifact cdbGoal) throws OseeCoreException {
ActionArtifact action =
ActionManager.createAction(null, "Remove Workflow button", "Description", ChangeType.Problem, "4", false,
- null, ActionableItemArtifact.getActionableItems(Arrays.asList("ATS", "CDB")), transaction);
+ null, ActionableItemArtifact.getActionableItems(Arrays.asList("ATS", "CDB")), createdDate, createdBy,
+ transaction);
action.persist(transaction);
atsGoal.addMember(action.getTeamWorkFlowArtifacts().iterator().next());
cdbGoal.addMember(action.getTeamWorkFlowArtifacts().iterator().next());
@@ -126,7 +135,8 @@ public class CreateGoalTestArtifacts extends XNavigateItemAction {
private void createAction2(SkynetTransaction transaction, GoalArtifact oteGoal, GoalArtifact cdbGoal) throws OseeCoreException {
ActionArtifact action =
ActionManager.createAction(null, "Add CDB Check Signals", "Description", ChangeType.Problem, "4", false, null,
- ActionableItemArtifact.getActionableItems(Arrays.asList("OTE_SW", "CDB")), transaction);
+ ActionableItemArtifact.getActionableItems(Arrays.asList("OTE_SW", "CDB")), createdDate, createdBy,
+ transaction);
action.persist(transaction);
oteGoal.addMember(action.getTeamWorkFlowArtifacts().iterator().next());
cdbGoal.addMember(action.getTeamWorkFlowArtifacts().iterator().next());
@@ -138,7 +148,7 @@ public class CreateGoalTestArtifacts extends XNavigateItemAction {
private TeamWorkFlowArtifact createAction1(SkynetTransaction transaction, GoalArtifact oteGoal) throws OseeCoreException {
ActionArtifact action =
ActionManager.createAction(null, "Fix this model", "Description", ChangeType.Problem, "2", false, null,
- ActionableItemArtifact.getActionableItems(Arrays.asList("OTE_SW")), transaction);
+ ActionableItemArtifact.getActionableItems(Arrays.asList("OTE_SW")), createdDate, createdBy, transaction);
action.persist(transaction);
oteGoal.addMember(action.getTeamWorkFlowArtifacts().iterator().next());
TeamWorkFlowArtifact teamArt = action.getTeamWorkFlowArtifacts().iterator().next();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/GenerateReviewParticipationReport.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/GenerateReviewParticipationReport.java
index cc30a822291..77327db14e6 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/GenerateReviewParticipationReport.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/GenerateReviewParticipationReport.java
@@ -18,10 +18,10 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.column.LegacyPcrIdColumn;
import org.eclipse.osee.ats.column.RelatedToStateColumn;
+import org.eclipse.osee.ats.column.StateColumn;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.xviewer.column.XViewerReviewRoleColumn;
import org.eclipse.osee.ats.util.xviewer.column.XViewerSmaCompletedDateColumn;
-import org.eclipse.osee.ats.util.xviewer.column.XViewerSmaStateColumn;
import org.eclipse.osee.ats.world.search.MyReviewWorkflowItem;
import org.eclipse.osee.ats.world.search.MyReviewWorkflowItem.ReviewState;
import org.eclipse.osee.framework.core.enums.Active;
@@ -105,7 +105,7 @@ public class GenerateReviewParticipationReport extends XNavigateItemAction {
registerColumns(ArtifactTypeColumn.getInstance());
registerColumns(new HridColumn());
registerColumns(LegacyPcrIdColumn.getInstance());
- registerColumns(new XViewerSmaStateColumn());
+ registerColumns(StateColumn.getInstance());
registerColumns(new XViewerSmaCompletedDateColumn("Completed"));
registerColumns(new XViewerReviewRoleColumn(user));
registerColumns(RelatedToStateColumn.getInstance());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java
index 91f12a5e5cb..b9b76e7fa98 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java
@@ -53,7 +53,8 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe
protected XCombo releasedCombo = null;
protected XCombo versionCombo = null;
protected XMembersCombo assigneeCombo;
- protected XCheckBox includeCompletedCancelledCheckbox;
+ protected XCheckBox includeCompletedCheckbox;
+ protected XCheckBox includeCancelledCheckbox;
protected XCheckBox showFlatCheckbox;
public TeamWorkflowSearchWorkflowSearchItem(String name) {
@@ -83,17 +84,19 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe
public String getParameterXWidgetXml() throws OseeCoreException {
return "<xWidgets>" +
//
- "<XWidget xwidgetType=\"XHyperlabelTeamDefinitionSelection\" displayName=\"Team Definitions(s)\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Team Definitions(s)\" xwidgetType=\"XHyperlabelTeamDefinitionSelection\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XCombo()\" beginComposite=\"10\" displayName=\"Version\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Version\" xwidgetType=\"XCombo()\" beginComposite=\"6\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XCombo(Both,Released,UnReleased)\" displayName=\"Released\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Released\" xwidgetType=\"XCombo(Both,Released,UnReleased)\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XMembersCombo\" displayName=\"Assignee\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Assignee\" xwidgetType=\"XMembersCombo\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XCheckBox\" displayName=\"Include Completed/Cancelled\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Include Completed\" beginComposite=\"6\" xwidgetType=\"XCheckBox\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XCheckBox\" displayName=\"Show Flat\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\" toolTip=\"Show Tasks/Reviews flattened instead of hierarchcial\"/>" +
+ "<XWidget displayName=\"Include Cancelled\" xwidgetType=\"XCheckBox\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
+ //
+ "<XWidget displayName=\"Show Flat\" xwidgetType=\"XCheckBox\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\" toolTip=\"Show Tasks/Reviews flattened instead of hierarchcial\"/>" +
//
"</xWidgets>";
}
@@ -101,8 +104,9 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe
@Override
public Collection<? extends Artifact> performSearchGetResults(SearchType searchType) throws OseeCoreException {
Collection<Artifact> artifacts =
- new TeamWorldSearchItem("", getSelectedTeamDefinitions(), isIncludeCompletedCancelledCheckbox(), false, false,
- getSelectedVersionArtifact(), getSelectedUser(), getSelectedReleased()).performSearchGetResults(false);
+ new TeamWorldSearchItem("", getSelectedTeamDefinitions(), isIncludeCompletedCheckbox(),
+ isIncludeCancelledCheckbox(), false, false, getSelectedVersionArtifact(), getSelectedUser(),
+ getSelectedReleased()).performSearchGetResults(false);
return filterShowFlat(artifacts);
}
@@ -143,9 +147,15 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe
sb.append(" - Assignee: ");
sb.append(getSelectedUser());
}
- if (isIncludeCompletedCancelledCheckbox()) {
+ if (isIncludeCompletedCheckbox() && isIncludeCancelledCheckbox()) {
sb.append(" - Include Completed/Cancelled");
}
+ if (isIncludeCompletedCheckbox()) {
+ sb.append(" - Include Completed");
+ }
+ if (isIncludeCancelledCheckbox()) {
+ sb.append(" - Include Cancelled");
+ }
return Strings.truncate(getName() + sb.toString(), WorldEditor.TITLE_MAX_LENGTH, true);
}
@@ -155,8 +165,11 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe
if (widget.getLabel().equals("Assignee")) {
assigneeCombo = (XMembersCombo) widget;
}
- if (widget.getLabel().equals("Include Completed/Cancelled")) {
- includeCompletedCancelledCheckbox = (XCheckBox) widget;
+ if (widget.getLabel().equals("Include Completed")) {
+ includeCompletedCheckbox = (XCheckBox) widget;
+ }
+ if (widget.getLabel().equals("Include Cancelled")) {
+ includeCancelledCheckbox = (XCheckBox) widget;
}
if (widget.getLabel().equals("Show Flat")) {
showFlatCheckbox = (XCheckBox) widget;
@@ -215,16 +228,29 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe
}
}
- protected boolean isIncludeCompletedCancelledCheckbox() {
- if (includeCompletedCancelledCheckbox == null) {
+ protected boolean isIncludeCancelledCheckbox() {
+ if (includeCancelledCheckbox == null) {
+ return false;
+ }
+ return includeCancelledCheckbox.isSelected();
+ }
+
+ public void setIncludeCancelledCheckbox(boolean selected) {
+ if (includeCancelledCheckbox != null) {
+ includeCancelledCheckbox.set(selected);
+ }
+ }
+
+ protected boolean isIncludeCompletedCheckbox() {
+ if (includeCompletedCheckbox == null) {
return false;
}
- return includeCompletedCancelledCheckbox.isSelected();
+ return includeCompletedCheckbox.isSelected();
}
- public void includeCompletedCancelledCheckbox(boolean selected) {
- if (includeCompletedCancelledCheckbox != null) {
- includeCompletedCancelledCheckbox.set(selected);
+ public void setIncludeCompletedCheckbox(boolean selected) {
+ if (includeCompletedCheckbox != null) {
+ includeCompletedCheckbox.set(selected);
}
}
@@ -324,7 +350,7 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe
if (user != null) {
selected = true;
}
- boolean includeCompleted = isIncludeCompletedCancelledCheckbox();
+ boolean includeCompleted = isIncludeCompletedCheckbox() || isIncludeCancelledCheckbox();
if (!selected) {
return new Result("You must select at least Team, Version or Assignee.");
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java
index 095e8b86b77..59d3bbdddd2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java
@@ -84,7 +84,7 @@ public class UserSearchWorkflowSearchItem extends WorldEditorParameterSearchItem
public String getParameterXWidgetXml() {
return "<xWidgets>" +
//
- "<XWidget xwidgetType=\"XMembersCombo\" beginComposite=\"14\" displayName=\"User\" horizontalLabel=\"true\"/>" +
+ "<XWidget xwidgetType=\"XMembersCombo\" beginComposite=\"10\" displayName=\"User\" horizontalLabel=\"true\"/>" +
//
"<XWidget displayName=\"Assignee\" xwidgetType=\"XCheckBox\" defaultValue=\"true\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
//
@@ -94,7 +94,7 @@ public class UserSearchWorkflowSearchItem extends WorldEditorParameterSearchItem
//
"<XWidget displayName=\"Favorites\" xwidgetType=\"XCheckBox\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
//
- "<XWidget displayName=\"Include Team Workflows\" xwidgetType=\"XCheckBox\" defaultValue=\"true\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Include Team Workflows\" beginComposite=\"6\" xwidgetType=\"XCheckBox\" defaultValue=\"true\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
//
"<XWidget displayName=\"Include Reviews\" xwidgetType=\"XCheckBox\" defaultValue=\"true\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
//
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/AtsNotification.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/AtsNotification.java
index 3e5cbcff4c2..539e5ea90dc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/AtsNotification.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/AtsNotification.java
@@ -100,17 +100,17 @@ public class AtsNotification {
public static void notifyOriginatorAndReset(AbstractWorkflowArtifact workflow, boolean resetOnly) throws OseeCoreException {
User preSaveOriginator = guidToOriginatorMap.get(workflow.getGuid());
if (preSaveOriginator == null || resetOnly) {
- User orig = workflow.getOriginator();
+ User orig = workflow.getCreatedBy();
if (orig == null) {
orig = UserManager.getUser();
guidToOriginatorMap.put(workflow.getGuid(), orig);
}
return;
}
- if (workflow.getOriginator() != null && !workflow.getOriginator().equals(preSaveOriginator)) {
+ if (workflow.getCreatedBy() != null && !workflow.getCreatedBy().equals(preSaveOriginator)) {
AtsNotifyUsers.getInstance().notify(workflow, AtsNotifyUsers.NotifyType.Originator);
}
- guidToOriginatorMap.put(workflow.getGuid(), workflow.getOriginator());
+ guidToOriginatorMap.put(workflow.getGuid(), workflow.getCreatedBy());
}
public static Set<IAtsNotification> getAtsNotificationItems() {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CancelMultipleWorkflows.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CancelMultipleWorkflows.java
index 11039d7a059..a4a52330911 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CancelMultipleWorkflows.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CancelMultipleWorkflows.java
@@ -16,8 +16,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.ats.world.WorldEditor;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -51,7 +52,8 @@ public class CancelMultipleWorkflows extends Action {
return;
}
for (AbstractWorkflowArtifact sma : smas) {
- Result result = sma.isTransitionValid(DefaultTeamState.Cancelled.name(), null, TransitionOption.None);
+ TransitionManager transitionMgr = new TransitionManager(sma);
+ Result result = transitionMgr.isTransitionValid(TeamState.Cancelled, null, TransitionOption.None);
if (result.isFalse()) {
result.popup();
return;
@@ -61,7 +63,9 @@ public class CancelMultipleWorkflows extends Action {
if (ed.open() == 0) {
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Cancel Multiple Workflows");
for (AbstractWorkflowArtifact sma : smas) {
- Result result = sma.transitionToCancelled(ed.getEntry(), transaction, TransitionOption.Persist);
+ TransitionManager transitionMgr = new TransitionManager(sma);
+ Result result =
+ transitionMgr.transitionToCancelled(ed.getEntry(), transaction, TransitionOption.Persist);
if (result.isFalse()) {
result.popup();
return;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CompleteMultipleWorkflows.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CompleteMultipleWorkflows.java
index b01a041f5f0..4de1d70ecec 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CompleteMultipleWorkflows.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CompleteMultipleWorkflows.java
@@ -16,8 +16,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.ats.world.WorldEditor;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -52,7 +53,8 @@ public class CompleteMultipleWorkflows extends Action {
return;
}
for (AbstractWorkflowArtifact sma : smas) {
- Result result = sma.isTransitionValid(DefaultTeamState.Completed.name(), null, TransitionOption.None);
+ TransitionManager transitionMgr = new TransitionManager(sma);
+ Result result = transitionMgr.isTransitionValid(TeamState.Completed, null, TransitionOption.None);
if (result.isFalse()) {
result.popup();
return;
@@ -65,7 +67,9 @@ public class CompleteMultipleWorkflows extends Action {
SkynetTransaction transaction =
new SkynetTransaction(AtsUtil.getAtsBranch(), "Complete Multiple Workflows");
for (AbstractWorkflowArtifact sma : smas) {
- Result result = sma.transitionToCompleted(ed.getEntry(), transaction, TransitionOption.Persist);
+ TransitionManager transitionMgr = new TransitionManager(sma);
+ Result result =
+ transitionMgr.transitionToCompleted(ed.getEntry(), transaction, TransitionOption.Persist);
if (result.isFalse()) {
result.popup();
return;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java
index 4ca9d0cac4d..fbf1479d40c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.operation;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -121,6 +122,8 @@ public class DuplicateWorkflowBlam extends AbstractBlam {
private void handleCreateNewWorkflow(Collection<TeamWorkFlowArtifact> teamArts, String title) throws OseeCoreException {
Set<TeamWorkFlowArtifact> newTeamArts = new HashSet<TeamWorkFlowArtifact>();
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Duplicate Workflow");
+ Date createdDate = new Date();
+ User createdBy = UserManager.getUser();
for (TeamWorkFlowArtifact teamArt : teamArts) {
Collection<User> assignees = teamArt.getStateMgr().getAssignees();
if (!assignees.contains(UserManager.getUser())) {
@@ -128,7 +131,7 @@ public class DuplicateWorkflowBlam extends AbstractBlam {
}
TeamWorkFlowArtifact newTeamArt =
ActionManager.createTeamWorkflow(teamArt.getParentActionArtifact(), teamArt.getTeamDefinition(),
- teamArt.getActionableItemsDam().getActionableItems(), assignees, transaction,
+ teamArt.getActionableItemsDam().getActionableItems(), assignees, transaction, createdDate, createdBy,
CreateTeamOption.Duplicate_If_Exists);
if (Strings.isValid(title)) {
newTeamArt.setName(title);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java
index 5b0cd1a4c79..8874c6ed23f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.operation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.ats.artifact.AbstractTaskableArtifact;
@@ -25,6 +26,7 @@ import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
@@ -89,7 +91,9 @@ public class ImportTasksFromSimpleList extends AbstractBlam {
final TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) artifact;
SkynetTransaction transaction =
new SkynetTransaction(AtsUtil.getAtsBranch(), "Import Tasks from Simple List");
- teamArt.createTasks(titles, assignees, transaction);
+ Date createdDate = new Date();
+ User createdBy = UserManager.getUser();
+ teamArt.createTasks(titles, assignees, createdDate, createdBy, transaction);
teamArt.persist(transaction);
transaction.execute();
} catch (Exception ex) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java
index fc7897d7028..893f7407070 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java
@@ -20,12 +20,12 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.TaskArtifact;
-import org.eclipse.osee.ats.artifact.TaskArtifact.TaskStates;
+import org.eclipse.osee.ats.artifact.TaskStates;
+import org.eclipse.osee.ats.internal.workflow.SMAState;
+import org.eclipse.osee.ats.internal.workflow.XCurrentStateDam;
+import org.eclipse.osee.ats.internal.workflow.XStateDam;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.widgets.SMAState;
-import org.eclipse.osee.ats.util.widgets.XCurrentStateDam;
-import org.eclipse.osee.ats.util.widgets.XStateDam;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeExceptions;
@@ -93,10 +93,10 @@ public class TaskMetrics extends AbstractBlam {
private void tallyState(TaskArtifact task) throws OseeCoreException {
XStateDam stateDam = new XStateDam(task);
- SMAState state = stateDam.getState(TaskStates.InWork.name(), false);
+ SMAState state = stateDam.getState(TaskStates.InWork, false);
if (state == null) {
XCurrentStateDam currentStateDam = new XCurrentStateDam(task);
- state = currentStateDam.getState(TaskStates.InWork.name(), false);
+ state = currentStateDam.getState(TaskStates.InWork, false);
}
for (User user : state.getAssignees()) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java
index 97457212374..c4b17f79603 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java
@@ -26,6 +26,7 @@ import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.column.ChangeTypeColumn;
import org.eclipse.osee.ats.column.CreatedDateColumn;
import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
@@ -124,7 +125,7 @@ public class ExtendedStatusReportJob extends Job {
monitor.subTask(str);
for (TeamWorkFlowArtifact team : actionArt.getTeamWorkFlowArtifacts()) {
addTableRow(sb, team);
- for (TaskArtifact taskArt : team.getTaskArtifacts("Implement")) {
+ for (TaskArtifact taskArt : team.getTaskArtifacts(TeamState.Implement)) {
addTableRow(sb, taskArt);
}
}
@@ -198,11 +199,11 @@ public class ExtendedStatusReportJob extends Job {
}
private static void handleOriginatorColumn(AbstractWorkflowArtifact sma, List<String> values) throws OseeCoreException {
- if (sma.getOriginator() == null) {
+ if (sma.getCreatedBy() == null) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Can't retrieve orig for " + sma.getHumanReadableId());
values.add(".");
} else {
- values.add(sma.getOriginator().getName());
+ values.add(sma.getCreatedBy().getName());
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/IXTaskViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/IXTaskViewer.java
index 04f39929816..77b94e8f491 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/IXTaskViewer.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/IXTaskViewer.java
@@ -15,6 +15,7 @@ import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.plugin.core.IActionable;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
/**
@@ -24,7 +25,9 @@ public interface IXTaskViewer {
public String getTabName() throws OseeCoreException;
- public Collection<TaskArtifact> getTaskArtifacts(String stateName) throws OseeCoreException;
+ public Collection<TaskArtifact> getTaskArtifacts(IWorkPage state) throws OseeCoreException;
+
+ public Collection<TaskArtifact> getTaskArtifacts() throws OseeCoreException;
public IDirtiableEditor getEditor() throws OseeCoreException;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java
index 107956c5a0d..90610d3cf5b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java
@@ -14,6 +14,7 @@ package org.eclipse.osee.ats.task;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -42,6 +43,7 @@ import org.eclipse.osee.ats.world.WorldXViewerEventManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactData;
import org.eclipse.osee.framework.skynet.core.artifact.PurgeArtifacts;
@@ -97,8 +99,7 @@ public class TaskComposite extends Composite implements IWorldViewerEventHandler
showReleaseMetricsLabel = new Label(this, SWT.NONE);
showReleaseMetricsLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- taskXViewer =
- new TaskXViewer(this, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, iXTaskViewer.getEditor());
+ taskXViewer = new TaskXViewer(this, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, iXTaskViewer.getEditor());
taskXViewer.setTasksEditable(iXTaskViewer.isTasksEditable());
taskXViewer.setNewTaskSelectionEnabled(iXTaskViewer.isTasksEditable());
taskXViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -145,7 +146,7 @@ public class TaskComposite extends Composite implements IWorldViewerEventHandler
public void loadTable() throws OseeCoreException {
this.taskArts.clear();
- add(iXTaskViewer.getTaskArtifacts(""));
+ add(iXTaskViewer.getTaskArtifacts());
}
public void handleDeleteTask() {
@@ -213,7 +214,9 @@ public class TaskComposite extends Composite implements IWorldViewerEventHandler
MessageDialog.QUESTION, new String[] {"OK", "Cancel"}, 0);
if (ed.open() == 0) {
try {
- taskArt = ((AbstractTaskableArtifact) iXTaskViewer.getSma()).createNewTask(ed.getEntry());
+ taskArt =
+ ((AbstractTaskableArtifact) iXTaskViewer.getSma()).createNewTask(ed.getEntry(), new Date(),
+ UserManager.getUser());
iXTaskViewer.getEditor().onDirtied();
add(Collections.singleton(taskArt));
AtsCacheManager.decacheTaskArtifacts((AbstractTaskableArtifact) iXTaskViewer.getSma());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
index 7a96d715fdc..e68bf0dd3ac 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
@@ -42,6 +42,7 @@ import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.artifact.editor.AbstractArtifactEditor;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.swt.CursorManager;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
@@ -346,7 +347,12 @@ public class TaskEditor extends AbstractArtifactEditor implements IActionable, I
}
@Override
- public Collection<TaskArtifact> getTaskArtifacts(String stateName) {
+ public Collection<TaskArtifact> getTaskArtifacts(IWorkPage state) {
+ return tasks;
+ }
+
+ @Override
+ public Collection<TaskArtifact> getTaskArtifacts() {
return tasks;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java
index 076279b2bda..f1d3b1ff439 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskXViewer.java
@@ -100,7 +100,7 @@ public class TaskXViewer extends WorldXViewer {
return null;
}
- public boolean isSelectedTaskArtifactsAreInWork() {
+ public boolean isSelectedTaskArtifactsAreInWork() throws OseeCoreException {
Iterator<?> i = ((IStructuredSelection) getSelection()).iterator();
while (i.hasNext()) {
Object obj = i.next();
@@ -197,7 +197,11 @@ public class TaskXViewer extends WorldXViewer {
// EDIT MENU BLOCK
mm.insertBefore(WorldXViewer.MENU_GROUP_ATS_WORLD_EDIT, editTaskTitleAction);
- editTaskTitleAction.setEnabled(isTasksEditable() && getSelectedArtifacts().size() == 1 && isSelectedTaskArtifactsAreInWork());
+ try {
+ editTaskTitleAction.setEnabled(isTasksEditable() && getSelectedArtifacts().size() == 1 && isSelectedTaskArtifactsAreInWork());
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ }
mm.insertBefore(WorldXViewer.MENU_GROUP_ATS_WORLD_EDIT, editTaskStatusAction);
editTaskStatusAction.setEnabled(isTasksEditable() && getSelectedArtifacts().size() > 0);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java
index fa77a28a814..14e2961a86b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionManager.java
@@ -22,7 +22,6 @@ import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.TeamDefinitionArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkflowExtensions;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.column.ChangeTypeColumn;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.framework.core.data.IArtifactType;
@@ -38,13 +37,14 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.skynet.util.ChangeType;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
/**
* @author Donald G. Dunne
*/
public class ActionManager {
- public static ActionArtifact createAction(IProgressMonitor monitor, String title, String desc, ChangeType changeType, String priority, boolean validationRequired, Date needByDate, Collection<ActionableItemArtifact> actionableItems, SkynetTransaction transaction) throws OseeCoreException {
+ public static ActionArtifact createAction(IProgressMonitor monitor, String title, String desc, ChangeType changeType, String priority, boolean validationRequired, Date needByDate, Collection<ActionableItemArtifact> actionableItems, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
// if "tt" is title, this is an action created for development. To
// make it easier, all fields are automatically filled in for ATS developer
@@ -70,14 +70,14 @@ public class ActionManager {
// Create team workflow artifacts
for (TeamDefinitionArtifact teamDef : teams) {
- createTeamWorkflow(actionArt, teamDef, actionableItems, teamDef.getLeads(actionableItems), transaction);
+ createTeamWorkflow(actionArt, teamDef, actionableItems, teamDef.getLeads(actionableItems), transaction,
+ createdDate, createdBy);
}
actionArt.persist(transaction);
return actionArt;
-
}
- public static TeamWorkFlowArtifact createTeamWorkflow(ActionArtifact actionArt, TeamDefinitionArtifact teamDef, Collection<ActionableItemArtifact> actionableItems, Collection<User> assignees, SkynetTransaction transaction, CreateTeamOption... createTeamOption) throws OseeCoreException {
+ public static TeamWorkFlowArtifact createTeamWorkflow(ActionArtifact actionArt, TeamDefinitionArtifact teamDef, Collection<ActionableItemArtifact> actionableItems, Collection<User> assignees, SkynetTransaction transaction, Date createdDate, User createdBy, CreateTeamOption... createTeamOption) throws OseeCoreException {
IArtifactType teamWorkflowArtifact = AtsArtifactTypes.TeamWorkflow;
IAtsTeamWorkflow teamExt = null;
@@ -97,8 +97,8 @@ public class ActionManager {
// NOTE: The persist of the workflow will auto-email the assignees
TeamWorkFlowArtifact teamArt =
- createTeamWorkflow(actionArt, teamDef, actionableItems, assignees, teamWorkflowArtifact, transaction,
- createTeamOption);
+ createTeamWorkflow(actionArt, teamDef, actionableItems, assignees, createdDate, createdBy, null, null,
+ teamWorkflowArtifact, transaction, createTeamOption);
// Notify extension that workflow was created
if (teamExt != null) {
teamExt.teamWorkflowCreated(teamArt);
@@ -106,12 +106,7 @@ public class ActionManager {
return teamArt;
}
- public static TeamWorkFlowArtifact createTeamWorkflow(ActionArtifact actionArt, TeamDefinitionArtifact teamDef, Collection<ActionableItemArtifact> actionableItems, Collection<User> assignees, IArtifactType artifactType, SkynetTransaction transaction, CreateTeamOption... createTeamOption) throws OseeCoreException {
- return createTeamWorkflow(actionArt, teamDef, actionableItems, assignees, null, null, artifactType, transaction,
- createTeamOption);
- }
-
- public static TeamWorkFlowArtifact createTeamWorkflow(ActionArtifact actionArt, TeamDefinitionArtifact teamDef, Collection<ActionableItemArtifact> actionableItems, Collection<User> assignees, String guid, String hrid, IArtifactType artifactType, SkynetTransaction transaction, CreateTeamOption... createTeamOption) throws OseeCoreException {
+ public static TeamWorkFlowArtifact createTeamWorkflow(ActionArtifact actionArt, TeamDefinitionArtifact teamDef, Collection<ActionableItemArtifact> actionableItems, Collection<User> assignees, Date createdDate, User createdBy, String guid, String hrid, IArtifactType artifactType, SkynetTransaction transaction, CreateTeamOption... createTeamOption) throws OseeCoreException {
if (!Collections.getAggregate(createTeamOption).contains(CreateTeamOption.Duplicate_If_Exists)) {
// Make sure team doesn't already exist
@@ -131,9 +126,8 @@ public class ActionManager {
teamArt =
(TeamWorkFlowArtifact) ArtifactTypeManager.addArtifact(artifactType, AtsUtil.getAtsBranch(), guid, hrid);
}
- setArtifactIdentifyData(actionArt, teamArt);
- teamArt.getLog().addLog(LogType.Originated, "", "");
+ setArtifactIdentifyData(actionArt, teamArt);
// Relate Workflow to ActionableItems (by guid) if team is responsible
// for that AI
@@ -147,9 +141,8 @@ public class ActionManager {
teamArt.setTeamDefinition(teamDef);
// Initialize state machine
- String startState = teamArt.getWorkFlowDefinition().getStartPage().getPageName();
- teamArt.getStateMgr().initializeStateMachine(startState, assignees);
- teamArt.getLog().addLog(LogType.StateEntered, startState, "");
+ WorkPageDefinition startPage = teamArt.getWorkFlowDefinition().getStartPage();
+ teamArt.initializeNewStateMachine(startPage, assignees, createdDate, createdBy);
// Relate Action to WorkFlow
actionArt.addRelation(AtsRelationTypes.ActionToWorkflow_WorkFlow, teamArt);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionableItemManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionableItemManager.java
index b96831c3871..56859c8221a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionableItemManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ActionableItemManager.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.util;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -63,10 +64,12 @@ public class ActionableItemManager {
final StringBuffer sb = new StringBuffer();
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Edit Actionable Items");
+ Date createdDate = new Date();
+ User createdBy = UserManager.getUser();
// Add new aias
for (ActionableItemArtifact aia : diag.getChecked()) {
- Result result = addActionableItemToTeamsOrAddTeams(actionArt, aia, UserManager.getUser(), transaction);
+ Result result = addActionableItemToTeamsOrAddTeams(actionArt, aia, createdDate, createdBy, transaction);
sb.append(result.getText());
}
// Remove unchecked aias
@@ -83,7 +86,7 @@ public class ActionableItemManager {
return new Result(true, sb.toString());
}
- public static Result addActionableItemToTeamsOrAddTeams(ActionArtifact actionArt, ActionableItemArtifact aia, User originator, SkynetTransaction transaction) throws OseeCoreException {
+ public static Result addActionableItemToTeamsOrAddTeams(ActionArtifact actionArt, ActionableItemArtifact aia, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
StringBuffer sb = new StringBuffer();
for (TeamDefinitionArtifact tda : TeamDefinitionArtifact.getImpactedTeamDefs(Arrays.asList(aia))) {
boolean teamExists = false;
@@ -106,10 +109,8 @@ public class ActionableItemManager {
}
if (!teamExists) {
TeamWorkFlowArtifact teamArt =
- ActionManager.createTeamWorkflow(actionArt, tda, Arrays.asList(aia), tda.getLeads(), transaction);
- if (originator != null) {
- teamArt.getLog().setOriginator(originator);
- }
+ ActionManager.createTeamWorkflow(actionArt, tda, Arrays.asList(aia), tda.getLeads(), transaction,
+ createdDate, createdBy);
teamArt.persist(transaction);
sb.append(aia.getName() + " => added team workflow \"" + tda.getName() + "\"\n");
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ArtifactEmailWizard.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ArtifactEmailWizard.java
index 5995ae5be03..53c5a7f0939 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ArtifactEmailWizard.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/ArtifactEmailWizard.java
@@ -33,7 +33,7 @@ public class ArtifactEmailWizard extends EmailWizard {
private static List<EmailGroup> getEmailableGroups(AbstractWorkflowArtifact workflow) throws OseeCoreException {
ArrayList<EmailGroup> groupNames = new ArrayList<EmailGroup>();
ArrayList<String> emails = new ArrayList<String>();
- emails.add(workflow.getOriginator().getEmail());
+ emails.add(workflow.getCreatedBy().getEmail());
groupNames.add(new EmailGroup("Originator", emails));
if (workflow.getStateMgr().getAssignees().size() > 0) {
emails = new ArrayList<String>();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactChecks.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactChecks.java
index d7a88ace671..c3afa7fc73f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactChecks.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsArtifactChecks.java
@@ -91,7 +91,8 @@ public class AtsArtifactChecks extends ArtifactCheck {
if (teamDefs.size() > 0) {
TeamWorldSearchItem srch =
- new TeamWorldSearchItem("Team Def search", teamDefs, true, false, true, null, null, ReleasedOption.Both);
+ new TeamWorldSearchItem("Team Def search", teamDefs, true, true, false, true, null, null,
+ ReleasedOption.Both);
if (srch.performSearchGetResults(false).size() > 0) {
return "Team Definition (or children Team Definitions) selected to delete have related Team Workflows; Delete or re-assign Team Workflows first.";
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java
index e60ed6c5b1e..747202a7aaf 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchCommitJob.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.util;
+import java.util.Date;
import java.util.logging.Level;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -24,9 +25,11 @@ import org.eclipse.osee.ats.editor.stateItem.IAtsStateItem;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.widgets.ReviewManager;
import org.eclipse.osee.ats.workflow.item.StateEventType;
+import org.eclipse.osee.framework.core.data.SystemUser;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.conflict.ConflictManagerExternal;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
@@ -67,7 +70,7 @@ public class AtsBranchCommitJob extends Job {
// Loop through this state's blocking reviews to confirm complete
if (teamArt.isTeamWorkflow()) {
for (AbstractReviewArtifact reviewArt : ReviewManager.getReviewsFromCurrentState(teamArt)) {
- if (reviewArt.getReviewBlockType() == ReviewBlockType.Commit && !reviewArt.isCancelledOrCompleted()) {
+ if (reviewArt.getReviewBlockType() == ReviewBlockType.Commit && !reviewArt.isCompletedOrCancelled()) {
return new Status(IStatus.ERROR, AtsPlugin.PLUGIN_ID,
"Blocking Review must be completed before commit.");
}
@@ -126,7 +129,8 @@ public class AtsBranchCommitJob extends Job {
if (branchCommitted) {
// Create reviews as necessary
SkynetTransaction transaction = new SkynetTransaction(AtsUtil.getAtsBranch(), "Create Reviews upon Commit");
- AtsBranchManager.createNecessaryBranchEventReviews(StateEventType.CommitBranch, teamArt, transaction);
+ AtsBranchManager.createNecessaryBranchEventReviews(StateEventType.CommitBranch, teamArt, new Date(),
+ UserManager.getUser(SystemUser.OseeSystem), transaction);
transaction.execute();
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java
index 55669e4ab8d..754096c454d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java
@@ -39,6 +39,7 @@ import org.eclipse.osee.ats.workflow.item.AtsAddDecisionReviewRule.DecisionRuleO
import org.eclipse.osee.ats.workflow.item.AtsAddPeerToPeerReviewRule;
import org.eclipse.osee.ats.workflow.item.StateEventType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.SystemUser;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
@@ -56,6 +57,8 @@ import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.plugin.core.util.IExceptionableRunnable;
import org.eclipse.osee.framework.plugin.core.util.Jobs;
+import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.change.Change;
import org.eclipse.osee.framework.skynet.core.conflict.ConflictManagerExternal;
@@ -370,8 +373,7 @@ public class AtsBranchManager {
}
if (teamArt.getTargetedVersion().getParentBranch() == null) {
- return new Result(false,
- "Parent Branch not configured for Version [" + teamArt.getTargetedVersion() + "]");
+ return new Result(false, "Parent Branch not configured for Version [" + teamArt.getTargetedVersion() + "]");
}
if (!teamArt.getTargetedVersion().getParentBranch().getBranchType().isBaselineBranch()) {
return new Result(false, "Parent Branch must be of Baseline branch type. See Admin for configuration.");
@@ -409,8 +411,7 @@ public class AtsBranchManager {
}
if (teamArt.getTargetedVersion().getParentBranch() == null) {
- return new Result(false,
- "Parent Branch not configured for Version [" + teamArt.getTargetedVersion() + "]");
+ return new Result(false, "Parent Branch not configured for Version [" + teamArt.getTargetedVersion() + "]");
}
return Result.TrueResult;
@@ -657,7 +658,7 @@ public class AtsBranchManager {
return Result.TrueResult;
}
- public static void createNecessaryBranchEventReviews(StateEventType stateEventType, TeamWorkFlowArtifact teamArt, SkynetTransaction transaction) throws OseeCoreException {
+ public static void createNecessaryBranchEventReviews(StateEventType stateEventType, TeamWorkFlowArtifact teamArt, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
if (stateEventType != StateEventType.CommitBranch && stateEventType != StateEventType.CreateBranch) {
throw new OseeStateException("Invalid stateEventType [%s]", stateEventType);
}
@@ -668,8 +669,8 @@ public class AtsBranchManager {
if (eventType != null && eventType.equals(stateEventType)) {
if (ruleId.equals(AtsAddDecisionReviewRule.ID)) {
DecisionReviewArtifact decArt =
- AtsAddDecisionReviewRule.createNewDecisionReview(workRuleDef, transaction, teamArt,
- DecisionRuleOption.TransitionToDecision);
+ AtsAddDecisionReviewRule.createNewDecisionReview(workRuleDef, transaction, teamArt, createdDate,
+ createdBy, DecisionRuleOption.TransitionToDecision);
if (decArt != null) {
decArt.persist(transaction);
}
@@ -722,7 +723,8 @@ public class AtsBranchManager {
// Create reviews as necessary
SkynetTransaction transaction =
new SkynetTransaction(AtsUtil.getAtsBranch(), "Create Reviews upon Transition");
- createNecessaryBranchEventReviews(StateEventType.CreateBranch, teamArt, transaction);
+ createNecessaryBranchEventReviews(StateEventType.CreateBranch, teamArt, new Date(),
+ UserManager.getUser(SystemUser.OseeSystem), transaction);
transaction.execute();
return Status.OK_STATUS;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java
index 0ad98a13ff2..42bd67badbe 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsNotifyUsers.java
@@ -19,8 +19,6 @@ import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.ActionableItemArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.artifact.log.LogItem;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.widgets.role.UserRole;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -97,7 +95,7 @@ public class AtsNotifyUsers implements IArtifactEventListener {
List<NotifyType> types = Collections.getAggregate(notifyTypes);
if (types.contains(NotifyType.Originator)) {
- User originator = sma.getOriginator();
+ User originator = sma.getCreatedBy();
if (originator.isActive()) {
if (!EmailUtil.isEmailValid(originator)) {
OseeLog.log(AtsPlugin.class, Level.INFO,
@@ -134,7 +132,7 @@ public class AtsNotifyUsers implements IArtifactEventListener {
}
}
if (types.contains(NotifyType.Cancelled) || types.contains(NotifyType.Completed) && ((sma.isTeamWorkflow() || sma instanceof AbstractReviewArtifact) && (sma.isCompleted() || sma.isCancelled()))) {
- User originator = sma.getOriginator();
+ User originator = sma.getCreatedBy();
if (originator.isActive()) {
if (!EmailUtil.isEmailValid(originator)) {
OseeLog.log(AtsPlugin.class, Level.INFO,
@@ -146,12 +144,11 @@ public class AtsNotifyUsers implements IArtifactEventListener {
sma.getArtifactTypeName(), sma.getName())));
}
if (sma.isCancelled()) {
- LogItem cancelledItem = sma.getLog().getStateEvent(LogType.StateCancelled);
notificationManager.addNotificationEvent(new OseeNotificationEvent(Arrays.asList(originator),
getIdString(sma), NotifyType.Cancelled.name(), String.format(
"[%s] titled [%s] was cancelled from the [%s] state on [%s].<br>Reason: [%s]",
- sma.getArtifactTypeName(), sma.getName(), cancelledItem.getState(),
- cancelledItem.getDate(DateUtil.MMDDYYHHMM), cancelledItem.getMsg())));
+ sma.getArtifactTypeName(), sma.getName(), sma.getCancelledFromState(),
+ DateUtil.getMMDDYYHHMM(sma.internalGetCancelledDate()), sma.getCancelledReason())));
}
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DeadlineManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DeadlineManager.java
index 47ac4b6bf81..209dc2315c4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DeadlineManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DeadlineManager.java
@@ -17,6 +17,7 @@ import org.eclipse.osee.ats.column.DeadlineColumn;
import org.eclipse.osee.ats.column.EstimatedCompletionDateColumn;
import org.eclipse.osee.ats.column.EstimatedReleaseDateColumn;
import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.plugin.util.Result;
@@ -52,8 +53,12 @@ public class DeadlineManager {
}
public static Result isDeadlineDateOverdue(AbstractWorkflowArtifact sma) {
- if (sma.isCompleted() || sma.isCancelled()) {
- return Result.FalseResult;
+ try {
+ if (sma.isCompleted() || sma.isCancelled()) {
+ return Result.FalseResult;
+ }
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
if (new Date().after(getDeadlineDate(sma))) {
return new Result(true, "Need By Date has passed.");
@@ -62,8 +67,12 @@ public class DeadlineManager {
}
public static Result isEcdDateOverdue(AbstractWorkflowArtifact sma) {
- if (sma.isCompleted() || sma.isCancelled()) {
- return Result.FalseResult;
+ try {
+ if (sma.isCompleted() || sma.isCancelled()) {
+ return Result.FalseResult;
+ }
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
}
Date ecdDate = getEcdDate(sma);
Date deadlineDate = getDeadlineDate(sma);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DefaultTeamState.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DefaultTeamState.java
deleted file mode 100644
index c345f5e2d6a..00000000000
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DefaultTeamState.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.util;
-
-public enum DefaultTeamState {
- Endorse,
- Analyze,
- Authorize,
- Implement,
- Completed,
- Cancelled
-}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java
index 3a0808d4935..2db4eca5003 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/GoalManager.java
@@ -15,6 +15,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -22,8 +23,7 @@ import org.eclipse.jface.window.Window;
import org.eclipse.nebula.widgets.xviewer.XViewerCells;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.GoalArtifact;
-import org.eclipse.osee.ats.artifact.GoalArtifact.GoalState;
-import org.eclipse.osee.ats.artifact.log.LogType;
+import org.eclipse.osee.ats.artifact.GoalState;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -164,14 +164,11 @@ public final class GoalManager {
public static GoalArtifact createGoal(String title) throws OseeCoreException {
GoalArtifact goalArt =
- (GoalArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.Goal, AtsUtil.getAtsBranch());
- goalArt.setName(title);
- goalArt.getLog().addLog(LogType.Originated, "", "");
+ (GoalArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.Goal, AtsUtil.getAtsBranch(), title);
// Initialize state machine
- goalArt.getStateMgr().initializeStateMachine(GoalState.InWork.name(),
- Collections.singleton(UserManager.getUser()));
- goalArt.getLog().addLog(LogType.StateEntered, GoalState.InWork.name(), "");
+ goalArt.initializeNewStateMachine(GoalState.InWork, Collections.singleton(UserManager.getUser()), new Date(),
+ UserManager.getUser());
return goalArt;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java
index 35ca278cdb8..8d767befd72 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.util.Import;
import java.io.FileFilter;
import java.io.InputStreamReader;
import java.net.URI;
+import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;
@@ -113,12 +114,14 @@ public class ExcelAtsActionArtifactExtractor {
public void createArtifactsAndNotify(SkynetTransaction transaction) {
AtsUtil.setEmailEnabled(false);
Set<TeamWorkFlowArtifact> teamWfs = new HashSet<TeamWorkFlowArtifact>();
+ Date createdDate = new Date();
try {
+ User createdBy = UserManager.getUser();
for (ActionData aData : actionDatas) {
ActionArtifact actionArt =
ActionManager.createAction(null, aData.title, aData.desc, ChangeType.getChangeType(aData.changeType),
aData.priorityStr, false, null, ActionableItemArtifact.getActionableItems(aData.actionableItems),
- transaction);
+ createdDate, createdBy, transaction);
actionArts.add(actionArt);
if (!aData.version.equals("")) {
Artifact verArt = AtsCacheManager.getSoleArtifactByName(AtsArtifactTypes.Version, aData.version);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java
index 99c6fe75795..2c9c4a6526b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java
@@ -14,6 +14,7 @@ package org.eclipse.osee.ats.util.Import;
import java.io.FileFilter;
import java.io.InputStreamReader;
import java.net.URI;
+import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import java.util.logging.Level;
@@ -101,12 +102,16 @@ public class ExcelAtsTaskArtifactExtractor {
private final AbstractWorkflowArtifact sma;
private final SkynetTransaction transaction;
private final boolean emailPOCs;
+ private final Date createdDate;
+ private final User createdBy;
- protected InternalRowProcessor(IProgressMonitor monitor, SkynetTransaction transaction, AbstractWorkflowArtifact sma, boolean emailPOCs) {
+ protected InternalRowProcessor(IProgressMonitor monitor, SkynetTransaction transaction, AbstractWorkflowArtifact sma, boolean emailPOCs) throws OseeCoreException {
this.monitor = monitor;
this.transaction = transaction;
this.emailPOCs = emailPOCs;
this.sma = sma;
+ createdDate = new Date();
+ createdBy = UserManager.getUser();
}
@Override
@@ -144,7 +149,7 @@ public class ExcelAtsTaskArtifactExtractor {
try {
rowNum++;
monitor.setTaskName("Processing Row " + rowNum);
- TaskArtifact taskArt = ((AbstractTaskableArtifact) sma).createNewTask("");
+ TaskArtifact taskArt = ((AbstractTaskableArtifact) sma).createNewTask("", createdDate, createdBy);
monitor.subTask("Validating...");
boolean valid = validateRow(row);
@@ -323,7 +328,7 @@ public class ExcelAtsTaskArtifactExtractor {
OseeLog.log(AtsPlugin.class, Level.SEVERE,
String.format("Invalid Originator \"%s\" for row %d\nSetting to current user.", userName, rowNum));
}
- taskArt.getLog().setOriginator(u);
+ taskArt.internalSetCreatedBy(u);
}
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
index 5f8baead183..2f27d30a92a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java
@@ -20,10 +20,7 @@ import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.log.AtsLog;
-import org.eclipse.osee.ats.artifact.log.LogItem;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
-import org.eclipse.osee.ats.util.widgets.SMAState;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.enums.IRelationEnumeration;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -141,8 +138,8 @@ public class Overview {
AHTML.getLabelStr(labelFont, "State: ") + sma.getStateMgr().getCurrentStateName(),
AHTML.getLabelStr(labelFont, "Type: ") + sma.getArtifactTypeName(),
AHTML.getLabelStr(labelFont, "Id: ") + sma.getHumanReadableId()}));
- addTable(getLabelValue("Originator", sma.getOriginator().getName()),
- getLabelValue("Creation Date", DateUtil.getMMDDYYHHMM(sma.getLog().getCreationDate())));
+ addTable(getLabelValue("Originator", sma.getCreatedBy().getName()),
+ getLabelValue("Creation Date", DateUtil.getMMDDYYHHMM(sma.getCreatedDate())));
if (sma.isTeamWorkflow()) {
addTable(getLabelValue("Team", ((TeamWorkFlowArtifact) sma).getTeamName()),
getLabelValue("Assignees", Artifacts.toString("; ", sma.getStateMgr().getAssignees())));
@@ -151,9 +148,8 @@ public class Overview {
}
addTable(getLabelValue("Description", sma.getDescription()));
if (sma.isCancelled()) {
- LogItem item = sma.getLog().getStateEvent(LogType.StateCancelled);
- addTable(getLabelValue("Cancelled From", item.getState()));
- addTable(getLabelValue("Cancellation Reason", item.getMsg()));
+ addTable(getLabelValue("Cancelled From", sma.getCancelledFromState()));
+ addTable(getLabelValue("Cancellation Reason", sma.getCancelledReason()));
}
if (sma instanceof TaskArtifact) {
AbstractWorkflowArtifact parentArt = ((TaskArtifact) sma).getParentSMA();
@@ -282,12 +278,6 @@ public class Overview {
}
}
- public void startStateBorderTable(AbstractWorkflowArtifact sma, SMAState state) {
- String caption = state.getName();
- String assgn = Artifacts.toString("; ", state.getAssignees());
- startStateBorderTable(sma.getStateMgr().getCurrentStateName().equals(state.getName()), caption, assgn);
- }
-
public void startStateBorderTable(boolean active, String name, String assignee) {
if (Strings.isValid(assignee)) {
startBorderTable(active, String.format("%s (%s)", name, assignee));
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PriviledgedUserManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PriviledgedUserManager.java
index 4bd6734b544..4fbc9a26e58 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PriviledgedUserManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PriviledgedUserManager.java
@@ -78,7 +78,7 @@ public class PriviledgedUserManager {
teamArt.getTeamDefinition().hasWorkRule(
RuleWorkItemId.atsAllowPriviledgedEditToTeamMemberAndOriginator.name());
if (!users.contains(UserManager.getUser()) && (workPageToMemberAndOriginator || teamDefToMemberAndOriginator) && //
- teamArt.getOriginator().equals(UserManager.getUser()) && teamArt.getTeamDefinition().getMembers().contains(
+ teamArt.getCreatedBy().equals(UserManager.getUser()) && teamArt.getTeamDefinition().getMembers().contains(
UserManager.getUser())) {
users.add(UserManager.getUser());
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java
index b9d5525d9c2..221bbee80ed 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAMetrics.java
@@ -188,27 +188,27 @@ public class SMAMetrics {
return smas;
}
- public Collection<TeamWorkFlowArtifact> getCompletedTeamWorkflows() {
+ public Collection<TeamWorkFlowArtifact> getCompletedTeamWorkflows() throws OseeCoreException {
Set<TeamWorkFlowArtifact> teams = new HashSet<TeamWorkFlowArtifact>();
for (TeamWorkFlowArtifact team : getTeamArts()) {
- if (team.isCancelledOrCompleted()) {
+ if (team.isCompletedOrCancelled()) {
teams.add(team);
}
}
return teams;
}
- public Collection<AbstractWorkflowArtifact> getCompletedWorkflows() {
+ public Collection<AbstractWorkflowArtifact> getCompletedWorkflows() throws OseeCoreException {
Set<AbstractWorkflowArtifact> completed = new HashSet<AbstractWorkflowArtifact>();
for (AbstractWorkflowArtifact sma : smas) {
- if (sma.isCancelledOrCompleted()) {
+ if (sma.isCompletedOrCancelled()) {
completed.add(sma);
}
}
return completed;
}
- public double getPercentCompleteByTeamWorkflow() {
+ public double getPercentCompleteByTeamWorkflow() throws OseeCoreException {
if (getTeamArts().isEmpty()) {
return 0;
}
@@ -219,7 +219,7 @@ public class SMAMetrics {
return completed / getTeamArts().size() * 100;
}
- public double getPercentCompleteByWorkflow() {
+ public double getPercentCompleteByWorkflow() throws OseeCoreException {
if (smas.isEmpty()) {
return 0;
}
@@ -230,17 +230,17 @@ public class SMAMetrics {
return completed / smas.size() * 100;
}
- public Collection<TaskArtifact> getCompletedTaskWorkflows() {
+ public Collection<TaskArtifact> getCompletedTaskWorkflows() throws OseeCoreException {
Set<TaskArtifact> tasks = new HashSet<TaskArtifact>();
for (TaskArtifact team : getTaskArts()) {
- if (team.isCancelledOrCompleted()) {
+ if (team.isCompletedOrCancelled()) {
tasks.add(team);
}
}
return tasks;
}
- public double getPercentCompleteByTaskWorkflow() {
+ public double getPercentCompleteByTaskWorkflow() throws OseeCoreException {
if (getTaskArts().isEmpty()) {
return 0;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java
index 1b8ed065913..bd72f870ae4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SMAUtil.java
@@ -36,20 +36,20 @@ import org.eclipse.osee.framework.ui.skynet.util.ChangeType;
*/
public class SMAUtil {
- public static Collection<AbstractWorkflowArtifact> getCompletedCancelled(Collection<AbstractWorkflowArtifact> smas) {
+ public static Collection<AbstractWorkflowArtifact> getCompletedCancelled(Collection<AbstractWorkflowArtifact> smas) throws OseeCoreException {
List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(smas.size());
for (AbstractWorkflowArtifact sma : smas) {
- if (sma.isCancelledOrCompleted()) {
+ if (sma.isCompletedOrCancelled()) {
artifactsToReturn.add(sma);
}
}
return artifactsToReturn;
}
- public static Collection<AbstractWorkflowArtifact> getInWork(Collection<AbstractWorkflowArtifact> smas) {
+ public static Collection<AbstractWorkflowArtifact> getInWork(Collection<AbstractWorkflowArtifact> smas) throws OseeCoreException {
List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(smas.size());
for (AbstractWorkflowArtifact sma : smas) {
- if (!sma.isCancelledOrCompleted()) {
+ if (!sma.isCompletedOrCancelled()) {
artifactsToReturn.add(sma);
}
}
@@ -66,6 +66,26 @@ public class SMAUtil {
return artifactsToReturn;
}
+ public static Collection<AbstractWorkflowArtifact> filterOutCompleted(Collection<AbstractWorkflowArtifact> smas) throws OseeCoreException {
+ List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(smas.size());
+ for (AbstractWorkflowArtifact sma : smas) {
+ if (!sma.isCompleted()) {
+ artifactsToReturn.add(sma);
+ }
+ }
+ return artifactsToReturn;
+ }
+
+ public static Collection<AbstractWorkflowArtifact> filterOutCancelled(Collection<AbstractWorkflowArtifact> smas) throws OseeCoreException {
+ List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(smas.size());
+ for (AbstractWorkflowArtifact sma : smas) {
+ if (!sma.isCancelled()) {
+ artifactsToReturn.add(sma);
+ }
+ }
+ return artifactsToReturn;
+ }
+
public static Collection<AbstractWorkflowArtifact> filterOutTypes(Collection<AbstractWorkflowArtifact> smas, Collection<Class<?>> classes) {
List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(smas.size());
for (AbstractWorkflowArtifact sma : smas) {
@@ -87,7 +107,7 @@ public class SMAUtil {
for (AbstractWorkflowArtifact sma : artifacts) {
Date createDate = CreatedDateColumn.getDate(sma);
Date completedCancelDate = null;
- if (sma.isCancelledOrCompleted()) {
+ if (sma.isCompletedOrCancelled()) {
if (sma.isCancelled()) {
completedCancelDate = CancelledDateColumn.getDate(sma);
} else {
@@ -105,7 +125,7 @@ public class SMAUtil {
List<AbstractWorkflowArtifact> smas = new ArrayList<AbstractWorkflowArtifact>();
for (AbstractWorkflowArtifact sma : artifacts) {
Date completedCancelDate = null;
- if (sma.isCancelledOrCompleted()) {
+ if (sma.isCompletedOrCancelled()) {
if (sma.isCancelled()) {
completedCancelDate = CancelledDateColumn.getDate(sma);
} else {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SimpleTeamState.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SimpleTeamState.java
new file mode 100644
index 00000000000..dd15bc60211
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/SimpleTeamState.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.util;
+
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
+
+public class SimpleTeamState implements IWorkPage {
+ private final WorkPageType workPageType;
+ private final String name;
+
+ public SimpleTeamState(String name, WorkPageType workPageType) {
+ this.name = name;
+ this.workPageType = workPageType;
+ }
+
+ @Override
+ public WorkPageType getWorkPageType() {
+ return workPageType;
+ }
+
+ @Override
+ public String getPageName() {
+ return name;
+ }
+
+ @Override
+ public boolean isCompletedOrCancelledPage() {
+ return getWorkPageType().isCompletedOrCancelledPage();
+ }
+
+ @Override
+ public boolean isCompletedPage() {
+ return getWorkPageType().isCompletedPage();
+ }
+
+ @Override
+ public boolean isCancelledPage() {
+ return getWorkPageType().isCancelledPage();
+ }
+
+ @Override
+ public boolean isWorkingPage() {
+ return getWorkPageType().isWorkingPage();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java
index 1bb48137371..9b5b42fdb0a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/StateManager.java
@@ -17,22 +17,26 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
+import java.util.logging.Level;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.log.LogItem;
-import org.eclipse.osee.ats.artifact.log.LogType;
-import org.eclipse.osee.ats.util.widgets.SMAState;
-import org.eclipse.osee.ats.util.widgets.XCurrentStateDam;
-import org.eclipse.osee.ats.util.widgets.XStateDam;
+import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.ats.internal.workflow.SMAState;
+import org.eclipse.osee.ats.internal.workflow.XCurrentStateDam;
+import org.eclipse.osee.ats.internal.workflow.XStateDam;
import org.eclipse.osee.framework.core.data.SystemUser;
import org.eclipse.osee.framework.core.exception.OseeArgumentException;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -42,6 +46,7 @@ public class StateManager {
private final XCurrentStateDam currentStateDam;
private final XStateDam stateDam;
private final AbstractWorkflowArtifact sma;
+ private static final Set<String> notValidAttributeType = new HashSet<String>();
public StateManager(AbstractWorkflowArtifact sma) throws OseeCoreException {
super();
@@ -52,26 +57,28 @@ public class StateManager {
/**
* Get state and create if not there.
- *
- * @return state matching name
*/
- private SMAState getSMAState(String name, boolean create) throws OseeCoreException {
- if (currentStateDam.getState().getName().equals(name)) {
+ private SMAState getSMAState(IWorkPage state, boolean create) throws OseeCoreException {
+ if (currentStateDam.getState().getName().equals(state.getPageName())) {
return currentStateDam.getState();
} else {
- return stateDam.getState(name, create);
+ return stateDam.getState(state, create);
}
}
+ public boolean isInState(IWorkPage state) {
+ return (getCurrentStateName().equals(state.getPageName()));
+ }
+
/**
* Discouraged Access. This method should not normally be called except in cases were state data is being manually
* created.
*/
- public void internalCreateIfNotExists(String name) throws OseeCoreException {
- if (isStateVisited(name)) {
+ public void internalCreateIfNotExists(IWorkPage state) throws OseeCoreException {
+ if (isStateVisited(state)) {
return;
}
- SMAState smaState = getSMAState(name, true);
+ SMAState smaState = getSMAState(state, true);
putState(smaState);
}
@@ -91,16 +98,16 @@ public class StateManager {
*
* @return hours spent or 0 if none
*/
- public double getHoursSpent(String stateName) throws OseeCoreException {
- SMAState state = getSMAState(stateName, false);
- if (state == null) {
+ public double getHoursSpent(IWorkPage state) throws OseeCoreException {
+ SMAState smaState = getSMAState(state, false);
+ if (smaState == null) {
return 0.0;
}
- return state.getHoursSpent();
+ return smaState.getHoursSpent();
}
public double getHoursSpent() throws OseeCoreException {
- return getHoursSpent(getCurrentStateName());
+ return getHoursSpent(getCurrentState());
}
/**
@@ -108,11 +115,11 @@ public class StateManager {
*
* @return percent complete or 0 if none
*/
- public int getPercentComplete(String stateName) throws OseeCoreException {
- if (stateName.equals(DefaultTeamState.Completed.name()) || stateName.equals(DefaultTeamState.Cancelled.name())) {
+ public int getPercentComplete(IWorkPage teamState) throws OseeCoreException {
+ if (teamState.getWorkPageType().isCompletedOrCancelledPage()) {
return 100;
}
- SMAState state = getSMAState(stateName, false);
+ SMAState state = getSMAState(teamState, false);
if (state == null) {
return 0;
}
@@ -121,7 +128,7 @@ public class StateManager {
}
public int getPercentComplete() throws OseeCoreException {
- return getPercentComplete(getCurrentStateName());
+ return getPercentComplete(getCurrentState());
}
public String getCurrentStateName() {
@@ -132,6 +139,35 @@ public class StateManager {
}
}
+ public IWorkPage getCurrentState() {
+ return new SimpleTeamState(getCurrentStateName(), getCurrentWorkPageType());
+ }
+
+ public WorkPageType getCurrentWorkPageType() {
+ try {
+ if (sma.isAttributeTypeValid(AtsAttributeTypes.CurrentStateType)) {
+ return WorkPageType.valueOf(sma.getSoleAttributeValueAsString(AtsAttributeTypes.CurrentStateType, null));
+ } else {
+ // display console error, but only once
+ if (!notValidAttributeType.contains(sma.getArtifactTypeName())) {
+ notValidAttributeType.add(sma.getArtifactTypeName());
+ System.err.println("CurrentStateType not valid for " + sma.getArtifactTypeName());
+ }
+ // TODO get rid of this once database configured for new types (or leave for backward compatibility?
+ if (getCurrentStateName().equals(TeamState.Completed.name())) {
+ return WorkPageType.Completed;
+ } else if (getCurrentStateName().equals(TeamState.Cancelled.name())) {
+ return WorkPageType.Cancelled;
+ } else {
+ return WorkPageType.Working;
+ }
+ }
+ } catch (OseeCoreException ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ }
+ return null;
+ }
+
public String getAssigneesStr() throws OseeCoreException {
return Artifacts.toString("; ", sma.getStateMgr().getAssignees());
}
@@ -145,39 +181,39 @@ public class StateManager {
}
public Collection<User> getAssignees() throws OseeCoreException {
- return getAssignees(getCurrentStateName());
+ return getAssignees(getCurrentState());
}
- public Collection<User> getAssignees(String stateName) throws OseeCoreException {
- SMAState state = getSMAState(stateName, false);
- if (state == null) {
+ public Collection<User> getAssignees(IWorkPage state) throws OseeCoreException {
+ SMAState smaState = getSMAState(state, false);
+ if (smaState == null) {
return Collections.emptyList();
} else {
- return state.getAssignees();
+ return smaState.getAssignees();
}
}
public void updateMetrics(double additionalHours, int percentComplete, boolean logMetrics) throws OseeCoreException {
- updateMetrics(getCurrentStateName(), additionalHours, percentComplete, logMetrics);
+ updateMetrics(getCurrentState(), additionalHours, percentComplete, logMetrics);
}
- public void updateMetrics(String stateName, double additionalHours, int percentComplete, boolean logMetrics) throws OseeCoreException {
- if (stateName.equals(getCurrentStateName())) {
+ public void updateMetrics(IWorkPage state, double additionalHours, int percentComplete, boolean logMetrics) throws OseeCoreException {
+ if (sma.isInState(state)) {
currentStateDam.updateMetrics(additionalHours, percentComplete, logMetrics);
} else {
- stateDam.updateMetrics(stateName, additionalHours, percentComplete, logMetrics);
+ stateDam.updateMetrics(state, additionalHours, percentComplete, logMetrics);
}
}
public void setMetrics(double hours, int percentComplete, boolean logMetrics) throws OseeCoreException {
- setMetrics(getCurrentStateName(), hours, percentComplete, logMetrics);
+ setMetrics(getCurrentState(), hours, percentComplete, logMetrics);
}
- public void setMetrics(String stateName, double hours, int percentComplete, boolean logMetrics) throws OseeCoreException {
- if (stateName.equals(getCurrentStateName())) {
+ public void setMetrics(IWorkPage state, double hours, int percentComplete, boolean logMetrics) throws OseeCoreException {
+ if (state.getPageName().equals(getCurrentStateName())) {
currentStateDam.setMetrics(hours, percentComplete, logMetrics);
} else {
- stateDam.setMetrics(stateName, hours, percentComplete, logMetrics);
+ stateDam.setMetrics(state, hours, percentComplete, logMetrics);
}
}
@@ -185,7 +221,7 @@ public class StateManager {
* Sets the assignees as attributes and relations AND writes to SMA. Does not persist.
*/
public void setAssignees(Collection<User> assignees) throws OseeCoreException {
- SMAState state = getSMAState(getCurrentStateName(), false);
+ SMAState state = getSMAState(getCurrentState(), false);
state.setAssignees(assignees);
putState(state);
}
@@ -193,108 +229,113 @@ public class StateManager {
/**
* Sets the assignee AND writes to SMA. Does not persist.
*/
- public void setAssignee(String stateName, User assignee) throws OseeCoreException {
- if (!isStateVisited(stateName)) {
- throw new OseeArgumentException("State [%s] does not exist.", stateName);
+ public void setAssignee(IWorkPage state, User assignee) throws OseeCoreException {
+ if (!isStateVisited(state)) {
+ throw new OseeArgumentException("State [%s] does not exist.", state);
}
- SMAState state = getSMAState(stateName, false);
- state.setAssignee(assignee);
- putState(state);
+ SMAState smaState = getSMAState(state, false);
+ smaState.setAssignee(assignee);
+ putState(smaState);
}
/**
* Sets the assignee AND writes to SMA. Does not persist.
*/
public void setAssignee(User assignee) throws OseeCoreException {
- SMAState state = getSMAState(getCurrentStateName(), false);
- state.setAssignee(assignee);
- putState(state);
+ SMAState smaState = getSMAState(getCurrentState(), false);
+ smaState.setAssignee(assignee);
+ putState(smaState);
}
/**
* Removes the assignee from stateName state AND writes to SMA. Does not persist.
*/
- public void removeAssignee(String stateName, User assignee) throws OseeCoreException {
- if (!isStateVisited(stateName)) {
+ public void removeAssignee(IWorkPage state, User assignee) throws OseeCoreException {
+ if (!isStateVisited(state)) {
return;
}
- SMAState state = getSMAState(stateName, false);
- state.removeAssignee(assignee);
- putState(state);
+ SMAState smaState = getSMAState(state, false);
+ smaState.removeAssignee(assignee);
+ putState(smaState);
}
/**
* Removes the assignee AND writes to SMA. Does not persist.
*/
public void removeAssignee(User assignee) throws OseeCoreException {
- SMAState state = getSMAState(getCurrentStateName(), false);
- state.removeAssignee(assignee);
- putState(state);
+ SMAState smaState = getSMAState(getCurrentState(), false);
+ smaState.removeAssignee(assignee);
+ putState(smaState);
}
/**
* Adds the assignee AND writes to SMA. Does not persist. Will remove UnAssigned user if another assignee exists.
*/
public void addAssignee(User assignee) throws OseeCoreException {
- SMAState state = getSMAState(getCurrentStateName(), false);
- state.addAssignee(assignee);
- if (state.getAssignees().size() > 1 && state.getAssignees().contains(UserManager.getUser(SystemUser.UnAssigned))) {
- state.removeAssignee(UserManager.getUser(SystemUser.UnAssigned));
+ SMAState smaState = getSMAState(getCurrentState(), false);
+ smaState.addAssignee(assignee);
+ if (smaState.getAssignees().size() > 1 && smaState.getAssignees().contains(
+ UserManager.getUser(SystemUser.UnAssigned))) {
+ smaState.removeAssignee(UserManager.getUser(SystemUser.UnAssigned));
}
- putState(state);
+ putState(smaState);
}
/**
* Removes ALL assignees AND writes to SMA. Does not persist.
*/
public void clearAssignees() throws OseeCoreException {
- SMAState state = getSMAState(getCurrentStateName(), false);
- state.clearAssignees();
- putState(state);
+ SMAState smaState = getSMAState(getCurrentState(), false);
+ smaState.clearAssignees();
+ putState(smaState);
}
- public boolean isStateVisited(String name) {
- return getVisitedStateNames().contains(name);
+ public boolean isStateVisited(IWorkPage state) {
+ return getVisitedStateNames().contains(state.getPageName());
}
- public void transitionHelper(Collection<User> toAssignees, boolean persist, WorkPageDefinition fromPage, WorkPageDefinition toPage, String toStateName, String cancelReason) throws OseeCoreException {
+ public void transitionHelper(Collection<User> toAssignees, boolean persist, WorkPageDefinition fromPage, WorkPageDefinition toPage, IWorkPage toState, String cancelReason) throws OseeCoreException {
// Set XCurrentState info to XState
stateDam.setState(currentStateDam.getState());
// Set XCurrentState; If been to this state, copy state info from prev state; else create new
- SMAState previousState = stateDam.getState(toStateName, false);
+ SMAState previousState = stateDam.getState(toState, false);
if (previousState == null) {
- currentStateDam.setState(new SMAState(toStateName, toAssignees));
+ currentStateDam.setState(new SMAState(toState.getPageName(), toAssignees));
} else {
if (toAssignees.size() > 0) {
previousState.setAssignees(toAssignees);
}
currentStateDam.setState(previousState);
}
+ sma.setSoleAttributeValue(AtsAttributeTypes.CurrentStateType, toPage.getWorkPageType().name());
}
/**
* Initializes state machine and sets the current state to stateName
*/
- public void initializeStateMachine(String stateName) throws OseeCoreException {
- initializeStateMachine(stateName, null);
+ public void initializeStateMachine(IWorkPage state) throws OseeCoreException {
+ initializeStateMachine(state, null);
}
/**
* Initializes state machine and sets the current state to stateName
*/
- public void initializeStateMachine(String stateName, Collection<User> assignees) throws OseeCoreException {
+ public void initializeStateMachine(IWorkPage state, Collection<User> assignees) throws OseeCoreException {
SMAState smaState = null;
- if (getVisitedStateNames().contains(stateName)) {
- smaState = getSMAState(stateName, false);
+ if (getVisitedStateNames().contains(state.getPageName())) {
+ smaState = getSMAState(state, false);
} else {
if (assignees == null) {
- smaState = new SMAState(stateName, UserManager.getUser());
+ smaState = new SMAState(state.getPageName(), UserManager.getUser());
} else {
- smaState = new SMAState(stateName, assignees);
+ smaState = new SMAState(state.getPageName(), assignees);
}
}
currentStateDam.setState(smaState);
+ if (sma.isAttributeTypeValid(AtsAttributeTypes.CurrentStateType)) {
+ sma.setSoleAttributeValue(AtsAttributeTypes.CurrentStateType, state.getWorkPageType().name());
+ }
}
private void putState(SMAState state) throws OseeCoreException {
@@ -315,15 +356,14 @@ public class StateManager {
}
public long getTimeInState() throws OseeCoreException {
- return getTimeInState(getCurrentStateName());
+ return getTimeInState(getCurrentState());
}
- public long getTimeInState(String stateName) throws OseeCoreException {
- SMAState state = getSMAState(stateName, false);
+ public long getTimeInState(IWorkPage state) throws OseeCoreException {
if (state == null) {
return 0;
}
- LogItem logItem = sma.getLog().getLastEvent(LogType.StateEntered);
+ LogItem logItem = sma.getStateStartedData(state);
if (logItem == null) {
return 0;
}
@@ -363,14 +403,14 @@ public class StateManager {
}
- public static Collection<User> getImplementersByState(AbstractWorkflowArtifact workflow, String stateName) throws OseeCoreException {
+ public static Collection<User> getImplementersByState(AbstractWorkflowArtifact workflow, IWorkPage state) throws OseeCoreException {
if (workflow.isCancelled()) {
- return Arrays.asList(workflow.getLog().getCancelledLogItem().getUser());
+ return Arrays.asList(workflow.internalGetCancelledBy());
}
- Collection<User> users = new HashSet<User>(workflow.getStateMgr().getAssignees(stateName));
- LogItem item = workflow.getLog().getCompletedLogItem();
- if (item != null) {
- users.add(item.getUser());
+ Collection<User> users = new HashSet<User>(workflow.getStateMgr().getAssignees(state));
+ User user = workflow.getCompletedBy();
+ if (user != null) {
+ users.add(user);
}
return users;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamState.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamState.java
new file mode 100644
index 00000000000..a7a1bad8476
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamState.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.ats.util;
+
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
+
+public enum TeamState implements IWorkPage {
+ Endorse(WorkPageType.Working),
+ Analyze(WorkPageType.Working),
+ Authorize(WorkPageType.Working),
+ Implement(WorkPageType.Working),
+ Completed(WorkPageType.Completed),
+ Cancelled(WorkPageType.Cancelled);
+
+ private final WorkPageType workPageType;
+
+ private TeamState(WorkPageType workPageType) {
+ this.workPageType = workPageType;
+ }
+
+ @Override
+ public WorkPageType getWorkPageType() {
+ return workPageType;
+ }
+
+ @Override
+ public String getPageName() {
+ return name();
+ }
+
+ @Override
+ public boolean isCompletedOrCancelledPage() {
+ return getWorkPageType().isCompletedOrCancelledPage();
+ }
+
+ @Override
+ public boolean isCompletedPage() {
+ return getWorkPageType().isCompletedPage();
+ }
+
+ @Override
+ public boolean isCancelledPage() {
+ return getWorkPageType().isCancelledPage();
+ }
+
+ @Override
+ public boolean isWorkingPage() {
+ return getWorkPageType().isWorkingPage();
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionTeamMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionTeamMetrics.java
index ace89dac6a5..cabeaac8b68 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionTeamMetrics.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/VersionTeamMetrics.java
@@ -61,7 +61,7 @@ public class VersionTeamMetrics {
teamWorkflowToOrigDate = new HashMap<TeamWorkFlowArtifact, Date>();
for (VersionArtifact verArt : verTeamDef.getVersionsArtifacts()) {
for (TeamWorkFlowArtifact team : verArt.getTargetedForTeamArtifacts()) {
- Date origDate = team.getLog().getCreationDate();
+ Date origDate = team.getCreatedDate();
teamWorkflowToOrigDate.put(team, origDate);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XCancellationReasonTextWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XCancellationReasonTextWidget.java
index d6420d2c250..8df40215ce9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XCancellationReasonTextWidget.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XCancellationReasonTextWidget.java
@@ -36,7 +36,7 @@ public class XCancellationReasonTextWidget extends XText implements IArtifactWid
if (!Widgets.isAccessible(getControl())) {
return Result.FalseResult;
}
- if (!getText().equals(sma.getLog().getCancellationReason())) {
+ if (!getText().equals(sma.getCancelledReason())) {
return new Result(true, "Cancallation Reason dirty");
}
return Result.FalseResult;
@@ -50,7 +50,7 @@ public class XCancellationReasonTextWidget extends XText implements IArtifactWid
@Override
public void saveToArtifact() throws OseeCoreException {
if (Strings.isValid(getText())) {
- sma.getLog().setCancellationReason(getText());
+ sma.setCancellationReason(getText());
}
}
@@ -58,7 +58,7 @@ public class XCancellationReasonTextWidget extends XText implements IArtifactWid
public void setArtifact(Artifact artifact) throws OseeCoreException {
if (artifact instanceof AbstractWorkflowArtifact) {
this.sma = (AbstractWorkflowArtifact) artifact;
- setText(sma.getLog().getCancellationReason());
+ setText(sma.getCancelledReason());
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java
index ada8b8bdafc..9a59441d4c5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/ReviewManager.java
@@ -19,14 +19,16 @@ import org.eclipse.osee.ats.artifact.AbstractReviewArtifact;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.workflow.TransitionManager;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -38,6 +40,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.skynet.core.utility.UsersByIds;
import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
/**
* @author Donald G. Dunne
@@ -54,8 +57,10 @@ public class ReviewManager {
* Create a new decision review configured and transitioned to handle action validation
*
* @param force will force the creation of the review without checking that a review should be created
+ * @param createdDate TODO
+ * @param createdBy TODO
*/
- public static DecisionReviewArtifact createValidateReview(TeamWorkFlowArtifact teamArt, boolean force, SkynetTransaction transaction) throws OseeCoreException {
+ public static DecisionReviewArtifact createValidateReview(TeamWorkFlowArtifact teamArt, boolean force, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
// If not validate page, don't do anything
if (!force && !AtsWorkDefinitions.isValidatePage(teamArt.getWorkPageDefinition())) {
return null;
@@ -75,13 +80,14 @@ public class ReviewManager {
ReviewManager.createNewDecisionReview(
teamArt,
AtsWorkDefinitions.isValidateReviewBlocking(teamArt.getWorkPageDefinition()) ? ReviewBlockType.Transition : ReviewBlockType.None,
- true);
+ true, createdDate, createdBy);
decRev.setName(VALIDATE_REVIEW_TITLE);
decRev.setSoleAttributeValue(AtsAttributeTypes.DecisionReviewOptions,
"No;Followup;" + getValidateReviewFollowupUsersStr(teamArt) + "\n" + "Yes;Completed;");
- decRev.transition(DecisionReviewArtifact.DecisionReviewState.Decision.name(), teamArt.getOriginator(),
- transaction, TransitionOption.Persist);
+ TransitionManager transitionMgr = new TransitionManager(decRev);
+ transitionMgr.transition(DecisionReviewState.Decision, teamArt.getCreatedBy(), transaction,
+ TransitionOption.Persist);
return decRev;
@@ -91,21 +97,22 @@ public class ReviewManager {
return null;
}
- public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt, String reviewTitle, String description, String againstState, ReviewBlockType reviewBlockType, String options, Collection<User> assignees, SkynetTransaction transaction) throws OseeCoreException {
+ public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt, String reviewTitle, String description, String againstState, ReviewBlockType reviewBlockType, String options, Collection<User> assignees, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
DecisionReviewArtifact decRev =
ReviewManager.createNewDecisionReview(teamArt, reviewBlockType, reviewTitle, againstState, description,
- options, assignees);
+ options, assignees, createdDate, createdBy);
return decRev;
}
- public static DecisionReviewArtifact createNewDecisionReviewAndTransitionToDecision(TeamWorkFlowArtifact teamArt, String reviewTitle, String description, String againstState, ReviewBlockType reviewBlockType, String options, Collection<User> assignees, SkynetTransaction transaction) throws OseeCoreException {
+ public static DecisionReviewArtifact createNewDecisionReviewAndTransitionToDecision(TeamWorkFlowArtifact teamArt, String reviewTitle, String description, String againstState, ReviewBlockType reviewBlockType, String options, Collection<User> assignees, Date createdDate, User createdBy, SkynetTransaction transaction) throws OseeCoreException {
DecisionReviewArtifact decRev =
ReviewManager.createNewDecisionReview(teamArt, reviewBlockType, reviewTitle, againstState, description,
- options, assignees);
+ options, assignees, createdDate, createdBy);
decRev.persist(transaction);
- decRev.transition(DecisionReviewArtifact.DecisionReviewState.Decision.name(), assignees, transaction,
- TransitionOption.Persist, TransitionOption.OverrideAssigneeCheck);
+ TransitionManager transitionMgr = new TransitionManager(decRev);
+ transitionMgr.transition(DecisionReviewState.Decision, assignees, transaction, TransitionOption.Persist,
+ TransitionOption.OverrideAssigneeCheck);
return decRev;
}
@@ -118,6 +125,8 @@ public class ReviewManager {
PeerToPeerReviewArtifact peerToPeerRev =
(PeerToPeerReviewArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.PeerToPeerReview,
AtsUtil.getAtsBranch(), reviewTitle == null ? "Peer to Peer Review" : reviewTitle);
+ // Initialize state machine
+ peerToPeerRev.initializeNewStateMachine(DecisionReviewState.Prepare, null, new Date(), UserManager.getUser());
if (teamArt != null) {
teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review, peerToPeerRev);
@@ -125,14 +134,7 @@ public class ReviewManager {
peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, againstState);
}
}
-
- peerToPeerRev.getLog().addLog(LogType.Originated, "", "", origDate, origUser);
peerToPeerRev.setSoleAttributeValue(AtsAttributeTypes.ReviewBlocks, ReviewBlockType.None.name());
-
- // Initialize state machine
- peerToPeerRev.getStateMgr().initializeStateMachine(DecisionReviewArtifact.DecisionReviewState.Prepare.name());
- peerToPeerRev.getLog().addLog(LogType.StateEntered, DecisionReviewArtifact.DecisionReviewState.Prepare.name(),
- "", origDate, origUser);
peerToPeerRev.persist(transaction);
return peerToPeerRev;
}
@@ -154,12 +156,12 @@ public class ReviewManager {
/**
* Return Estimated Review Hours of "Related to State" stateName
*
- * @param relatedToStateName state name of parent workflow's state
+ * @param relatedToState state name of parent workflow's state
* @return Returns the Estimated Hours
*/
- public static double getEstimatedHours(TeamWorkFlowArtifact teamArt, String relatedToStateName) throws OseeCoreException {
+ public static double getEstimatedHours(TeamWorkFlowArtifact teamArt, IWorkPage relatedToState) throws OseeCoreException {
double hours = 0;
- for (AbstractReviewArtifact revArt : getReviews(teamArt, relatedToStateName)) {
+ for (AbstractReviewArtifact revArt : getReviews(teamArt, relatedToState)) {
hours += revArt.getEstimatedHoursTotal();
}
return hours;
@@ -189,7 +191,7 @@ public class ReviewManager {
}
public static Collection<User> getValidateReviewFollowupUsers(TeamWorkFlowArtifact teamArt) throws OseeCoreException {
- Collection<User> users = teamArt.getStateMgr().getAssignees("Implement");
+ Collection<User> users = teamArt.getStateMgr().getAssignees(TeamState.Implement);
if (users.size() > 0) {
return users;
}
@@ -204,13 +206,13 @@ public class ReviewManager {
}
public static Collection<AbstractReviewArtifact> getReviewsFromCurrentState(TeamWorkFlowArtifact teamArt) throws OseeCoreException {
- return getReviews(teamArt, teamArt.getStateMgr().getCurrentStateName());
+ return getReviews(teamArt, teamArt.getStateMgr().getCurrentState());
}
- public static Collection<AbstractReviewArtifact> getReviews(TeamWorkFlowArtifact teamArt, String stateName) throws OseeCoreException {
+ public static Collection<AbstractReviewArtifact> getReviews(TeamWorkFlowArtifact teamArt, IWorkPage state) throws OseeCoreException {
Set<AbstractReviewArtifact> arts = new HashSet<AbstractReviewArtifact>();
for (AbstractReviewArtifact revArt : getReviews(teamArt)) {
- if (revArt.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "").equals(stateName)) {
+ if (revArt.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "").equals(state.getPageName())) {
arts.add(revArt);
}
}
@@ -241,12 +243,12 @@ public class ReviewManager {
/**
* Return Hours Spent for Reviews of "Related to State" stateName
*
- * @param relatedToStateName state name of parent workflow's state
+ * @param relatedToState state name of parent workflow's state
* @return Returns the Hours Spent
*/
- public static double getHoursSpent(TeamWorkFlowArtifact teamArt, String relatedToStateName) throws OseeCoreException {
+ public static double getHoursSpent(TeamWorkFlowArtifact teamArt, IWorkPage relatedToState) throws OseeCoreException {
double spent = 0;
- for (AbstractReviewArtifact reviewArt : getReviews(teamArt, relatedToStateName)) {
+ for (AbstractReviewArtifact reviewArt : getReviews(teamArt, relatedToState)) {
spent += reviewArt.getHoursSpentSMATotal();
}
return spent;
@@ -255,12 +257,12 @@ public class ReviewManager {
/**
* Return Total Percent Complete / # Reviews for "Related to State" stateName
*
- * @param relatedToStateName state name of parent workflow's state
+ * @param relatedToState state name of parent workflow's state
* @return Returns the Percent Complete.
*/
- public static int getPercentComplete(TeamWorkFlowArtifact teamArt, String relatedToStateName) throws OseeCoreException {
+ public static int getPercentComplete(TeamWorkFlowArtifact teamArt, IWorkPage relatedToState) throws OseeCoreException {
int spent = 0;
- Collection<AbstractReviewArtifact> reviewArts = getReviews(teamArt, relatedToStateName);
+ Collection<AbstractReviewArtifact> reviewArts = getReviews(teamArt, relatedToState);
for (AbstractReviewArtifact reviewArt : reviewArts) {
spent += reviewArt.getPercentCompleteSMATotal();
}
@@ -270,29 +272,31 @@ public class ReviewManager {
return spent / reviewArts.size();
}
- public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt, ReviewBlockType reviewBlockType, boolean againstCurrentState) throws OseeCoreException {
+ public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt, ReviewBlockType reviewBlockType, boolean againstCurrentState, Date createdDate, User createdBy) throws OseeCoreException {
return createNewDecisionReview(teamArt, reviewBlockType,
"Should we do this? Yes will require followup, No will not",
againstCurrentState ? teamArt.getStateMgr().getCurrentStateName() : null,
- "Enter description of the decision, if any", getDefaultDecisionReviewOptions(), null);
+ "Enter description of the decision, if any", getDefaultDecisionReviewOptions(), null, createdDate, createdBy);
}
public static String getDefaultDecisionReviewOptions() throws OseeCoreException {
return "Yes;Followup;<" + UserManager.getUser().getUserId() + ">\n" + "No;Completed;";
}
- public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt, ReviewBlockType reviewBlockType, String title, String relatedToState, String description, String options, Collection<User> assignees) throws OseeCoreException {
+ public static DecisionReviewArtifact createNewDecisionReview(TeamWorkFlowArtifact teamArt, ReviewBlockType reviewBlockType, String title, String relatedToState, String description, String options, Collection<User> assignees, Date createdDate, User createdBy) throws OseeCoreException {
DecisionReviewArtifact decRev =
(DecisionReviewArtifact) ArtifactTypeManager.addArtifact(AtsArtifactTypes.DecisionReview,
AtsUtil.getAtsBranch(), title);
+ // Initialize state machine
+ decRev.initializeNewStateMachine(DecisionReviewState.Prepare, assignees, createdDate, createdBy);
+
if (teamArt != null) {
teamArt.addRelation(AtsRelationTypes.TeamWorkflowToReview_Review, decRev);
}
if (Strings.isValid(relatedToState)) {
decRev.setSoleAttributeValue(AtsAttributeTypes.RelatedToState, relatedToState);
}
- decRev.getLog().addLog(LogType.Originated, "", "");
if (Strings.isValid(description)) {
decRev.setSoleAttributeValue(AtsAttributeTypes.Description, description);
}
@@ -303,12 +307,6 @@ public class ReviewManager {
decRev.setSoleAttributeFromString(AtsAttributeTypes.ReviewBlocks, reviewBlockType.name());
}
- // Initialize state machine
- decRev.getStateMgr().initializeStateMachine(DecisionReviewArtifact.DecisionReviewState.Prepare.name());
- decRev.getLog().addLog(LogType.StateEntered, DecisionReviewArtifact.DecisionReviewState.Prepare.name(), "");
- if (assignees != null && assignees.size() > 0) {
- decRev.getStateMgr().setAssignees(assignees);
- }
return decRev;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerSmaStateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerSmaStateColumn.java
deleted file mode 100644
index 7786b6bebd3..00000000000
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerSmaStateColumn.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.util.xviewer.column;
-
-import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
-import org.eclipse.nebula.widgets.xviewer.XViewerValueColumn;
-import org.eclipse.nebula.widgets.xviewer.util.XViewerException;
-import org.eclipse.osee.ats.world.IWorldViewArtifact;
-import org.eclipse.osee.ats.world.WorldXViewerFactory;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.swt.SWT;
-
-/**
- * @author Donald G. Dunne
- */
-public class XViewerSmaStateColumn extends XViewerValueColumn {
-
- public XViewerSmaStateColumn() {
- super(WorldXViewerFactory.COLUMN_NAMESPACE + "smaState", "State", 75, SWT.LEFT, true, SortDataType.String, false,
- null);
- }
-
- public XViewerSmaStateColumn(String id, String name, int width, int align, boolean show, SortDataType sortDataType, boolean multiColumnEditable, String description) {
- super(id, name, width, align, show, sortDataType, multiColumnEditable, description);
- }
-
- /**
- * XViewer uses copies of column definitions so originals that are registered are not corrupted. Classes extending
- * XViewerValueColumn need to extend this constructor to copy extra stored fields
- */
- @Override
- public XViewerSmaStateColumn copy() {
- return new XViewerSmaStateColumn(getId(), getName(), getWidth(), getAlign(), isShow(), getSortDataType(),
- isMultiColumnEditable(), getDescription());
- }
-
- @Override
- public String getColumnText(Object element, XViewerColumn column, int columnIndex) throws XViewerException {
- try {
- if (element instanceof IWorldViewArtifact) {
- return ((IWorldViewArtifact) element).getState();
- }
- return "";
- } catch (OseeCoreException ex) {
- throw new XViewerException(ex);
- }
- }
-}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkPage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkPage.java
index e34e8754e99..2b8f508aafc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkPage.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/AtsWorkPage.java
@@ -16,7 +16,6 @@ import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.editor.stateItem.AtsStateItemManager;
import org.eclipse.osee.ats.editor.stateItem.IAtsStateItem;
import org.eclipse.osee.ats.internal.AtsPlugin;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.ats.util.widgets.dialog.TaskResolutionOptionRule;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -53,15 +52,11 @@ public class AtsWorkPage extends WorkPage {
}
public boolean isCurrentState(AbstractWorkflowArtifact sma) {
- return sma.isCurrentState(getName());
+ return sma.isInState(this);
}
public boolean isCurrentNonCompleteCancelledState(AbstractWorkflowArtifact sma) {
- return sma.isCurrentState(getName()) && !isCompleteCancelledState();
- }
-
- public boolean isCompleteCancelledState() {
- return isCancelledPage() || isCompletePage();
+ return isCurrentState(sma) && !isCompletedOrCancelledPage();
}
@Override
@@ -108,18 +103,6 @@ public class AtsWorkPage extends WorkPage {
}
}
- public boolean isCompletePage() {
- return getName().equals(DefaultTeamState.Completed.name());
- }
-
- public boolean isCancelledPage() {
- return getName().equals(DefaultTeamState.Cancelled.name());
- }
-
- public boolean isEndorsePage() {
- return getName().equals(DefaultTeamState.Endorse.name());
- }
-
public TaskResolutionOptionRule getTaskResDef() {
return taskResolutionOptions;
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionManager.java
new file mode 100644
index 00000000000..9cb62c86beb
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionManager.java
@@ -0,0 +1,246 @@
+/*
+ * Created on Nov 17, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.ats.workflow;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.logging.Level;
+import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
+import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
+import org.eclipse.osee.ats.artifact.log.LogType;
+import org.eclipse.osee.ats.editor.stateItem.AtsStateItemManager;
+import org.eclipse.osee.ats.editor.stateItem.IAtsStateItem;
+import org.eclipse.osee.ats.internal.AtsPlugin;
+import org.eclipse.osee.ats.util.AtsNotifyUsers;
+import org.eclipse.osee.ats.util.TeamState;
+import org.eclipse.osee.ats.util.TransitionOption;
+import org.eclipse.osee.ats.util.widgets.ReviewManager;
+import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
+import org.eclipse.osee.framework.core.data.SystemUser;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
+import org.eclipse.osee.framework.logging.OseeLevel;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.skynet.core.User;
+import org.eclipse.osee.framework.skynet.core.UserManager;
+import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
+import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.osee.framework.ui.skynet.notify.OseeNotificationManager;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IWorkPage;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+
+public class TransitionManager {
+
+ private final AbstractWorkflowArtifact aba;
+
+ public TransitionManager(AbstractWorkflowArtifact aba) {
+ this.aba = aba;
+ }
+
+ public Result isTransitionValid(final IWorkPage toState, final Collection<User> toAssignees, TransitionOption... transitionOption) throws OseeCoreException {
+ boolean overrideTransitionCheck =
+ org.eclipse.osee.framework.jdk.core.util.Collections.getAggregate(transitionOption).contains(
+ TransitionOption.OverrideTransitionValidityCheck);
+ boolean overrideAssigneeCheck =
+ org.eclipse.osee.framework.jdk.core.util.Collections.getAggregate(transitionOption).contains(
+ TransitionOption.OverrideAssigneeCheck);
+ // Validate assignees
+ if (!overrideAssigneeCheck && (aba.getStateMgr().getAssignees().contains(
+ UserManager.getUser(SystemUser.OseeSystem)) || aba.getStateMgr().getAssignees().contains(
+ UserManager.getUser(SystemUser.Guest)) || aba.getStateMgr().getAssignees().contains(
+ UserManager.getUser(SystemUser.UnAssigned)))) {
+ return new Result("Can not transition with \"Guest\", \"UnAssigned\" or \"OseeSystem\" user as assignee.");
+ }
+
+ // Validate toState name
+ final WorkPageDefinition fromWorkPageDefinition = aba.getWorkPageDefinition();
+ final WorkPageDefinition toWorkPageDefinition = aba.getWorkPageDefinitionByName(toState.getPageName());
+ if (toWorkPageDefinition == null) {
+ return new Result("Invalid toState \"" + toState + "\"");
+ }
+
+ // Validate transition from fromPage to toPage
+ if (!overrideTransitionCheck && !aba.getWorkFlowDefinition().getToPages(fromWorkPageDefinition).contains(
+ toWorkPageDefinition)) {
+ String errStr =
+ "Not configured to transition to \"" + toState + "\" from \"" + fromWorkPageDefinition.getPageName() + "\"";
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, errStr);
+ return new Result(errStr);
+ }
+ // Don't transition with existing working branch
+ if (toWorkPageDefinition.isCancelledPage() && aba.isTeamWorkflow() && ((TeamWorkFlowArtifact) aba).getBranchMgr().isWorkingBranchInWork()) {
+ return new Result("Working Branch exists. Please delete working branch before cancelling.");
+ }
+
+ // Don't transition with uncommitted branch if this is a commit state
+ if (AtsWorkDefinitions.isAllowCommitBranch(aba.getWorkPageDefinition()) && aba.isTeamWorkflow() && ((TeamWorkFlowArtifact) aba).getBranchMgr().isWorkingBranchInWork()) {
+ return new Result("Working Branch exists. Please commit or delete working branch before transition.");
+ }
+
+ // Check extension points for valid transition
+ List<IAtsStateItem> atsStateItems = AtsStateItemManager.getStateItems(fromWorkPageDefinition.getId());
+ for (IAtsStateItem item : atsStateItems) {
+ Result result = item.transitioning(aba, fromWorkPageDefinition, toState, toAssignees);
+ if (result.isFalse()) {
+ return result;
+ }
+ }
+ for (IAtsStateItem item : atsStateItems) {
+ Result result = item.transitioning(aba, fromWorkPageDefinition, toState, toAssignees);
+ if (result.isFalse()) {
+ return result;
+ }
+ }
+ return Result.TrueResult;
+ }
+
+ public Result transition(IWorkPage toState, User toAssignee, SkynetTransaction transaction, TransitionOption... transitionOption) {
+ List<User> users = new ArrayList<User>();
+ if (toAssignee != null && !toState.getWorkPageType().isCompletedOrCancelledPage()) {
+ users.add(toAssignee);
+ }
+ return transition(toState, users, transaction, transitionOption);
+ }
+
+ public Result transition(IWorkPage toState, Collection<User> toAssignees, SkynetTransaction transaction, TransitionOption... transitionOption) {
+ return transition(toState, toAssignees, (String) null, transaction, transitionOption);
+ }
+
+ private Result transition(final IWorkPage toState, final Collection<User> toAssignees, final String completeOrCancelReason, SkynetTransaction transaction, TransitionOption... transitionOption) {
+ try {
+ final boolean persist =
+ org.eclipse.osee.framework.jdk.core.util.Collections.getAggregate(transitionOption).contains(
+ TransitionOption.Persist);
+
+ Result result = isTransitionValid(toState, toAssignees, transitionOption);
+ if (result.isFalse()) {
+ return result;
+ }
+
+ final WorkPageDefinition fromWorkPageDefinition = aba.getWorkPageDefinition();
+ final WorkPageDefinition toWorkPageDefinition = aba.getWorkPageDefinitionByName(toState.getPageName());
+
+ transitionHelper(toAssignees, persist, fromWorkPageDefinition, toWorkPageDefinition, toState,
+ completeOrCancelReason, transaction);
+ if (persist) {
+ OseeNotificationManager.getInstance().sendNotifications();
+ }
+ } catch (Exception ex) {
+ OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
+ return new Result("Transaction failed " + ex.getLocalizedMessage());
+ }
+ return Result.TrueResult;
+ }
+
+ private void transitionHelper(Collection<User> toAssignees, boolean persist, WorkPageDefinition fromPage, WorkPageDefinition toPage, IWorkPage toState, String completeOrCancelReason, SkynetTransaction transaction) throws OseeCoreException {
+ Date transitionDate = new Date();
+ User transitionUser = UserManager.getUser();
+ // Log transition
+ if (toPage.isCancelledPage()) {
+ logWorkflowCancelledEvent(aba.getStateMgr().getCurrentStateName(), completeOrCancelReason, transitionDate,
+ transitionUser);
+ } else if (toPage.isCompletedPage()) {
+ logWorkflowCompletedEvent(aba.getStateMgr().getCurrentStateName(), completeOrCancelReason, transitionDate,
+ transitionUser);
+ } else {
+ logStateCompletedEvent(aba.getStateMgr().getCurrentStateName(), completeOrCancelReason, transitionDate,
+ transitionUser);
+ }
+ if (fromPage.isCancelledPage()) {
+ logWorkflowUnCancelledEvent();
+ } else if (fromPage.isCompletedPage()) {
+ logWorkflowUnCompletedEvent();
+ }
+ logStateStartedEvent(toState, transitionDate, transitionUser);
+
+ aba.getStateMgr().transitionHelper(toAssignees, persist, fromPage, toPage, toState, completeOrCancelReason);
+
+ if (aba.isValidationRequired() && aba.isTeamWorkflow()) {
+ ReviewManager.createValidateReview((TeamWorkFlowArtifact) aba, false, transitionDate, transitionUser,
+ transaction);
+ }
+
+ AtsNotifyUsers.getInstance().notify(aba, AtsNotifyUsers.NotifyType.Subscribed,
+ AtsNotifyUsers.NotifyType.Completed, AtsNotifyUsers.NotifyType.Completed);
+
+ // Persist
+ if (persist) {
+ aba.persist(transaction);
+ }
+
+ aba.transitioned(fromPage, toPage, toAssignees, true, transaction);
+
+ // Notify extension points of transition
+ for (IAtsStateItem item : AtsStateItemManager.getStateItems(fromPage.getId())) {
+ item.transitioned(aba, fromPage, toState, toAssignees, transaction);
+ }
+ for (IAtsStateItem item : AtsStateItemManager.getStateItems(toPage.getId())) {
+ item.transitioned(aba, fromPage, toState, toAssignees, transaction);
+ }
+ }
+
+ public Result transitionToCancelled(String reason, SkynetTransaction transaction, TransitionOption... transitionOption) {
+ Result result =
+ transition(TeamState.Cancelled, Arrays.asList(new User[] {}), reason, transaction, transitionOption);
+ return result;
+ }
+
+ public Result transitionToCompleted(String reason, SkynetTransaction transaction, TransitionOption... transitionOption) {
+ Result result =
+ transition(TeamState.Completed, Arrays.asList(new User[] {}), reason, transaction, transitionOption);
+ return result;
+ }
+
+ public void logWorkflowCancelledEvent(String fromStateName, String reason, Date cancelDate, User cancelBy) throws OseeCoreException {
+ aba.getLog().addLog(LogType.StateCancelled, fromStateName, reason, cancelDate, cancelBy);
+ if (aba.isAttributeTypeValid(AtsAttributeTypes.CreatedBy)) {
+ aba.setSoleAttributeValue(AtsAttributeTypes.CancelledBy, cancelBy.getUserId());
+ aba.setSoleAttributeValue(AtsAttributeTypes.CancelledDate, cancelDate);
+ aba.setSoleAttributeValue(AtsAttributeTypes.CancelledReason, reason);
+ aba.setSoleAttributeValue(AtsAttributeTypes.CancelledFromState, fromStateName);
+ }
+ }
+
+ public void logWorkflowUnCancelledEvent() throws OseeCoreException {
+ if (aba.isAttributeTypeValid(AtsAttributeTypes.CreatedBy)) {
+ aba.deleteSoleAttribute(AtsAttributeTypes.CancelledBy);
+ aba.deleteSoleAttribute(AtsAttributeTypes.CancelledDate);
+ aba.deleteSoleAttribute(AtsAttributeTypes.CancelledReason);
+ aba.deleteSoleAttribute(AtsAttributeTypes.CancelledFromState);
+ }
+ }
+
+ public void logWorkflowCompletedEvent(String fromStateName, String reason, Date cancelDate, User cancelBy) throws OseeCoreException {
+ aba.getLog().addLog(LogType.StateComplete, fromStateName, Strings.isValid(reason) ? reason : "", cancelDate,
+ cancelBy);
+ if (aba.isAttributeTypeValid(AtsAttributeTypes.CreatedBy)) {
+ aba.setSoleAttributeValue(AtsAttributeTypes.CompletedBy, cancelBy.getUserId());
+ aba.setSoleAttributeValue(AtsAttributeTypes.CompletedDate, cancelDate);
+ aba.setSoleAttributeValue(AtsAttributeTypes.CompletedFromState, fromStateName);
+ }
+ }
+
+ public void logWorkflowUnCompletedEvent() throws OseeCoreException {
+ if (aba.isAttributeTypeValid(AtsAttributeTypes.CreatedBy)) {
+ aba.deleteSoleAttribute(AtsAttributeTypes.CompletedBy);
+ aba.deleteSoleAttribute(AtsAttributeTypes.CompletedDate);
+ aba.deleteSoleAttribute(AtsAttributeTypes.CompletedFromState);
+ }
+ }
+
+ public void logStateCompletedEvent(String fromStateName, String reason, Date date, User user) throws OseeCoreException {
+ aba.getLog().addLog(LogType.StateComplete, fromStateName, Strings.isValid(reason) ? reason : "");
+ }
+
+ public void logStateStartedEvent(IWorkPage state, Date date, User user) throws OseeCoreException {
+ aba.getLog().addLog(LogType.StateEntered, state.getPageName(), "");
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditor.java
index f7ccf2e8668..0201a4630fa 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/AtsWorkflowConfigEditor.java
@@ -262,7 +262,7 @@ public class AtsWorkflowConfigEditor extends GraphicalEditorWithFlyoutPalette im
if (pageDef.isCancelledPage()) {
pageShape = new CancelledWorkPageShape(pageDef);
pageShape.setLocation(new Point(250, 300));
- } else if (pageDef.isCompletePage()) {
+ } else if (pageDef.isCompletedPage()) {
pageShape = new CompletedWorkPageShape(pageDef);
pageShape.setLocation(new Point(50, yLoc += 90));
} else {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CancelledWorkPageShape.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CancelledWorkPageShape.java
index cb353f9a3d2..050ac6bcc49 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CancelledWorkPageShape.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CancelledWorkPageShape.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.ats.workflow.page.AtsCancelledWorkPageDefinition;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -27,7 +28,7 @@ public class CancelledWorkPageShape extends WorkPageShape {
}
public CancelledWorkPageShape() {
- super(new WorkPageDefinition("Cancelled", "NEW", AtsCancelledWorkPageDefinition.ID));
+ super(new WorkPageDefinition("Cancelled", "NEW", AtsCancelledWorkPageDefinition.ID, WorkPageType.Cancelled));
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CompletedWorkPageShape.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CompletedWorkPageShape.java
index 0ca2d546692..f0ac80784d7 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CompletedWorkPageShape.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/CompletedWorkPageShape.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.ats.workflow.page.AtsCompletedWorkPageDefinition;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -23,7 +24,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
public class CompletedWorkPageShape extends WorkPageShape {
public CompletedWorkPageShape() {
- super(new WorkPageDefinition("Completed", "NEW", AtsCompletedWorkPageDefinition.ID));
+ super(new WorkPageDefinition("Completed", "NEW", AtsCompletedWorkPageDefinition.ID, WorkPageType.Completed));
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java
index 74f0a0b6f3f..b792059118f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/model/WorkPageShape.java
@@ -27,6 +27,7 @@ import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition.WriteType;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinitionFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
import org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
@@ -53,7 +54,7 @@ public class WorkPageShape extends RectangleShape {
};
public WorkPageShape() {
- this(new WorkPageDefinition("New" + AtsUtil.getAtsDeveloperIncrementingNum(), "NEW", null));
+ this(new WorkPageDefinition("New" + AtsUtil.getAtsDeveloperIncrementingNum(), "NEW", null, WorkPageType.Working));
}
public WorkPageShape(WorkPageDefinition workPageDefinition) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java
index 9c2e1d4529f..36efe0bdd1a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/editor/wizard/AtsWorkflowConfigCreationWizard.java
@@ -38,6 +38,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition.
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition.WriteType;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinitionFactory;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
@@ -120,20 +121,23 @@ public class AtsWorkflowConfigCreationWizard extends Wizard implements INewWizar
public static WorkflowData generateSimpleWorkflow(String namespace, SkynetTransaction transaction, TeamDefinitionArtifact teamDef) throws OseeCoreException {
WorkFlowDefinition workflow = new WorkFlowDefinition(namespace, namespace, null);
WorkPageDefinition endorsePage =
- new WorkPageDefinition("Endorse", namespace + ".Endorse", AtsEndorseWorkPageDefinition.ID);
+ new WorkPageDefinition("Endorse", namespace + ".Endorse", AtsEndorseWorkPageDefinition.ID, WorkPageType.Working);
workflow.setStartPageId(endorsePage.getPageName());
- WorkPageDefinition implementPage = new WorkPageDefinition("Implement", namespace + ".Implement", null);
+ WorkPageDefinition implementPage =
+ new WorkPageDefinition("Implement", namespace + ".Implement", null, WorkPageType.Working);
implementPage.addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name());
implementPage.addWorkItem(AtsAttributeTypes.WorkPackage);
implementPage.addWorkItem(AtsAttributeTypes.Resolution);
WorkPageDefinition completedPage =
- new WorkPageDefinition("Completed", namespace + ".Completed", AtsCompletedWorkPageDefinition.ID);
+ new WorkPageDefinition("Completed", namespace + ".Completed", AtsCompletedWorkPageDefinition.ID,
+ WorkPageType.Completed);
WorkPageDefinition cancelledPage =
- new WorkPageDefinition("Cancelled", namespace + ".Cancelled", AtsCancelledWorkPageDefinition.ID);
+ new WorkPageDefinition("Cancelled", namespace + ".Cancelled", AtsCancelledWorkPageDefinition.ID,
+ WorkPageType.Cancelled);
workflow.addPageTransition(endorsePage.getPageName(), implementPage.getPageName(), TransitionType.ToPageAsDefault);
workflow.addPageTransition(implementPage.getPageName(), endorsePage.getPageName(), TransitionType.ToPageAsReturn);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/DecisionWorkflowDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/DecisionWorkflowDefinition.java
index b19ebb202fe..9a404acafd3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/DecisionWorkflowDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/DecisionWorkflowDefinition.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.ats.workflow.flow;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.item.AtsStatePercentCompleteWeightDecisionReviewRule;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.workflow.page.AtsCancelledWorkPageDefinition;
@@ -27,6 +27,7 @@ import org.eclipse.osee.framework.ui.skynet.results.XResultData;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -34,7 +35,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
public class DecisionWorkflowDefinition extends WorkFlowDefinition {
public final static String ID = "osee.ats.decisionReview";
- public final static String DECISION_CANCELLED_STATE_ID = ID + "." + DefaultTeamState.Cancelled.name();
+ public final static String DECISION_CANCELLED_STATE_ID = ID + "." + TeamState.Cancelled.getPageName();
public DecisionWorkflowDefinition() {
super(ID, ID, null);
@@ -60,8 +61,9 @@ public class DecisionWorkflowDefinition extends WorkFlowDefinition {
workItems.add(new AtsDecisionDecisionWorkPageDefinition());
workItems.add(new AtsDecisionFollowupWorkPageDefinition());
workItems.add(new AtsDecisionCompletedWorkPageDefinition());
- workItems.add(new WorkPageDefinition(DefaultTeamState.Cancelled.name(),
- DecisionWorkflowDefinition.DECISION_CANCELLED_STATE_ID, AtsCancelledWorkPageDefinition.ID));
+ workItems.add(new WorkPageDefinition(TeamState.Cancelled.getPageName(),
+ DecisionWorkflowDefinition.DECISION_CANCELLED_STATE_ID, AtsCancelledWorkPageDefinition.ID,
+ WorkPageType.Cancelled));
workItems.add(new DecisionWorkflowDefinition());
return workItems;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/GoalWorkflowDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/GoalWorkflowDefinition.java
index 916569669bb..569657aafcd 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/GoalWorkflowDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/GoalWorkflowDefinition.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.ats.workflow.flow;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.ats.artifact.GoalArtifact.GoalState;
+import org.eclipse.osee.ats.artifact.GoalState;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.workflow.page.AtsCancelledWorkPageDefinition;
import org.eclipse.osee.ats.workflow.page.AtsCompletedWorkPageDefinition;
@@ -24,6 +24,7 @@ import org.eclipse.osee.framework.ui.skynet.results.XResultData;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
public class GoalWorkflowDefinition extends WorkFlowDefinition {
@@ -49,9 +50,9 @@ public class GoalWorkflowDefinition extends WorkFlowDefinition {
// Add Task Page and Workflow Definition
workItems.add(new AtsGoalInWorkPageDefinition());
workItems.add(new WorkPageDefinition(GoalState.Completed.name(), ID + "." + GoalState.Completed.name(),
- AtsCompletedWorkPageDefinition.ID));
+ AtsCompletedWorkPageDefinition.ID, WorkPageType.Completed));
workItems.add(new WorkPageDefinition(GoalState.Cancelled.name(), ID + "." + GoalState.Cancelled.name(),
- AtsCancelledWorkPageDefinition.ID));
+ AtsCancelledWorkPageDefinition.ID, WorkPageType.Cancelled));
workItems.add(new GoalWorkflowDefinition());
return workItems;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/PeerToPeerWorkflowDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/PeerToPeerWorkflowDefinition.java
index 8d941f5adea..6a7497cd29e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/PeerToPeerWorkflowDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/PeerToPeerWorkflowDefinition.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.ats.workflow.flow;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.item.AtsStatePercentCompleteWeightPeerToPeerReviewRule;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.workflow.page.AtsCancelledWorkPageDefinition;
@@ -26,6 +26,7 @@ import org.eclipse.osee.framework.ui.skynet.results.XResultData;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -33,8 +34,8 @@ import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
public class PeerToPeerWorkflowDefinition extends WorkFlowDefinition {
public final static String ID = "osee.ats.peerToPeerReview";
- public final static String PEER_REVIEW_COMPLETED_STATE_ID = ID + "." + DefaultTeamState.Completed.name();
- public final static String PEER_REVIEW_CANCELLED_STATE_ID = ID + "." + DefaultTeamState.Cancelled.name();
+ public final static String PEER_REVIEW_COMPLETED_STATE_ID = ID + "." + TeamState.Completed.getPageName();
+ public final static String PEER_REVIEW_CANCELLED_STATE_ID = ID + "." + TeamState.Cancelled.getPageName();
public PeerToPeerWorkflowDefinition() {
super(ID, ID, null);
@@ -58,10 +59,12 @@ public class PeerToPeerWorkflowDefinition extends WorkFlowDefinition {
// Add PeerToPeer Pages and Workflow Definition
workItems.add(new AtsPeerPrepareWorkPageDefinition());
workItems.add(new AtsPeerReviewWorkPageDefinition());
- workItems.add(new WorkPageDefinition(DefaultTeamState.Completed.name(),
- PeerToPeerWorkflowDefinition.PEER_REVIEW_COMPLETED_STATE_ID, AtsCompletedWorkPageDefinition.ID));
- workItems.add(new WorkPageDefinition(DefaultTeamState.Cancelled.name(),
- PeerToPeerWorkflowDefinition.PEER_REVIEW_CANCELLED_STATE_ID, AtsCancelledWorkPageDefinition.ID));
+ workItems.add(new WorkPageDefinition(TeamState.Completed.getPageName(),
+ PeerToPeerWorkflowDefinition.PEER_REVIEW_COMPLETED_STATE_ID, AtsCompletedWorkPageDefinition.ID,
+ WorkPageType.Completed));
+ workItems.add(new WorkPageDefinition(TeamState.Cancelled.getPageName(),
+ PeerToPeerWorkflowDefinition.PEER_REVIEW_CANCELLED_STATE_ID, AtsCancelledWorkPageDefinition.ID,
+ WorkPageType.Cancelled));
workItems.add(new PeerToPeerWorkflowDefinition());
return workItems;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/SimpleWorkflowDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/SimpleWorkflowDefinition.java
index c1649fd412e..e0dca84b0c0 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/SimpleWorkflowDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/SimpleWorkflowDefinition.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.ats.workflow.flow;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.item.AtsStatePercentCompleteWeightSimpleWorkflowRule;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.workflow.page.AtsCancelledWorkPageDefinition;
@@ -26,6 +26,7 @@ import org.eclipse.osee.framework.ui.skynet.results.XResultData;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -85,12 +86,12 @@ public class SimpleWorkflowDefinition extends WorkFlowDefinition {
List<WorkItemDefinition> workItems = new ArrayList<WorkItemDefinition>();
workItems.add(new WorkPageDefinition(SimpleState.Endorse.name(), SimpleWorkflowDefinition.ENDORSE_STATE_ID,
- AtsEndorseWorkPageDefinition.ID));
+ AtsEndorseWorkPageDefinition.ID, WorkPageType.Working));
workItems.add(new AtsSimpleInWorkWorkPageDefinition());
- workItems.add(new WorkPageDefinition(DefaultTeamState.Completed.name(),
- SimpleWorkflowDefinition.COMPLETED_STATE_ID, AtsCompletedWorkPageDefinition.ID));
- workItems.add(new WorkPageDefinition(DefaultTeamState.Cancelled.name(),
- SimpleWorkflowDefinition.CANCELLED_STATE_ID, AtsCancelledWorkPageDefinition.ID));
+ workItems.add(new WorkPageDefinition(TeamState.Completed.getPageName(),
+ SimpleWorkflowDefinition.COMPLETED_STATE_ID, AtsCompletedWorkPageDefinition.ID, WorkPageType.Completed));
+ workItems.add(new WorkPageDefinition(TeamState.Cancelled.getPageName(),
+ SimpleWorkflowDefinition.CANCELLED_STATE_ID, AtsCancelledWorkPageDefinition.ID, WorkPageType.Cancelled));
workItems.add(new SimpleWorkflowDefinition());
return workItems;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TaskWorkflowDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TaskWorkflowDefinition.java
index c2f51b907d4..3263f01f169 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TaskWorkflowDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TaskWorkflowDefinition.java
@@ -12,8 +12,8 @@ package org.eclipse.osee.ats.workflow.flow;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.ats.artifact.TaskArtifact.TaskStates;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.artifact.TaskStates;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.workflow.page.AtsCancelledWorkPageDefinition;
import org.eclipse.osee.ats.workflow.page.AtsCompletedWorkPageDefinition;
@@ -25,6 +25,7 @@ import org.eclipse.osee.framework.ui.skynet.results.XResultData;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -35,7 +36,7 @@ public class TaskWorkflowDefinition extends WorkFlowDefinition {
public TaskWorkflowDefinition() {
this(ID, ID);
- startPageId = TaskStates.InWork.name();
+ startPageId = TaskStates.InWork.getPageName();
}
public TaskWorkflowDefinition(Artifact artifact) throws OseeCoreException {
@@ -52,10 +53,10 @@ public class TaskWorkflowDefinition extends WorkFlowDefinition {
// Add Task Page and Workflow Definition
workItems.add(new AtsTaskInWorkPageDefinition());
- workItems.add(new WorkPageDefinition(DefaultTeamState.Completed.name(), ID + "." + TaskStates.Completed.name(),
- AtsCompletedWorkPageDefinition.ID));
- workItems.add(new WorkPageDefinition(DefaultTeamState.Cancelled.name(), ID + "." + TaskStates.Cancelled.name(),
- AtsCancelledWorkPageDefinition.ID));
+ workItems.add(new WorkPageDefinition(TeamState.Completed.getPageName(),
+ ID + "." + TaskStates.Completed.getPageName(), AtsCompletedWorkPageDefinition.ID, WorkPageType.Completed));
+ workItems.add(new WorkPageDefinition(TeamState.Cancelled.getPageName(),
+ ID + "." + TaskStates.Cancelled.getPageName(), AtsCancelledWorkPageDefinition.ID, WorkPageType.Cancelled));
workItems.add(new TaskWorkflowDefinition());
return workItems;
@@ -63,13 +64,15 @@ public class TaskWorkflowDefinition extends WorkFlowDefinition {
public TaskWorkflowDefinition(String name, String id) {
super(name, id, null);
- addPageTransition(TaskStates.InWork.name(), TaskStates.Completed.name(), TransitionType.ToPageAsDefault);
+ addPageTransition(TaskStates.InWork.getPageName(), TaskStates.Completed.getPageName(),
+ TransitionType.ToPageAsDefault);
// Add return transitions
- addPageTransition(TaskStates.Completed.name(), TaskStates.InWork.name(), TransitionType.ToPageAsReturn);
+ addPageTransition(TaskStates.Completed.getPageName(), TaskStates.InWork.getPageName(),
+ TransitionType.ToPageAsReturn);
// Add cancelled transitions
- addPageTransitionToPageAndReturn(TaskStates.InWork.name(), TaskStates.Cancelled.name());
+ addPageTransitionToPageAndReturn(TaskStates.InWork.getPageName(), TaskStates.Cancelled.getPageName());
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TeamWorkflowDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TeamWorkflowDefinition.java
index c25dbb67a28..dffba4b50bb 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TeamWorkflowDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/flow/TeamWorkflowDefinition.java
@@ -12,7 +12,7 @@ package org.eclipse.osee.ats.workflow.flow;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.item.AtsStatePercentCompleteWeightDefaultWorkflowRule;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.workflow.page.AtsAnalyzeWorkPageDefinition;
@@ -28,6 +28,7 @@ import org.eclipse.osee.framework.ui.skynet.results.XResultData;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkFlowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkItemDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -64,7 +65,7 @@ public class TeamWorkflowDefinition extends WorkFlowDefinition {
public TeamWorkflowDefinition(String name, String workflowId) {
super(name, workflowId, null);
addDefaultTransitions(this, workflowId);
- startPageId = DefaultTeamState.Endorse.name();
+ startPageId = TeamState.Endorse.getPageName();
}
public static List<WorkItemDefinition> getAtsWorkDefinitions() {
@@ -85,51 +86,53 @@ public class TeamWorkflowDefinition extends WorkFlowDefinition {
public static List<WorkItemDefinition> getWorkPageDefinitionsForId(String workflowId) {
List<WorkItemDefinition> workItems = new ArrayList<WorkItemDefinition>();
// Add Team Page and Workflow Definition
- workItems.add(new WorkPageDefinition(DefaultTeamState.Endorse.name(),
- workflowId + "." + DefaultTeamState.Endorse.name(), AtsEndorseWorkPageDefinition.ID));
- workItems.add(new WorkPageDefinition(DefaultTeamState.Analyze.name(),
- workflowId + "." + DefaultTeamState.Analyze.name(), AtsAnalyzeWorkPageDefinition.ID));
- workItems.add(new WorkPageDefinition(DefaultTeamState.Authorize.name(),
- workflowId + "." + DefaultTeamState.Authorize.name(), AtsAuthorizeWorkPageDefinition.ID));
- workItems.add(new WorkPageDefinition(DefaultTeamState.Implement.name(),
- workflowId + "." + DefaultTeamState.Implement.name(), AtsImplementWorkPageDefinition.ID));
- workItems.add(new WorkPageDefinition(DefaultTeamState.Completed.name(),
- workflowId + "." + DefaultTeamState.Completed.name(), AtsCompletedWorkPageDefinition.ID));
- workItems.add(new WorkPageDefinition(DefaultTeamState.Cancelled.name(),
- workflowId + "." + DefaultTeamState.Cancelled.name(), AtsCancelledWorkPageDefinition.ID));
+ workItems.add(new WorkPageDefinition(TeamState.Endorse.getPageName(),
+ workflowId + "." + TeamState.Endorse.getPageName(), AtsEndorseWorkPageDefinition.ID, WorkPageType.Working));
+ workItems.add(new WorkPageDefinition(TeamState.Analyze.getPageName(),
+ workflowId + "." + TeamState.Analyze.getPageName(), AtsAnalyzeWorkPageDefinition.ID, WorkPageType.Working));
+ workItems.add(new WorkPageDefinition(TeamState.Authorize.getPageName(),
+ workflowId + "." + TeamState.Authorize.getPageName(), AtsAuthorizeWorkPageDefinition.ID, WorkPageType.Working));
+ workItems.add(new WorkPageDefinition(TeamState.Implement.getPageName(),
+ workflowId + "." + TeamState.Implement.getPageName(), AtsImplementWorkPageDefinition.ID, WorkPageType.Working));
+ workItems.add(new WorkPageDefinition(TeamState.Completed.getPageName(),
+ workflowId + "." + TeamState.Completed.getPageName(), AtsCompletedWorkPageDefinition.ID,
+ WorkPageType.Completed));
+ workItems.add(new WorkPageDefinition(TeamState.Cancelled.getPageName(),
+ workflowId + "." + TeamState.Cancelled.getPageName(), AtsCancelledWorkPageDefinition.ID,
+ WorkPageType.Cancelled));
return workItems;
}
public static void addDefaultTransitions(WorkFlowDefinition teamWorkflowDefinition, String workflowId) {
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Endorse.name(), DefaultTeamState.Analyze.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Endorse.getPageName(), TeamState.Analyze.getPageName(),
TransitionType.ToPageAsDefault);
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Analyze.name(), DefaultTeamState.Authorize.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Analyze.getPageName(), TeamState.Authorize.getPageName(),
TransitionType.ToPageAsDefault);
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Authorize.name(), DefaultTeamState.Implement.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Authorize.getPageName(), TeamState.Implement.getPageName(),
TransitionType.ToPageAsDefault);
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Implement.name(), DefaultTeamState.Completed.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Implement.getPageName(), TeamState.Completed.getPageName(),
TransitionType.ToPageAsDefault);
// Add return transitions
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Analyze.name(), DefaultTeamState.Endorse.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Analyze.getPageName(), TeamState.Endorse.getPageName(),
TransitionType.ToPageAsReturn);
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Authorize.name(), DefaultTeamState.Analyze.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Authorize.getPageName(), TeamState.Analyze.getPageName(),
TransitionType.ToPageAsReturn);
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Implement.name(), DefaultTeamState.Analyze.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Implement.getPageName(), TeamState.Analyze.getPageName(),
TransitionType.ToPageAsReturn);
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Implement.name(), DefaultTeamState.Authorize.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Implement.getPageName(), TeamState.Authorize.getPageName(),
TransitionType.ToPageAsReturn);
- teamWorkflowDefinition.addPageTransition(DefaultTeamState.Completed.name(), DefaultTeamState.Implement.name(),
+ teamWorkflowDefinition.addPageTransition(TeamState.Completed.getPageName(), TeamState.Implement.getPageName(),
TransitionType.ToPageAsReturn);
// Add cancelled transitions
- teamWorkflowDefinition.addPageTransitionToPageAndReturn(DefaultTeamState.Endorse.name(),
- DefaultTeamState.Cancelled.name());
- teamWorkflowDefinition.addPageTransitionToPageAndReturn(DefaultTeamState.Analyze.name(),
- DefaultTeamState.Cancelled.name());
- teamWorkflowDefinition.addPageTransitionToPageAndReturn(DefaultTeamState.Authorize.name(),
- DefaultTeamState.Cancelled.name());
- teamWorkflowDefinition.addPageTransitionToPageAndReturn(DefaultTeamState.Implement.name(),
- DefaultTeamState.Cancelled.name());
+ teamWorkflowDefinition.addPageTransitionToPageAndReturn(TeamState.Endorse.getPageName(),
+ TeamState.Cancelled.getPageName());
+ teamWorkflowDefinition.addPageTransitionToPageAndReturn(TeamState.Analyze.getPageName(),
+ TeamState.Cancelled.getPageName());
+ teamWorkflowDefinition.addPageTransitionToPageAndReturn(TeamState.Authorize.getPageName(),
+ TeamState.Cancelled.getPageName());
+ teamWorkflowDefinition.addPageTransitionToPageAndReturn(TeamState.Implement.getPageName(),
+ TeamState.Cancelled.getPageName());
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java
index c097ec4eb52..786d6309214 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsAddDecisionReviewRule.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.workflow.item;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
import java.util.logging.Level;
import org.eclipse.osee.ats.artifact.AbstractReviewArtifact.ReviewBlockType;
import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
@@ -81,8 +82,11 @@ public class AtsAddDecisionReviewRule extends WorkRuleDefinition {
/**
* Creates decision review if one of same name doesn't already exist
+ *
+ * @param createdDate TODO
+ * @param createdUser TODO
*/
- public static DecisionReviewArtifact createNewDecisionReview(WorkRuleDefinition atsAddDecisionReviewRule, SkynetTransaction transaction, TeamWorkFlowArtifact teamArt, DecisionRuleOption... decisionRuleOption) throws OseeCoreException {
+ public static DecisionReviewArtifact createNewDecisionReview(WorkRuleDefinition atsAddDecisionReviewRule, SkynetTransaction transaction, TeamWorkFlowArtifact teamArt, Date createdDate, User createdBy, DecisionRuleOption... decisionRuleOption) throws OseeCoreException {
if (!atsAddDecisionReviewRule.getId().startsWith(AtsAddDecisionReviewRule.ID)) {
throw new OseeArgumentException("WorkRuleDefinition must be AtsAddDecisionReviewRule.ID");
}
@@ -99,7 +103,7 @@ public class AtsAddDecisionReviewRule extends WorkRuleDefinition {
getValueOrDefault(teamArt, atsAddDecisionReviewRule, DecisionParameter.forState),
getReviewBlockTypeOrDefault(teamArt, atsAddDecisionReviewRule),
getValueOrDefault(teamArt, atsAddDecisionReviewRule, DecisionParameter.options),
- getAssigneesOrDefault(teamArt, atsAddDecisionReviewRule), transaction);
+ getAssigneesOrDefault(teamArt, atsAddDecisionReviewRule), createdDate, createdBy, transaction);
} else {
decArt =
ReviewManager.createNewDecisionReview(teamArt, title,
@@ -107,7 +111,7 @@ public class AtsAddDecisionReviewRule extends WorkRuleDefinition {
getValueOrDefault(teamArt, atsAddDecisionReviewRule, DecisionParameter.forState),
getReviewBlockTypeOrDefault(teamArt, atsAddDecisionReviewRule),
getValueOrDefault(teamArt, atsAddDecisionReviewRule, DecisionParameter.options),
- getAssigneesOrDefault(teamArt, atsAddDecisionReviewRule), transaction);
+ getAssigneesOrDefault(teamArt, atsAddDecisionReviewRule), createdDate, createdBy, transaction);
}
decArt.getLog().addLog(LogType.Note, null, "Review auto-generated off rule " + atsAddDecisionReviewRule.getId());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java
index 3c0881de526..d701dd40eba 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancellationReasonStateWorkItem.java
@@ -11,8 +11,6 @@
package org.eclipse.osee.ats.workflow.item;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.artifact.log.LogItem;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.ui.skynet.widgets.XOption;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayoutData;
@@ -29,8 +27,7 @@ public class AtsCancellationReasonStateWorkItem extends WorkWidgetDefinition {
super("Cancellation Reason", ID);
DynamicXWidgetLayoutData data = new DynamicXWidgetLayoutData(null);
data.setName(getName());
- LogItem item = sma.getLog().getStateEvent(LogType.StateCancelled);
- data.setDefaultValue(item.getMsg());
+ data.setDefaultValue(sma.getCancelledFromState());
data.setId(getId());
data.setXWidgetName("XText");
data.getXOptionHandler().add(XOption.NOT_EDITABLE);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java
index 7a18f48b0c4..f352fb501fc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCancelledFromStateWorkItem.java
@@ -11,8 +11,6 @@
package org.eclipse.osee.ats.workflow.item;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.artifact.log.LogItem;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.ui.skynet.widgets.XOption;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayoutData;
@@ -27,8 +25,7 @@ public class AtsCancelledFromStateWorkItem extends WorkWidgetDefinition {
super("Cancelled from State", "ats.CancelledFromState");
DynamicXWidgetLayoutData data = new DynamicXWidgetLayoutData(null);
data.setName(getName());
- LogItem item = sma.getLog().getStateEvent(LogType.StateCancelled);
- data.setDefaultValue(item.getState());
+ data.setDefaultValue(sma.getCancelledFromState());
data.setId(getId());
data.setXWidgetName("XText");
data.getXOptionHandler().add(XOption.NOT_EDITABLE);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java
index 4e3b7e97dfd..30aeb8dce52 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsCompletedFromStateWorkItem.java
@@ -11,8 +11,6 @@
package org.eclipse.osee.ats.workflow.item;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.artifact.log.LogItem;
-import org.eclipse.osee.ats.artifact.log.LogType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.ui.skynet.widgets.XOption;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayoutData;
@@ -27,8 +25,7 @@ public class AtsCompletedFromStateWorkItem extends WorkWidgetDefinition {
super("Completed from State", "ats.CompletedFromState");
DynamicXWidgetLayoutData data = new DynamicXWidgetLayoutData(null);
data.setName(getName());
- LogItem item = sma.getLog().getStateEvent(LogType.StateComplete);
- data.setDefaultValue(item.getState());
+ data.setDefaultValue(sma.getCompletedFromState());
data.setId(getId());
data.setXWidgetName("XText");
data.getXOptionHandler().add(XOption.NOT_EDITABLE);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDecisionReviewRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDecisionReviewRule.java
index ca2cf874b2c..a446cef02e9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDecisionReviewRule.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDecisionReviewRule.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow.item;
-import org.eclipse.osee.ats.artifact.DecisionReviewArtifact.DecisionReviewState;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
/**
* @author Donald G. Dunne
@@ -22,10 +22,10 @@ public class AtsStatePercentCompleteWeightDecisionReviewRule extends AtsStatePer
public AtsStatePercentCompleteWeightDecisionReviewRule() {
super(ID, ID);
setDescription("State Percent Complete rule for Decision Review.");
- addWorkDataKeyValue(DecisionReviewState.Prepare.name(), ".20");
- addWorkDataKeyValue(DecisionReviewState.Decision.name(), ".69");
- addWorkDataKeyValue(DecisionReviewState.Followup.name(), ".09");
- addWorkDataKeyValue(DecisionReviewState.Completed.name(), ".01");
+ addWorkDataKeyValue(DecisionReviewState.Prepare.getPageName(), ".20");
+ addWorkDataKeyValue(DecisionReviewState.Decision.getPageName(), ".69");
+ addWorkDataKeyValue(DecisionReviewState.Followup.getPageName(), ".09");
+ addWorkDataKeyValue(DecisionReviewState.Completed.getPageName(), ".01");
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDefaultWorkflowRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDefaultWorkflowRule.java
index 4dddb281cb7..f00759292a5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDefaultWorkflowRule.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightDefaultWorkflowRule.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow.item;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
/**
* @author Donald G. Dunne
@@ -22,11 +22,11 @@ public class AtsStatePercentCompleteWeightDefaultWorkflowRule extends AtsStatePe
public AtsStatePercentCompleteWeightDefaultWorkflowRule() {
super(ID, ID);
setDescription("State Percent Complete rule where Analyze and Implement states are where work is performed.");
- addWorkDataKeyValue(DefaultTeamState.Endorse.name(), ".05");
- addWorkDataKeyValue(DefaultTeamState.Analyze.name(), ".1");
- addWorkDataKeyValue(DefaultTeamState.Authorize.name(), ".05");
- addWorkDataKeyValue(DefaultTeamState.Implement.name(), ".79");
- addWorkDataKeyValue(DefaultTeamState.Completed.name(), ".01");
+ addWorkDataKeyValue(TeamState.Endorse.getPageName(), ".05");
+ addWorkDataKeyValue(TeamState.Analyze.getPageName(), ".1");
+ addWorkDataKeyValue(TeamState.Authorize.getPageName(), ".05");
+ addWorkDataKeyValue(TeamState.Implement.getPageName(), ".79");
+ addWorkDataKeyValue(TeamState.Completed.getPageName(), ".01");
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightPeerToPeerReviewRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightPeerToPeerReviewRule.java
index 1a7963b26ef..5924a9ffb21 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightPeerToPeerReviewRule.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/item/AtsStatePercentCompleteWeightPeerToPeerReviewRule.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow.item;
-import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact.PeerToPeerReviewState;
+import org.eclipse.osee.ats.artifact.PeerToPeerReviewState;
/**
* @author Donald G. Dunne
@@ -22,9 +22,9 @@ public class AtsStatePercentCompleteWeightPeerToPeerReviewRule extends AtsStateP
public AtsStatePercentCompleteWeightPeerToPeerReviewRule() {
super(ID, ID);
setDescription("State Percent Complete rule for PeerToPeer Review.");
- addWorkDataKeyValue(PeerToPeerReviewState.Prepare.name(), ".20");
- addWorkDataKeyValue(PeerToPeerReviewState.Review.name(), ".79");
- addWorkDataKeyValue(PeerToPeerReviewState.Completed.name(), ".01");
+ addWorkDataKeyValue(PeerToPeerReviewState.Prepare.getPageName(), ".20");
+ addWorkDataKeyValue(PeerToPeerReviewState.Review.getPageName(), ".79");
+ addWorkDataKeyValue(PeerToPeerReviewState.Completed.getPageName(), ".01");
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java
index 0bfa4a53702..ae656f199de 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAnalyzeWorkPageDefinition.java
@@ -11,24 +11,25 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.TeamWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions.RuleWorkItemId;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsAnalyzeWorkPageDefinition extends WorkPageDefinition {
- public final static String ID = TeamWorkflowDefinition.ID + "." + DefaultTeamState.Analyze.name();
+ public final static String ID = TeamWorkflowDefinition.ID + "." + TeamState.Analyze.getPageName();
public AtsAnalyzeWorkPageDefinition() {
- this(DefaultTeamState.Analyze.name(), ID, null);
+ this(TeamState.Analyze.getPageName(), ID, null);
}
public AtsAnalyzeWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name());
addWorkItem(AtsAttributeTypes.WorkPackage);
addWorkItem(AtsAttributeTypes.Problem);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java
index 0963766c430..0ce783f2361 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsAuthorizeWorkPageDefinition.java
@@ -11,23 +11,24 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.TeamWorkflowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsAuthorizeWorkPageDefinition extends WorkPageDefinition {
- public final static String ID = TeamWorkflowDefinition.ID + "." + DefaultTeamState.Authorize.name();
+ public final static String ID = TeamWorkflowDefinition.ID + "." + TeamState.Authorize.getPageName();
public AtsAuthorizeWorkPageDefinition() {
- this(DefaultTeamState.Authorize.name(), ID, null);
+ this(TeamState.Authorize.getPageName(), ID, null);
}
public AtsAuthorizeWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(AtsAttributeTypes.WorkPackage);
addWorkItem(AtsAttributeTypes.EstimatedCompletionDate);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCancelledWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCancelledWorkPageDefinition.java
index ba779837f57..e6472b2022e 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCancelledWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCancelledWorkPageDefinition.java
@@ -10,22 +10,23 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow.page;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.TeamWorkflowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsCancelledWorkPageDefinition extends WorkPageDefinition {
- public final static String ID = TeamWorkflowDefinition.ID + "." + DefaultTeamState.Cancelled.name();
+ public final static String ID = TeamWorkflowDefinition.ID + "." + TeamState.Cancelled.getPageName();
public AtsCancelledWorkPageDefinition() {
- this(DefaultTeamState.Cancelled.name(), ID, null);
+ this(TeamState.Cancelled.getPageName(), ID, null);
}
public AtsCancelledWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Cancelled);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCompletedWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCompletedWorkPageDefinition.java
index b2e14850fad..227738020f4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCompletedWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsCompletedWorkPageDefinition.java
@@ -10,24 +10,25 @@
*******************************************************************************/
package org.eclipse.osee.ats.workflow.page;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.TeamWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions.RuleWorkItemId;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsCompletedWorkPageDefinition extends WorkPageDefinition {
- public final static String ID = TeamWorkflowDefinition.ID + "." + DefaultTeamState.Completed.name();
+ public final static String ID = TeamWorkflowDefinition.ID + "." + TeamState.Completed.getPageName();
public AtsCompletedWorkPageDefinition() {
- this(DefaultTeamState.Completed.name(), ID, null);
+ this(TeamState.Completed.getPageName(), ID, null);
}
public AtsCompletedWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Completed);
addWorkItem(RuleWorkItemId.atsAddDecisionValidateBlockingReview.name());
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java
index b4102d86987..62ff617aaac 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionCompletedWorkPageDefinition.java
@@ -11,24 +11,25 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.DecisionWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions.RuleWorkItemId;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsDecisionCompletedWorkPageDefinition extends WorkPageDefinition {
- public final static String ID = DecisionWorkflowDefinition.ID + "." + DefaultTeamState.Completed.name();
+ public final static String ID = DecisionWorkflowDefinition.ID + "." + TeamState.Completed.getPageName();
public AtsDecisionCompletedWorkPageDefinition() {
- this(DefaultTeamState.Completed.name(), ID, null);
+ this(TeamState.Completed.getPageName(), ID, null);
}
public AtsDecisionCompletedWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Completed);
addWorkItem(RuleWorkItemId.atsAddDecisionValidateBlockingReview.name());
addWorkItem(AtsDecisionDecisionWorkPageDefinition.DECISION_QUESTION_LABEL);
addWorkItem(AtsDecisionDecisionWorkPageDefinition.DECISION_ANSWER_LABEL);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java
index becb97af72c..33cdc22425d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionDecisionWorkPageDefinition.java
@@ -11,27 +11,27 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
import org.eclipse.osee.ats.workflow.flow.DecisionWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsDecisionDecisionWorkPageDefinition extends WorkPageDefinition {
- public final static String ID =
- DecisionWorkflowDefinition.ID + "." + DecisionReviewArtifact.DecisionReviewState.Decision.name();
+ public final static String ID = DecisionWorkflowDefinition.ID + "." + DecisionReviewState.Decision.getPageName();
public final static String DECISION_QUESTION_LABEL = "ats.Decision Question";
public final static String DECISION_ANSWER_LABEL = "ats.Decision Answer";
public AtsDecisionDecisionWorkPageDefinition() {
- this(DecisionReviewArtifact.DecisionReviewState.Decision.name(), ID, null);
+ this(DecisionReviewState.Decision.getPageName(), ID, null);
}
public AtsDecisionDecisionWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(AtsDecisionDecisionWorkPageDefinition.DECISION_QUESTION_LABEL);
addWorkItem(AtsAttributeTypes.Decision);
addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java
index e5d3c91d7a8..da630604ffa 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionFollowupWorkPageDefinition.java
@@ -11,24 +11,24 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
import org.eclipse.osee.ats.workflow.flow.DecisionWorkflowDefinition;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsDecisionFollowupWorkPageDefinition extends WorkPageDefinition {
- public final static String ID =
- DecisionWorkflowDefinition.ID + "." + DecisionReviewArtifact.DecisionReviewState.Followup.name();
+ public final static String ID = DecisionWorkflowDefinition.ID + "." + DecisionReviewState.Followup.getPageName();
public AtsDecisionFollowupWorkPageDefinition() {
- this(DecisionReviewArtifact.DecisionReviewState.Followup.name(), ID, null);
+ this(DecisionReviewState.Followup.getPageName(), ID, null);
}
public AtsDecisionFollowupWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(AtsAttributeTypes.Resolution);
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java
index 718e3f1a20e..0f7ccf7f05b 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsDecisionPrepareWorkPageDefinition.java
@@ -11,25 +11,25 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
+import org.eclipse.osee.ats.artifact.DecisionReviewState;
import org.eclipse.osee.ats.workflow.flow.DecisionWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsDecisionPrepareWorkPageDefinition extends WorkPageDefinition {
- public final static String ID =
- DecisionWorkflowDefinition.ID + "." + DecisionReviewArtifact.DecisionReviewState.Prepare.name();
+ public final static String ID = DecisionWorkflowDefinition.ID + "." + DecisionReviewState.Prepare.getPageName();
public AtsDecisionPrepareWorkPageDefinition() {
- this(DecisionReviewArtifact.DecisionReviewState.Prepare.name(), ID, null);
+ this(DecisionReviewState.Prepare.getPageName(), ID, null);
}
public AtsDecisionPrepareWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem("ats.Title");
addWorkItem(AtsAttributeTypes.DecisionReviewOptions);
addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java
index 91f737379f1..5f9312e1427 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsEndorseWorkPageDefinition.java
@@ -11,24 +11,25 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.TeamWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions.RuleWorkItemId;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsEndorseWorkPageDefinition extends WorkPageDefinition {
- public final static String ID = TeamWorkflowDefinition.ID + "." + DefaultTeamState.Endorse.name();
+ public final static String ID = TeamWorkflowDefinition.ID + "." + TeamState.Endorse.getPageName();
public AtsEndorseWorkPageDefinition() {
- this(DefaultTeamState.Endorse.name(), ID, null);
+ this(TeamState.Endorse.getPageName(), ID, null);
}
public AtsEndorseWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name());
addWorkItem("ats.Title");
addWorkItem(AtsAttributeTypes.Description);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java
index f96b0d307c4..f70841ae2cb 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsGoalInWorkPageDefinition.java
@@ -11,11 +11,12 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.GoalArtifact.GoalState;
+import org.eclipse.osee.ats.artifact.GoalState;
import org.eclipse.osee.ats.column.EstimatedHoursXWidget;
import org.eclipse.osee.ats.workflow.flow.GoalWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -29,7 +30,7 @@ public class AtsGoalInWorkPageDefinition extends WorkPageDefinition {
}
public AtsGoalInWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem("ats.Title");
addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID);
addWorkItem(EstimatedHoursXWidget.ATS_ESTIMATED_HOURS_NOT_REQUIRED_ID);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java
index fd51cba8bbc..fb92596aa03 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsImplementWorkPageDefinition.java
@@ -11,24 +11,25 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.workflow.flow.TeamWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions.RuleWorkItemId;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsImplementWorkPageDefinition extends WorkPageDefinition {
- public final static String ID = TeamWorkflowDefinition.ID + "." + DefaultTeamState.Implement.name();
+ public final static String ID = TeamWorkflowDefinition.ID + "." + TeamState.Implement.getPageName();
public AtsImplementWorkPageDefinition() {
- this(DefaultTeamState.Implement.name(), ID, null);
+ this(TeamState.Implement.getPageName(), ID, null);
}
public AtsImplementWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name());
addWorkItem(AtsAttributeTypes.WorkPackage);
addWorkItem(AtsAttributeTypes.EstimatedCompletionDate);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java
index 378b167e916..ca202fa28f6 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerPrepareWorkPageDefinition.java
@@ -11,25 +11,25 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
+import org.eclipse.osee.ats.artifact.PeerToPeerReviewState;
import org.eclipse.osee.ats.workflow.flow.PeerToPeerWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsPeerPrepareWorkPageDefinition extends WorkPageDefinition {
- public final static String ID =
- PeerToPeerWorkflowDefinition.ID + "." + PeerToPeerReviewArtifact.PeerToPeerReviewState.Prepare.name();
+ public final static String ID = PeerToPeerWorkflowDefinition.ID + "." + PeerToPeerReviewState.Prepare.getPageName();
public AtsPeerPrepareWorkPageDefinition() {
- this(PeerToPeerReviewArtifact.PeerToPeerReviewState.Prepare.name(), ID, null);
+ this(PeerToPeerReviewState.Prepare.getPageName(), ID, null);
}
public AtsPeerPrepareWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem("ats.Title");
addWorkItem(AtsAttributeTypes.RelatedToState);
addWorkItem(AtsAttributeTypes.LegacyPcrId);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java
index 6c8a61757fd..77acd627ed3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsPeerReviewWorkPageDefinition.java
@@ -11,25 +11,25 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
+import org.eclipse.osee.ats.artifact.PeerToPeerReviewState;
import org.eclipse.osee.ats.workflow.flow.PeerToPeerWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsPeerReviewWorkPageDefinition extends WorkPageDefinition {
- public final static String ID =
- PeerToPeerWorkflowDefinition.ID + "." + PeerToPeerReviewArtifact.PeerToPeerReviewState.Review.name();
+ public final static String ID = PeerToPeerWorkflowDefinition.ID + "." + PeerToPeerReviewState.Review.getPageName();
public AtsPeerReviewWorkPageDefinition() {
- this(PeerToPeerReviewArtifact.PeerToPeerReviewState.Review.name(), ID, null);
+ this(PeerToPeerReviewState.Review.getPageName(), ID, null);
}
public AtsPeerReviewWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(AtsAttributeTypes.Role);
addWorkItem(AtsAttributeTypes.ReviewDefect);
addWorkItem(AtsAttributeTypes.Resolution);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java
index 9c463d61e10..13ac644fb24 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsSimpleInWorkWorkPageDefinition.java
@@ -15,6 +15,7 @@ import org.eclipse.osee.ats.workflow.flow.SimpleWorkflowDefinition;
import org.eclipse.osee.ats.workflow.flow.SimpleWorkflowDefinition.SimpleState;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions.RuleWorkItemId;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -28,7 +29,7 @@ public class AtsSimpleInWorkWorkPageDefinition extends WorkPageDefinition {
}
public AtsSimpleInWorkWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name());
addWorkItem(AtsAttributeTypes.Resolution);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java
index 59dd841510b..e9a370e857a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/page/AtsTaskInWorkPageDefinition.java
@@ -11,25 +11,26 @@
package org.eclipse.osee.ats.workflow.page;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
-import org.eclipse.osee.ats.artifact.TaskArtifact.TaskStates;
+import org.eclipse.osee.ats.artifact.TaskStates;
import org.eclipse.osee.ats.workflow.flow.TaskWorkflowDefinition;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions;
import org.eclipse.osee.ats.workflow.item.AtsWorkDefinitions.RuleWorkItemId;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageDefinition;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
*/
public class AtsTaskInWorkPageDefinition extends WorkPageDefinition {
- public final static String ID = TaskWorkflowDefinition.ID + "." + TaskStates.InWork.name();
+ public final static String ID = TaskWorkflowDefinition.ID + "." + TaskStates.InWork.getPageName();
public AtsTaskInWorkPageDefinition() {
- this(TaskStates.InWork.name(), ID, null);
+ this(TaskStates.InWork.getPageName(), ID, null);
}
public AtsTaskInWorkPageDefinition(String name, String pageId, String parentId) {
- super(name, pageId, parentId);
+ super(name, pageId, parentId, WorkPageType.Working);
addWorkItem(RuleWorkItemId.atsRequireStateHourSpentPrompt.name());
addWorkItem("ats.Title");
addWorkItem(AtsWorkDefinitions.ATS_DESCRIPTION_NOT_REQUIRED_ID);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsXWidgetActionFormPage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsXWidgetActionFormPage.java
index c964d5d43e9..07f4814d2c9 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsXWidgetActionFormPage.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsXWidgetActionFormPage.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.XFormToolkit;
import org.eclipse.osee.framework.ui.skynet.XWidgetParser;
+import org.eclipse.osee.framework.ui.skynet.artifact.editor.parts.AttributeFormPart;
import org.eclipse.osee.framework.ui.skynet.util.FormsUtil;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DefaultXWidgetOptionResolver;
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.DynamicXWidgetLayout;
@@ -30,6 +31,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IDynamicWidgetLayou
import org.eclipse.osee.framework.ui.skynet.widgets.workflow.IXWidgetOptionResolver;
import org.eclipse.osee.framework.ui.swt.ALayout;
import org.eclipse.osee.framework.ui.swt.Displays;
+import org.eclipse.osee.framework.ui.swt.FontManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -85,6 +87,8 @@ public abstract class AtsXWidgetActionFormPage extends FormPage {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
}
+ AttributeFormPart.setLabelFonts(body, FontManager.getDefaultLabelFont());
+
createToolBar();
managedForm.refresh();
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldViewArtifact.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldViewArtifact.java
index 3282acf78cd..8ccc78a4e4c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldViewArtifact.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/IWorldViewArtifact.java
@@ -19,8 +19,6 @@ public interface IWorldViewArtifact {
String getAssigneeStr() throws OseeCoreException;
- String getState() throws OseeCoreException;
-
/**
* @return estimated hours from workflow attribute, tasks and reviews
*/
@@ -34,8 +32,6 @@ public interface IWorldViewArtifact {
double getWorldViewHoursSpentTotal() throws OseeCoreException;
- String getWorldViewID() throws OseeCoreException;
-
int getWorldViewPercentCompleteState() throws OseeCoreException;
int getWorldViewPercentCompleteStateReview() throws OseeCoreException;
@@ -44,10 +40,4 @@ public interface IWorldViewArtifact {
int getWorldViewPercentCompleteTotal() throws OseeCoreException;
- String getWorldViewTitle() throws OseeCoreException;
-
- String getType() throws OseeCoreException;
-
- double getWorldViewWeeklyBenefit() throws OseeCoreException;
-
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldCompletedFilter.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldCompletedFilter.java
index 662c5d77ab3..d4bc354ef9a 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldCompletedFilter.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldCompletedFilter.java
@@ -10,9 +10,11 @@
*******************************************************************************/
package org.eclipse.osee.ats.world;
-import java.util.regex.Pattern;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
+import org.eclipse.osee.ats.artifact.ActionArtifact;
+import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -20,19 +22,22 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
public class WorldCompletedFilter extends ViewerFilter {
- Pattern p = Pattern.compile("(Completed|Cancelled)");
-
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
try {
Artifact art = (Artifact) element;
- if (art instanceof IWorldViewArtifact) {
- return !p.matcher(((IWorldViewArtifact) art).getState()).find();
+ if (art instanceof AbstractWorkflowArtifact) {
+ return ((AbstractWorkflowArtifact) art).isInWork();
+ } else if (art instanceof ActionArtifact) {
+ for (TeamWorkFlowArtifact teamArt : ((ActionArtifact) art).getTeamWorkFlowArtifacts()) {
+ if (teamArt.isInWork()) {
+ return true;
+ }
+ }
}
} catch (Exception ex) {
OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, ex);
}
- return true;
+ return false;
}
-
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java
index 29808e530a2..35dd024ad51 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java
@@ -59,7 +59,7 @@ import org.eclipse.osee.ats.task.TaskEditorSimpleProvider;
import org.eclipse.osee.ats.task.TaskXViewer;
import org.eclipse.osee.ats.util.ArtifactEmailWizard;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.ats.util.xviewer.column.XViewerAtsAttributeColumn;
import org.eclipse.osee.framework.core.data.IAttributeType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -614,7 +614,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer
public void setCancelledNotification() {
TreeItem item = getTree().getItem(0);
if (item.getData() instanceof String) {
- item.setData(DefaultTeamState.Cancelled.name());
+ item.setData(TeamState.Cancelled.getPageName());
}
refresh(item.getData());
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java
index e937f9ecd04..d12e3440391 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java
@@ -24,7 +24,6 @@ import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.config.AtsCacheManager;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.ats.util.widgets.dialog.ActionActionableItemListDialog;
import org.eclipse.osee.framework.core.enums.Active;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -32,7 +31,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.AbstractArtifactSearchCriteria;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.artifact.search.AttributeCriteria;
-import org.eclipse.osee.framework.skynet.core.artifact.search.Operator;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
/**
@@ -138,10 +136,7 @@ public class ActionableItemWorldSearchItem extends WorldUISearchItem {
criteria.add(new AttributeCriteria(AtsAttributeTypes.ActionableItem, actionItemGuids));
// exclude completed or canceled
if (!selectedShowFinished) {
- List<String> cancelOrComplete = new ArrayList<String>(2);
- cancelOrComplete.add(DefaultTeamState.Cancelled.name() + ";;;");
- cancelOrComplete.add(DefaultTeamState.Completed.name() + ";;;");
- criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL));
+ TeamWorldSearchItem.addIncludeCompletedCancelledCriteria(criteria, false, false);
}
Collection<Artifact> artifacts =
ArtifactQuery.getArtifactListFromCriteria(AtsUtil.getAtsBranch(), 1000, criteria);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java
index 29f42178236..522a38795f3 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java
@@ -23,7 +23,6 @@ import org.eclipse.osee.ats.artifact.TeamDefinitionArtifact;
import org.eclipse.osee.ats.config.AtsCacheManager;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.ats.util.GoalManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -32,7 +31,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.AbstractArtifactSearchCriteria;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.artifact.search.AttributeCriteria;
-import org.eclipse.osee.framework.skynet.core.artifact.search.Operator;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
/**
@@ -118,10 +116,7 @@ public class GoalSearchItem extends WorldUISearchItem {
}
if (!showFinished) {
- List<String> cancelOrComplete = new ArrayList<String>(2);
- cancelOrComplete.add(DefaultTeamState.Cancelled.name() + ";;;");
- cancelOrComplete.add(DefaultTeamState.Completed.name() + ";;;");
- criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL));
+ TeamWorldSearchItem.addIncludeCompletedCancelledCriteria(criteria, false, false);
}
List<Artifact> artifacts =
@@ -136,7 +131,7 @@ public class GoalSearchItem extends WorldUISearchItem {
if (userArt != null && !sma.getStateMgr().getAssignees().contains(userArt)) {
continue;
}
- if (!showFinished && sma.isCancelledOrCompleted()) {
+ if (!showFinished && sma.isCompletedOrCancelled()) {
continue;
}
resultGoalArtifacts.add(goalArt);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java
index d8a8133da4b..39db76336d8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java
@@ -67,7 +67,7 @@ public class MyGoalWorkflowItem extends UserSearchItem {
List<Artifact> artifactsToReturn = new ArrayList<Artifact>(artifacts.size());
for (Artifact artifact : artifacts) {
- if (artifact instanceof GoalArtifact && (goalSearchState == GoalSearchState.All || goalSearchState == GoalSearchState.InWork && !((AbstractWorkflowArtifact) artifact).isCancelledOrCompleted())) {
+ if (artifact instanceof GoalArtifact && (goalSearchState == GoalSearchState.All || goalSearchState == GoalSearchState.InWork && !((AbstractWorkflowArtifact) artifact).isCompletedOrCancelled())) {
artifactsToReturn.add(artifact);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java
index 7a56370d48d..0d8de14f69c 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java
@@ -67,7 +67,7 @@ public class MyReviewWorkflowItem extends UserSearchItem {
List<Artifact> artifactsToReturn = new ArrayList<Artifact>(artifacts.size());
for (Artifact artifact : artifacts) {
- if (artifact instanceof AbstractReviewArtifact && (reviewState == ReviewState.All || reviewState == ReviewState.InWork && !((AbstractWorkflowArtifact) artifact).isCancelledOrCompleted())) {
+ if (artifact instanceof AbstractReviewArtifact && (reviewState == ReviewState.All || reviewState == ReviewState.InWork && !((AbstractWorkflowArtifact) artifact).isCompletedOrCancelled())) {
artifactsToReturn.add(artifact);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java
index 6a04ecedd1a..e43493776bf 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java
@@ -13,17 +13,13 @@ package org.eclipse.osee.ats.world.search;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.AbstractArtifactSearchCriteria;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import org.eclipse.osee.framework.skynet.core.artifact.search.AttributeCriteria;
-import org.eclipse.osee.framework.skynet.core.artifact.search.Operator;
import org.eclipse.osee.framework.skynet.core.relation.RelationManager;
import org.eclipse.osee.framework.ui.swt.KeyedImage;
@@ -56,10 +52,7 @@ public class ShowOpenWorkflowsByArtifactType extends WorldUISearchItem {
List<Artifact> artifacts = null;
if (!showFinished) {
List<AbstractArtifactSearchCriteria> criteria = new ArrayList<AbstractArtifactSearchCriteria>();
- List<String> cancelOrComplete = new ArrayList<String>(2);
- cancelOrComplete.add(DefaultTeamState.Cancelled.name() + ";;;");
- cancelOrComplete.add(DefaultTeamState.Completed.name() + ";;;");
- criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL));
+ TeamWorldSearchItem.addIncludeCompletedCancelledCriteria(criteria, showFinished, showFinished);
artifacts = ArtifactQuery.getArtifactListFromTypeAnd(artifactType, AtsUtil.getAtsBranch(), 500, criteria);
} else {
artifacts = ArtifactQuery.getArtifactListFromType(artifactType, AtsUtil.getAtsBranch());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
index 976b30fbb2f..a832136cadc 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java
@@ -60,7 +60,8 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
private XMembersCombo assigneeCombo;
- private XCheckBox includeCompletedCancelledCheckbox;
+ private XCheckBox includeCompletedCheckbox;
+ private XCheckBox includeCancelledCheckbox;
private XHyperlabelTeamDefinitionSelection teamCombo = null;
private XHyperlabelGroupSelection groupWidget = null;
private XCombo versionCombo = null;
@@ -77,15 +78,17 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
public String getParameterXWidgetXml() {
return "<xWidgets>" +
//
- "<XWidget xwidgetType=\"XHyperlabelTeamDefinitionSelection\" displayName=\"Team Definitions(s)\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Team Definitions(s)\" xwidgetType=\"XHyperlabelTeamDefinitionSelection\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XCombo()\" beginComposite=\"8\" displayName=\"Version\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Version\" xwidgetType=\"XCombo()\" beginComposite=\"5\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XCheckBox\" displayName=\"Include Completed/Cancelled\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Assignee\" xwidgetType=\"XMembersCombo\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XHyperlabelGroupSelection\" displayName=\"Group(s)\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Group(s)\" xwidgetType=\"XHyperlabelGroupSelection\" horizontalLabel=\"true\"/>" +
//
- "<XWidget xwidgetType=\"XMembersCombo\" displayName=\"Assignee\" horizontalLabel=\"true\"/>" +
+ "<XWidget displayName=\"Include Completed\" xwidgetType=\"XCheckBox\" beginComposite=\"4\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
+ //
+ "<XWidget displayName=\"Include Cancelled\" xwidgetType=\"XCheckBox\" defaultValue=\"false\" labelAfter=\"true\" horizontalLabel=\"true\"/>" +
//
"</xWidgets>";
}
@@ -116,7 +119,7 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
// Else, get workflows from teamdefs
else if (teamDefs.size() > 0) {
TeamWorldSearchItem teamWorldSearchItem =
- new TeamWorldSearchItem("", teamDefs, true, false, false, null, null, ReleasedOption.Both);
+ new TeamWorldSearchItem("", teamDefs, true, true, false, false, null, null, ReleasedOption.Both);
workflows.addAll(teamWorldSearchItem.performSearchGetResults(false, SearchType.Search));
} else if (groups.size() > 0) {
Set<TaskArtifact> taskArts = new HashSet<TaskArtifact>();
@@ -157,11 +160,16 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
for (Artifact art : artifacts) {
TaskArtifact taskArt = (TaskArtifact) art;
// If not include completed and task is such, skip this task
- if (!isIncludeCompletedCancelledCheckbox() && taskArt.isCancelledOrCompleted()) {
+ if (!isIncludeCompletedCheckbox() && taskArt.isCompleted()) {
+ continue;
+ }
+ if (!isIncludeCancelledCheckbox() && taskArt.isCancelled()) {
continue;
}
+ boolean isIncludeCompletedAndCompleted = isIncludeCompletedCheckbox() && taskArt.isCompleted();
+ boolean isIncludeCancelledAndCancelled = isIncludeCancelledCheckbox() && taskArt.isCancelled();
// If include completed and task is such and user not implementer, skip this task
- if (isIncludeCompletedCancelledCheckbox() && taskArt.isCancelledOrCompleted() && getSelectedUser() != null && taskArt.getImplementers().contains(
+ if ((isIncludeCompletedAndCompleted || isIncludeCancelledAndCancelled) && getSelectedUser() != null && taskArt.getImplementers().contains(
getSelectedUser())) {
tasks.add(taskArt);
continue;
@@ -177,9 +185,9 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
@Override
public Result isParameterSelectionValid() throws OseeCoreException {
- if (getSelectedUser() != null && isIncludeCompletedCancelledCheckbox() && getSelectedVersionArtifact() == null && getSelectedTeamDefinitions().isEmpty()) {
+ if (getSelectedUser() != null && isIncludeCompletedCheckbox() && isIncludeCancelledCheckbox() && getSelectedVersionArtifact() == null && getSelectedTeamDefinitions().isEmpty()) {
// This case is unsupported and should be filtered out prior to this point
- throw new OseeArgumentException("Unsupported User and Include Completed selected.");
+ throw new OseeArgumentException("Unsupported User and Include Completed/Cancelled selected.");
}
// If only user selected, handle that case separately
@@ -219,9 +227,15 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
sb.append(" - Assignee: ");
sb.append(getSelectedUser());
}
- if (isIncludeCompletedCancelledCheckbox()) {
+ if (isIncludeCompletedCheckbox() && isIncludeCancelledCheckbox()) {
sb.append(" - Include Completed/Cancelled");
}
+ if (isIncludeCompletedCheckbox()) {
+ sb.append(" - Include Completed");
+ }
+ if (isIncludeCancelledCheckbox()) {
+ sb.append(" - Include Cancelled");
+ }
return Strings.truncate("Tasks" + sb.toString(), TaskEditor.TITLE_MAX_LENGTH, true);
}
@@ -243,8 +257,11 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
if (widget.getLabel().equals("Assignee")) {
assigneeCombo = (XMembersCombo) widget;
}
- if (widget.getLabel().equals("Include Completed/Cancelled")) {
- includeCompletedCancelledCheckbox = (XCheckBox) widget;
+ if (widget.getLabel().equals("Include Completed")) {
+ includeCompletedCheckbox = (XCheckBox) widget;
+ }
+ if (widget.getLabel().equals("Include Cancelled")) {
+ includeCancelledCheckbox = (XCheckBox) widget;
}
if (widget.getLabel().equals("Version")) {
versionCombo = (XCombo) widget;
@@ -299,16 +316,29 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem {
}
}
- private boolean isIncludeCompletedCancelledCheckbox() {
- if (includeCompletedCancelledCheckbox == null) {
+ private boolean isIncludeCancelledCheckbox() {
+ if (includeCancelledCheckbox == null) {
+ return false;
+ }
+ return includeCancelledCheckbox.isSelected();
+ }
+
+ public void setIncludeCancelledCheckbox(boolean selected) {
+ if (includeCancelledCheckbox != null) {
+ includeCancelledCheckbox.set(selected);
+ }
+ }
+
+ private boolean isIncludeCompletedCheckbox() {
+ if (includeCompletedCheckbox == null) {
return false;
}
- return includeCompletedCancelledCheckbox.isSelected();
+ return includeCompletedCheckbox.isSelected();
}
- public void setIncludeCompletedCancelledCheckbox(boolean selected) {
- if (includeCompletedCancelledCheckbox != null) {
- includeCompletedCancelledCheckbox.set(selected);
+ public void setIncludeCompletedCheckbox(boolean selected) {
+ if (includeCompletedCheckbox != null) {
+ includeCompletedCheckbox.set(selected);
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java
index 31661ad11dd..180ed4b7cad 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java
@@ -16,6 +16,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import java.util.logging.Level;
import org.eclipse.osee.ats.AtsImage;
import org.eclipse.osee.ats.artifact.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.artifact.AtsAttributeTypes;
@@ -23,20 +24,25 @@ import org.eclipse.osee.ats.artifact.TeamDefinitionArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.VersionArtifact;
import org.eclipse.osee.ats.config.AtsCacheManager;
+import org.eclipse.osee.ats.internal.AtsPlugin;
import org.eclipse.osee.ats.util.AtsArtifactTypes;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
+import org.eclipse.osee.ats.util.TeamState;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist;
+import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.User;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.AbstractArtifactSearchCriteria;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
import org.eclipse.osee.framework.skynet.core.artifact.search.AttributeCriteria;
import org.eclipse.osee.framework.skynet.core.artifact.search.Operator;
+import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
import org.eclipse.osee.framework.skynet.core.relation.RelationManager;
import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
import org.eclipse.osee.framework.ui.skynet.util.ChangeType;
+import org.eclipse.osee.framework.ui.skynet.widgets.workflow.WorkPageType;
/**
* @author Donald G. Dunne
@@ -50,35 +56,38 @@ public class TeamWorldSearchItem extends WorldUISearchItem {
};
private Collection<TeamDefinitionArtifact> teamDefs;
private final boolean recurseChildren;
- private boolean showFinished;
+ private boolean includeCompleted;
private boolean showAction;
private final Collection<String> teamDefNames;
private final ChangeType changeType;
private final VersionArtifact versionArt;
private final User userArt;
private final ReleasedOption releasedOption;
+ private final boolean includeCancelled;
- public TeamWorldSearchItem(String displayName, List<String> teamDefNames, boolean showFinished, boolean showAction, boolean recurseChildren, ChangeType changeType, VersionArtifact versionArt, User userArt, ReleasedOption releasedOption) {
+ public TeamWorldSearchItem(String displayName, List<String> teamDefNames, boolean includeCompleted, boolean includeCancelled, boolean showAction, boolean recurseChildren, ChangeType changeType, VersionArtifact versionArt, User userArt, ReleasedOption releasedOption) {
super(displayName, AtsImage.TEAM_WORKFLOW);
+ this.includeCancelled = includeCancelled;
this.versionArt = versionArt;
this.userArt = userArt;
this.teamDefNames = teamDefNames;
- this.showFinished = showFinished;
+ this.includeCompleted = includeCompleted;
this.releasedOption = releasedOption;
this.showAction = showAction;
this.recurseChildren = recurseChildren;
this.changeType = changeType;
}
- public TeamWorldSearchItem(String displayName, Collection<TeamDefinitionArtifact> teamDefs, boolean showFinished, boolean showAction, boolean recurseChildren, VersionArtifact versionArt, User userArt, ReleasedOption releasedOption) {
+ public TeamWorldSearchItem(String displayName, Collection<TeamDefinitionArtifact> teamDefs, boolean includeCompleted, boolean includeCancelled, boolean showAction, boolean recurseChildren, VersionArtifact versionArt, User userArt, ReleasedOption releasedOption) {
super(displayName, AtsImage.TEAM_WORKFLOW);
+ this.includeCancelled = includeCancelled;
this.versionArt = versionArt;
this.userArt = userArt;
this.recurseChildren = recurseChildren;
this.releasedOption = releasedOption;
this.teamDefNames = null;
this.teamDefs = teamDefs;
- this.showFinished = showFinished;
+ this.includeCompleted = includeCompleted;
this.showAction = showAction;
this.changeType = null;
}
@@ -91,7 +100,8 @@ public class TeamWorldSearchItem extends WorldUISearchItem {
this.recurseChildren = teamWorldUISearchItem.recurseChildren;
this.teamDefNames = teamWorldUISearchItem.teamDefNames;
this.teamDefs = teamWorldUISearchItem.teamDefs;
- this.showFinished = teamWorldUISearchItem.showFinished;
+ this.includeCompleted = teamWorldUISearchItem.includeCompleted;
+ this.includeCancelled = teamWorldUISearchItem.includeCancelled;
this.showAction = teamWorldUISearchItem.showAction;
this.changeType = teamWorldUISearchItem.changeType;
}
@@ -147,12 +157,8 @@ public class TeamWorldSearchItem extends WorldUISearchItem {
criteria.add(new AttributeCriteria(AtsAttributeTypes.TeamDefinition, teamDefinitionGuids));
}
- if (!showFinished) {
- List<String> cancelOrComplete = new ArrayList<String>(2);
- cancelOrComplete.add(DefaultTeamState.Cancelled.name() + ";;;");
- cancelOrComplete.add(DefaultTeamState.Completed.name() + ";;;");
- criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL));
- }
+ addIncludeCompletedCancelledCriteria(criteria, includeCompleted, includeCancelled);
+
if (changeType != null) {
criteria.add(new AttributeCriteria(AtsAttributeTypes.ChangeType, changeType.name()));
}
@@ -202,6 +208,39 @@ public class TeamWorldSearchItem extends WorldUISearchItem {
}
+ public static void addIncludeCompletedCancelledCriteria(List<AbstractArtifactSearchCriteria> criteria, boolean includeCompleted, boolean includeCancelled) throws OseeCoreException {
+ try {
+ if (AttributeTypeManager.getType(AtsAttributeTypes.CurrentStateType) != null) {
+ if (!includeCancelled && !includeCompleted) {
+ criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentStateType, WorkPageType.Working.name()));
+ } else {
+ List<String> cancelOrComplete = new ArrayList<String>(2);
+ cancelOrComplete.add(WorkPageType.Working.name());
+ if (includeCompleted) {
+ cancelOrComplete.add(WorkPageType.Completed.name());
+ }
+ if (includeCancelled) {
+ cancelOrComplete.add(WorkPageType.Cancelled.name());
+ }
+ criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentStateType, cancelOrComplete, Operator.EQUAL));
+ }
+ }
+ } catch (OseeTypeDoesNotExist ex) {
+ OseeLog.log(AtsPlugin.class, Level.SEVERE, ex);
+ // Backward compatibility; remove after 0.9.7 release
+ List<String> cancelOrComplete = new ArrayList<String>(2);
+ if (!includeCancelled) {
+ cancelOrComplete.add(TeamState.Cancelled.name() + ";;;");
+ }
+ if (!includeCompleted) {
+ cancelOrComplete.add(TeamState.Completed.name() + ";;;");
+ }
+ if (cancelOrComplete.size() > 0) {
+ criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentState, cancelOrComplete, Operator.NOT_EQUAL));
+ }
+ }
+ }
+
/**
* @param showAction The showAction to set.
*/
@@ -213,7 +252,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem {
* @param showFinished The showFinished to set.
*/
public void setShowFinished(boolean showFinished) {
- this.showFinished = showFinished;
+ this.includeCompleted = showFinished;
}
@Override
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java
index a9d0092db36..caf15f0c145 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java
@@ -23,7 +23,6 @@ import org.eclipse.osee.ats.artifact.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.artifact.VersionArtifact;
import org.eclipse.osee.ats.util.AtsRelationTypes;
import org.eclipse.osee.ats.util.AtsUtil;
-import org.eclipse.osee.ats.util.DefaultTeamState;
import org.eclipse.osee.ats.util.SMAUtil;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
@@ -105,30 +104,19 @@ public class UserWorldSearchItem {
}
if (!options.contains(UserSearchOption.IncludeCancelled)) {
- filteredArts =
- SMAUtil.filterOutState(filteredArts, java.util.Collections.singleton(DefaultTeamState.Cancelled.name()));
+ filteredArts = SMAUtil.filterOutCancelled(filteredArts);
}
if (!options.contains(UserSearchOption.IncludeCompleted)) {
- filteredArts =
- SMAUtil.filterOutState(filteredArts, java.util.Collections.singleton(DefaultTeamState.Completed.name()));
+ filteredArts = SMAUtil.filterOutCompleted(filteredArts);
}
return filteredArts;
}
private Collection<AbstractWorkflowArtifact> getOriginatorArtifacts() throws OseeCoreException {
- Collection<AbstractWorkflowArtifact> originators = new ArrayList<AbstractWorkflowArtifact>();
- Collection<AbstractWorkflowArtifact> artifacts =
- Collections.castAll(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.Log,
- "%type=\"Originated\" userId=\"" + user.getUserId() + "\"%", AtsUtil.getAtsBranch()));
- // omit historical originators; list current originators
- for (AbstractWorkflowArtifact art : artifacts) {
- if (art.getOriginatorStr().equals(user.getName())) {
- originators.add(art);
- }
- }
- return originators;
+ return Collections.castAll(ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.CreatedBy,
+ user.getUserId(), AtsUtil.getAtsBranch()));
}
private Collection<AbstractWorkflowArtifact> getSubscribedArtifacts() throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee b/plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee
index 49071bd5997..a7b87fe2b09 100644
--- a/plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee
+++ b/plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee
@@ -10,30 +10,18 @@ abstract artifactType "ats.Ats Artifact" extends "Artifact" {
attribute "ats.Description"
}
-artifactType "ats.Review" extends "ats.Ats Artifact" {
+artifactType "ats.Review" extends "ats.State Machine" {
guid "ABMa6P4TwzXA1b8K3RAA"
attribute "ats.Actionable Item"
- attribute "ats.Current State"
- attribute "ats.Estimated Completion Date"
- attribute "ats.Estimated Hours"
- attribute "ats.Estimated Release Date"
- attribute "ats.Legacy PCR Id"
- attribute "ats.Log"
- attribute "ats.Need By"
attribute "ats.Related To State"
- attribute "ats.Resolution"
attribute "ats.Review Blocks"
- attribute "ats.Role"
- attribute "ats.SMA Note"
- attribute "ats.State Notes"
- attribute "ats.State"
}
artifactType "PeerToPeer Review" extends "ats.Review" {
guid "AAMFDhh_300dpgmNtRAA"
- attribute "ats.Authors"
attribute "ats.Location"
attribute "ats.Review Defect"
+ attribute "ats.Role"
}
artifactType "Decision Review" extends "ats.Review" {
@@ -104,6 +92,16 @@ abstract artifactType "ats.State Machine" extends "ats.Ats Artifact" {
attribute "ats.SMA Note"
attribute "ats.State Notes"
attribute "ats.State"
+ attribute "ats.Current State Type"
+ attribute "ats.Created By"
+ attribute "ats.Created Date"
+ attribute "ats.Completed By"
+ attribute "ats.Completed Date"
+ attribute "ats.Completed From State"
+ attribute "ats.Cancelled By"
+ attribute "ats.Cancelled Date"
+ attribute "ats.Cancelled From State"
+ attribute "ats.Cancelled Reason"
}
artifactType "Goal" extends "ats.State Machine" {
@@ -158,6 +156,13 @@ attributeType "ats.Validation Required" extends BooleanAttribute {
defaultValue "no"
}
+attributeType "ats.Current State Type" extends StringAttribute {
+ guid "ATOWheEyGUJmPmPuqyAA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
attributeType "ats.Active" extends BooleanAttribute {
guid "AAMFEclQOVmzkIvzyWwA"
dataProvider DefaultAttributeDataProvider
@@ -259,6 +264,69 @@ attributeType "ats.Estimated Completion Date" extends DateAttribute {
max 1
}
+attributeType "ats.Completed Date" extends DateAttribute {
+ guid "AXnxSfRg6UhirNzaZnQA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
+attributeType "ats.Completed By" extends StringAttribute {
+ guid "AXo6tqxrOStgd9P16XQA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
+attributeType "ats.Completed From State" extends StringAttribute {
+ guid "AXr9OO909xRiI3MFNOwA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
+attributeType "ats.Cancelled Date" extends DateAttribute {
+ guid "AXnyKG1waCcPPHHGEFQA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
+attributeType "ats.Cancelled By" extends StringAttribute {
+ guid "AXpNsieBHnqaJJfduGgA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
+attributeType "ats.Cancelled Reason" extends StringAttribute {
+ guid "AXqJE0SmwRQzvzlqC9gA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
+attributeType "ats.Cancelled From State" extends StringAttribute {
+ guid "AXrxlXOwGiAnlaUNX6AA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
+attributeType "ats.Created Date" extends DateAttribute {
+ guid "AXny90bBpmfNkLpNhqwA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
+attributeType "ats.Created By" extends StringAttribute {
+ guid "AXpTVIExV1p0kp9IKKQA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
attributeType "ats.Release Date" extends DateAttribute {
guid "AAMFEc3+cGcMDOCdmdAA"
dataProvider DefaultAttributeDataProvider
@@ -626,13 +694,6 @@ attributeType "ats.Location" extends StringAttribute {
fileExtension "txt"
}
-attributeType "ats.Authors" extends StringAttribute {
- guid "AAMFEQmzoyhG0QNbstQA"
- dataProvider DefaultAttributeDataProvider
- min 0
- max 1
-}
-
attributeType "ats.Role" extends StringAttribute {
guid "AAMFEeCqMz0XCSBJ+IQA"
dataProvider DefaultAttributeDataProvider
diff --git a/plugins/org.eclipse.osee.client.integration.tests/MasterTestSuite_DemoDbTests.launch b/plugins/org.eclipse.osee.client.integration.tests/MasterTestSuite_DemoDbTests.launch
index 61041de3fd0..08b28876aca 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/MasterTestSuite_DemoDbTests.launch
+++ b/plugins/org.eclipse.osee.client.integration.tests/MasterTestSuite_DemoDbTests.launch
@@ -35,8 +35,8 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.osee.framework.ui.product.osee"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.jdt.debug@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.team.core@default:default,org.apache.oro@default:default,org.eclipse.zest.core@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.jdt.junit.core@default:default,org.apache.log4j@default:default,com.jcraft.jsch@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.emf.compare.ui@default:default,org.eclipse.update.core.win32@default:false,org.eclipse.core.runtime@default:true,org.apache.commons.el@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.pde.build@default:default,org.eclipse.ecf.ssl@default:false,org.h2@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.xtext.logging@default:false,org.apache.lucene.analysis@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.xtext.ui.shared@default:default,org.eclipse.compare@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.ui.forms@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.emf.mwe.utils@default:default,org.eclipse.update.core@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.xtext.common.types@default:default,org.apache.ant@default:default,org.eclipse.emf.edit.ui@default:default,org.hamcrest.core@default:default,org.eclipse.help@default:default,org.eclipse.birt.chart.engine@default:default,org.eclipse.ui.intro@default:default,javax.servlet.jsp@default:default,org.eclipse.xpand@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.xtext.ui@default:default,org.apache.jasper@default:default,org.apache.xml.resolver@default:default,org.eclipse.xtext.builder@default:default,org.eclipse.ui.browser@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.xtext@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.apache.lucene@default:default,org.eclipse.emf.edit@default:default,org.eclipse.help.ui@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.pde.ui@default:default,org.eclipse.emf.mwe2.runtime@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.help.base@default:default,org.aopalliance@default:default,org.eclipse.debug.core@default:default,org.apache.xerces@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.ant.core@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.p2.ui@default:default,org.junit*3.8.2.v3_8_2_v20100427-1100@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.update.scheduler@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.xtext.util@default:default,org.eclipse.ui@default:default,org.apache.commons.lang@default:default,com.google.inject@default:default,org.eclipse.team.ui@default:default,org.eclipse.nebula.widgets.xviewer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.update.ui@default:default,de.itemis.xtext.antlr@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.core.commands@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.team.svn.ui@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.gef@default:default,org.eclipse.jdt@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.databinding.beans@default:default,org.antlr.runtime@default:default,org.eclipse.emf.compare.match@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.emf.common@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.doc.isv@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,com.google.collect@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ui.presentations.r21@default:default,org.eclipse.emf.mwe2.language@default:default,org.eclipse.platform@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jdt.core.manipulation@default:default,org.mortbay.jetty.util@default:default,org.eclipse.osgi@-1:true,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.pde@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.p2.core@default:default,org.eclipse.core.variables@default:default,org.antlr.gen@default:default,org.eclipse.emf.compare@default:default,org.apache.commons.cli@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.jface.text@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.emf.codegen.ecore@default:default,org.sat4j.pb@default:default,org.eclipse.ui.workbench@default:default,javax.servlet@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.update.configurator@3:true,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ui.win32@default:false,org.eclipse.emf.compare.diff@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.xtext.xtend@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.sdk@default:default,org.eclipse.emf.common.ui@default:default,org.apache.commons.httpclient@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.birt.core@default:default,org.apache.commons.net@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.boot@default:default,org.eclipse.nebula.widgets.calendarcombo@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.emf.mwe.core@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.team.svn.core@default:default,com.ibm.icu@default:default,org.eclipse.xtext.generator@default:default,org.apache.commons.logging*1.1.1.v201005080502@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.core.databinding@default:default,org.eclipse.debug.ui@default:default,org.eclipse.pde.core@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.swt@default:default,org.eclipse.ant.ui@default:default,org.eclipse.compare.core@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.search@default:default,org.junit4@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.ant.launching@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ui.console@default:default,org.eclipse.xtend@default:default,org.eclipse.cvs@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.team.svn.help@default:default,org.polarion.eclipse.team.svn.connector@default:default,org.eclipse.equinox.util@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.team.svn@default:default,org.eclipse.xtend.typesystem.emf@default:default,org.eclipse.equinox.p2.director.app@default:default,com.lowagie.text@default:default,org.eclipse.rcp@default:default,org.eclipse.core.externaltools@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.ui.editors@default:default,org.eclipse.zest.layouts@default:default,org.eclipse.equinox.http.servlet@default:default,org.mozilla.javascript@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.team.cvs.ssh2@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ui.views@default:default,javax.mail.glassfish@default:default,org.apache.commons.codec@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.help.webapp@default:default,javax.activation@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.equinox.security@default:default,org.eclipse.team.cvs.ui@default:default,org.eclipse.jdt.core@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.jsch.core@default:default,org.sat4j.core@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.app@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.emf.mwe2.launch@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.apache.xml.serializer@default:default,org.eclipse.text@default:default,org.eclipse.help.appserver@default:default,org.eclipse.core.net@default:default,org.eclipse.draw2d@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.jdt.apt.core@default:default,javax.xml@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.jdt.launching@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ui.net@default:default,org.eclipse.pde.launching@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.jface@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.osee.framework.core.message.test@default:false,org.eclipse.osee.framework.core.dsl.integration@default:default,org.eclipse.osee.framework.database.test@default:false,org.eclipse.osee.framework.ui.service.control@default:default,org.eclipse.osee.framework.ui.jdk@default:default,org.eclipse.osee.framework.plugin.core@default:default,org.eclipse.osee.ote.ui.define@default:default,org.eclipse.osee.ote.runtimeManager@default:default,org.eclipse.osee.framework.svn@default:default,org.eclipse.osee.framework.core.dsl.integration.test@default:false,net.jini@default:default,org.eclipse.osee.framework.ui.ws@default:default,jms.activemq.launch@default:default,org.eclipse.osee.ats@default:default,org.eclipse.osee.ote.connection.service@default:default,org.eclipse.osee.framework.ui.swt@default:default,org.eclipse.osee.framework.ui.admin@default:default,org.eclipse.osee.framework.database@default:default,org.eclipse.osee.framework.logging@default:default,org.eclipse.osee.ote.messaging.dds@default:default,org.eclipse.osee.framework.jdk.core.test@default:false,org.eclipse.osee.framework.ui.skynet@default:default,org.eclipse.osee.framework.jdbcodbc@default:default,org.eclipse.osee.framework.messaging.event.res.test@default:false,org.eclipse.osee.framework.jdk.core@default:default,org.eclipse.osee.framework.core.dsl.ui@default:default,org.eclipse.nebula.widgets.xviewer@default:default,org.eclipse.osee.framework.ui.branch.graph@default:default,org.eclipse.osee.framework.templates@default:default,org.eclipse.osee.ote.client@default:default,org.eclipse.osee.framework.database.init@default:default,org.eclipse.osee.framework.access@default:default,org.eclipse.osee.framework.core.client@default:default,org.eclipse.osee.framework.core.model.test@default:false,org.eclipse.osee.framework.lifecycle.test@default:false,org.eclipse.osee.framework.help.ui@default:default,org.eclipse.osee.framework.core.message@default:default,org.eclipse.osee.client.integration.tests@default:default,org.eclipse.osee.framework.messaging@default:default,org.eclipse.osee.framework.ui.product@default:default,org.eclipse.osee.framework.jini@default:default,org.eclipse.osee.ote.client.msg@default:default,org.eclipse.osee.framework.core.dsl@default:default,org.eclipse.osee.framework.ui.data.model.editor@default:default,jms.libraries@default:default,org.eclipse.osee.ote.ui.test.manager@default:default,org.eclipse.osee.ote.core@default:default,org.eclipse.osee.framework.core.dsl.edit@default:default,org.eclipse.osee.framework.lifecycle@default:default,org.eclipse.nebula.widgets.xviewer.tests@default:false,org.eclipse.osee.framework.skynet.core@default:default,org.postgresql.driver@default:default,org.eclipse.osee.framework.messaging.event.skynet@default:default,org.eclipse.osee.define@default:default,org.eclipse.osee.coverage@default:default,org.eclipse.osee.ote.define@default:default,org.eclipse.osee.framework.messaging.event.res@default:default,org.eclipse.osee.framework.ui.workspacebundleloader@default:default,org.eclipse.osee.ote.ui@default:default,org.eclipse.osee.framework.ui.plugin@default:default,org.eclipse.osee.ats.config.demo@default:default,org.eclipse.osee.demo.db.connection@default:default,org.eclipse.osee.framework.core.test@default:false,org.eclipse.osee.ats.test@default:false,org.eclipse.osee.ote.ui.markers@default:default,org.eclipse.osee.ats.help.ui@default:default,org.eclipse.osee.define.test@default:false,org.eclipse.osee.framework.messaging.test@default:false,org.eclipse.osee.coverage.test@default:false,org.eclipse.osee.framework.postgresql@default:default,org.eclipse.osee.framework.core@default:default,org.eclipse.osee.support.test.util@default:default,org.eclipse.osee.framework.core.model@default:default,org.eclipse.osee.framework.skynet.core.test@default:false,org.eclipse.osee.framework.h2@default:default,org.eclipse.osee.framework.core.dsl.ui.integration@default:default,org.eclipse.osee.framework.ui.skynet.test@default:false,org.eclipse.osee.ote.message@default:default,org.eclipse.osee.framework.access.test@default:false,org.eclipse.osee.ote.message.test@default:false"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.ui.forms@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.pde.ui@default:default,org.eclipse.pde.launching@default:default,org.apache.commons.logging*1.1.1.v201005080502@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.emf.common@default:default,org.eclipse.team.svn.help@default:default,org.eclipse.xtext.util@default:default,org.eclipse.jsch.core@default:default,org.eclipse.xtext.logging@default:false,org.eclipse.emf.mwe2.runtime@default:default,org.eclipse.ui.editors@default:default,org.eclipse.core.variables@default:default,org.apache.lucene@default:default,org.eclipse.xtend@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.ui.views@default:default,org.apache.commons.el@default:default,org.eclipse.gef@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.jdt.junit@default:default,org.eclipse.compare.core@default:default,org.eclipse.nebula.widgets.xviewer@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.team.cvs.ui@default:default,javax.mail.glassfish@default:default,org.eclipse.emf.compare.match@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.equinox.frameworkadmin@default:default,org.mozilla.javascript@default:default,org.eclipse.update.core.win32@default:false,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.ui.intro@default:default,javax.servlet@default:default,com.ibm.icu@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.common@2:true,org.eclipse.team.ui@default:default,org.eclipse.swt@default:default,org.eclipse.emf.codegen.ecore@default:default,org.eclipse.emf.compare@default:default,org.apache.commons.lang@default:default,org.eclipse.birt.core@default:default,org.eclipse.core.net@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ui.win32@default:false,org.eclipse.equinox.launcher.win32.win32.x86@default:false,com.google.collect@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ui.ide@default:default,org.junit4@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.osgi@-1:true,org.eclipse.pde.junit.runtime@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.sdk@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.cvs@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.jsch.ui@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.core.databinding@default:default,org.eclipse.xtext@default:default,org.eclipse.xtext.generator@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.draw2d@default:default,org.polarion.eclipse.team.svn.connector@default:default,org.eclipse.help.ui@default:default,org.eclipse.jdt@default:default,org.eclipse.team.cvs.core@default:default,org.apache.commons.cli@default:default,javax.xml@default:default,org.eclipse.nebula.widgets.calendarcombo@default:default,org.eclipse.osgi.util@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.jdt.doc.user@default:default,org.eclipse.xtext.ui.shared@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.junit*3.8.2.v3_8_2_v20100427-1100@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.jdt.core@default:default,org.antlr.gen@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.zest.layouts@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.http.jetty@default:default,com.lowagie.text@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.ui.presentations.r21@default:default,org.eclipse.pde.build@default:default,org.eclipse.xtext.builder@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.core.databinding.beans@default:default,com.google.inject@default:default,org.eclipse.emf.compare.ui@default:default,org.apache.commons.net@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.ant.ui@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.update.configurator@3:true,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.ant.launching@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.emf.mwe2.launch@default:default,org.eclipse.emf.ecore.editor@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.xtend.typesystem.emf@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.core.externaltools@default:default,javax.activation@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.help@default:default,org.eclipse.team.svn.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.xtext.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ecf@default:default,org.apache.log4j@default:default,org.apache.jasper@default:default,org.eclipse.core.resources@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.jface@default:default,org.eclipse.update.core@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.help.base@default:default,org.eclipse.text@default:default,org.mortbay.jetty.server@default:default,org.eclipse.core.filesystem@default:default,org.aopalliance@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.eclipse.emf.compare.diff@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help.appserver@default:default,org.eclipse.debug.core@default:default,org.eclipse.update.scheduler@default:default,org.eclipse.compare@default:default,org.eclipse.emf.codegen@default:default,org.sat4j.pb@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.boot@default:default,org.eclipse.jface.text@default:default,org.eclipse.ant.core@default:default,org.apache.commons.codec@default:default,org.eclipse.emf.mwe2.language@default:default,org.sat4j.core@default:default,org.eclipse.ui.console@default:default,org.eclipse.jdt.doc.isv@default:default,org.eclipse.platform@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.xtext.xtend@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.core.expressions@default:default,org.eclipse.pde.runtime@default:default,org.eclipse.team.svn.ui@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.views.log@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.pde.core@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.ui.externaltools@default:default,org.eclipse.equinox.security@default:default,org.eclipse.xpand@default:default,de.itemis.xtext.antlr@default:default,org.eclipse.xtext.common.types@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.equinox.util@default:default,org.apache.xml.resolver@default:default,org.eclipse.help.webapp@default:default,org.eclipse.core.commands@default:default,org.eclipse.update.ui@default:default,org.eclipse.emf.mwe.core@default:default,org.eclipse.emf.common.ui@default:default,org.eclipse.team.svn@default:default,org.apache.xml.serializer@default:default,org.eclipse.pde@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.zest.core@default:default,org.eclipse.emf.mwe.utils@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.search@default:default,org.eclipse.rcp@default:default,javax.servlet.jsp@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.equinox.p2.publisher@default:default,org.h2@default:default,org.eclipse.equinox.launcher@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.apache.xerces@default:default,org.eclipse.ui.cheatsheets@default:default,org.apache.oro@default:default,org.eclipse.ui.net@default:default,org.eclipse.core.runtime@default:true,org.hamcrest.core@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.jdt.ui@default:default,org.apache.commons.httpclient@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.jdt.debug.ui@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ui.browser@default:default,com.jcraft.jsch@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.ui.ide.application@default:default,org.antlr.runtime@default:default,org.eclipse.birt.chart.engine@default:default,org.apache.ant@default:default,org.apache.lucene.analysis@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.emf.ecore.edit@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.osee.ats.test@default:false,org.eclipse.osee.framework.lifecycle.test@default:false,org.eclipse.osee.framework.skynet.core@default:default,org.eclipse.osee.framework.jdbcodbc@default:default,org.eclipse.osee.client.integration.tests@default:default,org.eclipse.osee.framework.core.client@default:default,org.eclipse.osee.framework.ui.skynet@default:default,org.eclipse.osee.framework.ui.plugin@default:default,org.eclipse.osee.framework.ui.service.control@default:default,org.eclipse.osee.ote.client@default:default,org.eclipse.osee.ote.ui@default:default,org.eclipse.osee.framework.core.dsl.ui@default:default,org.eclipse.osee.framework.core.model.test@default:false,org.eclipse.osee.framework.messaging@default:default,org.eclipse.osee.framework.messaging.event.res@default:default,org.eclipse.osee.framework.ui.jdk@default:default,org.eclipse.osee.framework.jdk.core.test@default:false,org.eclipse.osee.ote.messaging.dds@default:default,org.eclipse.osee.framework.messaging.event.skynet@default:default,org.eclipse.osee.ote.message.test@default:false,org.eclipse.osee.ats.config.demo@default:default,org.eclipse.osee.framework.postgresql@default:default,org.eclipse.osee.framework.ui.data.model.editor@default:default,org.eclipse.osee.framework.core.dsl.integration@default:default,org.eclipse.osee.framework.messaging.test@default:false,org.eclipse.osee.framework.plugin.core@default:default,org.eclipse.osee.framework.svn@default:default,org.eclipse.nebula.widgets.xviewer@default:default,org.eclipse.osee.framework.ui.workspacebundleloader@default:default,org.postgresql.driver@default:default,org.eclipse.osee.framework.jdk.core@default:default,org.eclipse.osee.framework.ui.skynet.test@default:false,org.eclipse.osee.framework.ui.ws@default:default,jms.libraries@default:default,org.eclipse.nebula.widgets.xviewer.tests@default:false,org.eclipse.osee.framework.templates@default:default,org.eclipse.osee.framework.core.dsl@default:default,org.eclipse.osee.define.test@default:false,org.eclipse.osee.framework.jini@default:default,org.eclipse.osee.framework.database.init@default:default,net.jini@default:default,org.eclipse.osee.ote.define@default:default,org.eclipse.osee.framework.access@default:default,org.eclipse.osee.framework.access.test@default:false,org.eclipse.osee.ote.core@default:default,org.eclipse.osee.framework.ui.admin@default:default,org.eclipse.osee.define@default:default,org.eclipse.osee.ote.ui.test.manager@default:default,org.eclipse.osee.ote.runtimeManager@default:default,org.eclipse.osee.coverage@default:default,org.eclipse.osee.framework.core.model@default:default,org.eclipse.osee.demo.db.connection@default:default,org.eclipse.osee.coverage.test@default:false,org.eclipse.osee.framework.ui.branch.graph@default:default,org.eclipse.osee.framework.logging@default:default,org.eclipse.osee.framework.core.message.test@default:false,org.eclipse.osee.ats.help.ui@default:default,org.eclipse.osee.ats@default:default,org.eclipse.osee.framework.core@default:default,org.eclipse.osee.framework.help.ui@default:default,jms.activemq.launch@default:default,org.eclipse.osee.framework.core.dsl.integration.test@default:false,org.eclipse.osee.framework.core.test@default:false,org.eclipse.osee.framework.ui.swt@default:default,org.eclipse.osee.framework.database.test@default:false,org.eclipse.osee.framework.database@default:default,org.eclipse.osee.framework.core.message@default:default,org.eclipse.osee.framework.skynet.core.test@default:false,org.eclipse.osee.framework.core.dsl.ui.integration@default:default,org.eclipse.osee.framework.core.dsl.edit@default:default,org.eclipse.osee.framework.ui.product@default:default,org.eclipse.osee.ote.message@default:default,org.eclipse.osee.ote.ui.markers@default:default,org.eclipse.osee.framework.lifecycle@default:default,org.eclipse.osee.framework.messaging.event.res.test@default:false,org.eclipse.osee.ote.ui.define@default:default,org.eclipse.osee.ote.connection.service@default:default,org.eclipse.osee.support.test.util@default:default,org.eclipse.osee.ote.client.msg@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java
index 61395cdee40..9e40f011aaa 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java
@@ -90,6 +90,7 @@ public final class CoreAttributeTypes extends NamedIdentity implements IAttribut
public static final IAttributeType WorkData = new CoreAttributeTypes("AAMFEbyhslOoQf3+hyAA", "osee.wi.Work Data");
public static final IAttributeType WorkDescription = new CoreAttributeTypes("AAMFEb57TkhPHyzOLDwA", "osee.wi.Work Description");
public static final IAttributeType WorkId = new CoreAttributeTypes("AAMFEb0hXw933Zrje2QA", "osee.wi.Work Id");
+ public static final IAttributeType WorkPageType = new CoreAttributeTypes("ATTKEn8ob0KafAl5vuAA", "osee.wi.Work Page Type");
public static final IAttributeType WorkPageName = new CoreAttributeTypes("AAMFEb+vCyCjKbzzHoQA", "osee.wi.Work Page Name");
public static final IAttributeType WorkParentId = new CoreAttributeTypes("AAMFEb8R5y9WcjD5hcwA", "osee.wi.Work Parent Id");
public static final IAttributeType WorkStartPage = new CoreAttributeTypes("AAMFEcDfggQLaAdLlpQA", "osee.wi.Start Page");
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java
index baf3bdf61ba..fd36b35677b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java
@@ -94,7 +94,6 @@ public final class RevisionChangeLoader {
/**
* Not Part of Change Report Acquires artifact, relation and attribute changes from a source branch since its
* creation.
- *
*/
private Collection<Change> getChanges(Branch sourceBranch, TransactionRecord transactionId, IProgressMonitor monitor, Artifact specificArtifact) throws OseeCoreException {
@SuppressWarnings("unused")
@@ -107,7 +106,9 @@ public final class RevisionChangeLoader {
Set<Integer> newAndDeletedArtifactIds = new HashSet<Integer>();
boolean historical = sourceBranch == null;
- monitor.beginTask("Find Changes", 100);
+ if (monitor != null) {
+ monitor.beginTask("Find Changes", 100);
+ }
ArtifactChangeAcquirer artifactChangeAcquirer =
new ArtifactChangeAcquirer(sourceBranch, transactionId, monitor, specificArtifact, artIds, changeBuilders,
@@ -124,7 +125,9 @@ public final class RevisionChangeLoader {
newAndDeletedArtifactIds);
changeBuilders = relationChangeAcquirer.acquireChanges();
- monitor.subTask("Loading Artifacts from the Database");
+ if (monitor != null) {
+ monitor.subTask("Loading Artifacts from the Database");
+ }
Branch branch = historical ? transactionId.getBranch() : sourceBranch;
if (historical) {
@@ -138,7 +141,9 @@ public final class RevisionChangeLoader {
changes.add(builder.build(branch));
}
- monitor.done();
+ if (monitor != null) {
+ monitor.done();
+ }
return changes;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java
index 3270abdef53..040fcdb9d81 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java
@@ -46,7 +46,9 @@ public class ArtifactChangeAcquirer extends ChangeAcquirer {
TransactionRecord fromTransactionId;
TransactionRecord toTransactionId;
- getMonitor().subTask("Gathering New or Deleted Artifacts");
+ if (getMonitor() != null) {
+ getMonitor().subTask("Gathering New or Deleted Artifacts");
+ }
IOseeStatement chStmt = ConnectionHandler.getStatement();
try {
@@ -86,7 +88,9 @@ public class ArtifactChangeAcquirer extends ChangeAcquirer {
artifactChangeBuilders.put(artId, artifactChangeBuilder);
}
- getMonitor().worked(25);
+ if (getMonitor() != null) {
+ getMonitor().worked(25);
+ }
} finally {
chStmt.close();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
index d993efee154..90f82d2b37b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
@@ -60,7 +60,9 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
boolean hasBranch = getSourceBranch() != null;
long time = System.currentTimeMillis();
try {
- getMonitor().subTask("Gathering Attribute Changes");
+ if (getMonitor() != null) {
+ getMonitor().subTask("Gathering Attribute Changes");
+ }
TransactionRecord fromTransactionId;
TransactionRecord toTransactionId;
boolean hasSpecificArtifact = getSpecificArtifact() != null;
@@ -154,8 +156,10 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
}
}
- monitor.worked(13);
- monitor.subTask("Gathering Was values");
+ if (getMonitor() != null) {
+ monitor.worked(13);
+ monitor.subTask("Gathering Was values");
+ }
} finally {
chStmt.close();
}
@@ -216,7 +220,9 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
ArtifactLoader.clearQuery(queryId);
chStmt.close();
}
- monitor.worked(12);
+ if (getMonitor() != null) {
+ monitor.worked(12);
+ }
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java
index 5f4e5564093..f779d2cc351 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java
@@ -44,7 +44,9 @@ public class RelationChangeAcquirer extends ChangeAcquirer {
TransactionRecord fromTransactionId;
TransactionRecord toTransactionId;
- getMonitor().subTask("Gathering Relation Changes");
+ if (getMonitor() != null) {
+ getMonitor().subTask("Gathering Relation Changes");
+ }
try {
boolean hasBranch = getSourceBranch() != null;
@@ -86,7 +88,9 @@ public class RelationChangeAcquirer extends ChangeAcquirer {
RelationTypeManager.getType(chStmt.getInt("rel_link_type_id")), !hasBranch));
}
}
- getMonitor().worked(25);
+ if (getMonitor() != null) {
+ getMonitor().worked(25);
+ }
} finally {
chStmt.close();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee b/plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee
index a0a1909e703..d6e2be2745d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee
+++ b/plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee
@@ -1148,6 +1148,7 @@ abstract artifactType "Work Item Definition" extends "Artifact" {
artifactType "Work Page Definition" extends "Work Item Definition" {
guid "AAMFDhzuyizN4qu7tXgA"
attribute "osee.wi.Work Page Name"
+ attribute "osee.wi.Work Page Type"
}
artifactType "Work Flow Definition" extends "Work Item Definition" {
@@ -1219,6 +1220,13 @@ attributeType "osee.wi.Transition" extends StringAttribute {
max unlimited
}
+attributeType "osee.wi.Work Page Type" extends StringAttribute {
+ guid "ATTKEn8ob0KafAl5vuAA"
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+}
+
attributeType "osee.wi.Start Page" extends StringAttribute {
guid "AAMFEcDfggQLaAdLlpQA"
dataProvider DefaultAttributeDataProvider
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
index 8fc8182f15f..d867341c3d4 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
@@ -119,6 +119,7 @@ Export-Package: org.eclipse.osee.framework.ui.skynet,
org.eclipse.osee.framework.ui.skynet.results.example,
org.eclipse.osee.framework.ui.skynet.results.html,
org.eclipse.osee.framework.ui.skynet.results.table,
+ org.eclipse.osee.framework.ui.skynet.results.table.xresults,
org.eclipse.osee.framework.ui.skynet.search,
org.eclipse.osee.framework.ui.skynet.search.filter,
org.eclipse.osee.framework.ui.skynet.search.ui,
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java
index 6d6fef8e9a4..289eba06d01 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java
@@ -20,6 +20,8 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerEditor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.type.AttributeType;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -179,8 +181,28 @@ public class AttributesComposite extends Composite {
}
tableViewer.setContentProvider(new AttributeContentProvider());
tableViewer.setLabelProvider(new AttributeLabelProvider());
+ tableViewer.setSorter(new AttributeNameSorter());
tableViewer.setInput(artifact);
}
+ public class AttributeNameSorter extends ViewerSorter {
+
+ public AttributeNameSorter() {
+ super();
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public int compare(Viewer viewer, Object o1, Object o2) {
+ if (o1 instanceof Attribute && o2 instanceof Attribute) {
+ return getComparator().compare(((Attribute<?>) o1).getAttributeType().getName(),
+ ((Attribute<?>) o2).getAttributeType().getName());
+ } else if (o1 instanceof String && o2 instanceof String) {
+ return getComparator().compare(o1, o2);
+ }
+ return super.compare(viewer, o1, o2);
+ }
+
+ }
private void createColumns() {
for (int index = 0; index < columnNames.length; index++) {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java
index b7e0ae23206..db3d181ae2e 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java
@@ -137,7 +137,7 @@ public class AttributeFormPart extends AbstractFormPart {
super.dispose();
}
- private void setLabelFonts(Control parent, Font font) {
+ public static void setLabelFonts(Control parent, Font font) {
if (parent instanceof Label) {
Label label = (Label) parent;
label.setFont(font);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java
index 813baadc31c..fb13318a9bb 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java
@@ -17,6 +17,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
+import org.eclipse.nebula.widgets.xviewer.XViewerFactory;
import org.eclipse.nebula.widgets.xviewer.XViewerTreeReport;
import org.eclipse.osee.framework.core.util.TableWriterAdaptor;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -26,6 +27,7 @@ import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
import org.eclipse.osee.framework.ui.skynet.results.table.xresults.ResultsXViewer;
import org.eclipse.osee.framework.ui.skynet.results.table.xresults.ResultsXViewerContentProvider;
+import org.eclipse.osee.framework.ui.skynet.results.table.xresults.ResultsXViewerFactory;
import org.eclipse.osee.framework.ui.skynet.results.table.xresults.ResultsXViewerLabelProvider;
import org.eclipse.osee.framework.ui.skynet.util.HtmlExportTable;
import org.eclipse.osee.framework.ui.swt.ALayout;
@@ -48,6 +50,7 @@ public class ResultsEditorTableTab implements IResultsEditorTableTab {
private List<XViewerColumn> columns;
private Collection<IResultsXViewerRow> rows;
private ResultsXViewer resultsXViewer;
+ private XViewerFactory xViewerFactory;
public ResultsEditorTableTab(String tabName) {
this(tabName, null, null);
@@ -59,6 +62,7 @@ public class ResultsEditorTableTab implements IResultsEditorTableTab {
this.tabName = tabName;
this.columns = columns;
this.rows = rows;
+ this.xViewerFactory = new ResultsXViewerFactory(columns);
}
public void addColumn(XViewerColumn xViewerColumn) {
@@ -87,11 +91,15 @@ public class ResultsEditorTableTab implements IResultsEditorTableTab {
@Override
public Composite createTab(Composite parent, ResultsEditor resultsEditor) {
Composite comp = ALayout.createCommonPageComposite(parent);
- ToolBar toolBar = resultsEditor.createToolBar(comp);
- addToolBarItems(toolBar);
+ comp.setLayoutData(new GridData(GridData.FILL_BOTH));
+ if (resultsEditor != null) {
+ ToolBar toolBar = resultsEditor.createToolBar(comp);
+ addToolBarItems(toolBar);
+ }
GridData gd = new GridData(GridData.FILL_BOTH);
- resultsXViewer = new ResultsXViewer(comp, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, getTableColumns());
+ resultsXViewer =
+ new ResultsXViewer(comp, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION, getTableColumns(), xViewerFactory);
resultsXViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
resultsXViewer.setContentProvider(new ResultsXViewerContentProvider());
resultsXViewer.setLabelProvider(new ResultsXViewerLabelProvider(resultsXViewer));
@@ -188,4 +196,12 @@ public class ResultsEditorTableTab implements IResultsEditorTableTab {
});
}
+
+ public ResultsXViewer getResultsXViewer() {
+ return resultsXViewer;
+ }
+
+ public void setxViewerFactory(XViewerFactory xViewerFactory) {
+ this.xViewerFactory = xViewerFactory;
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java
index 5e0eb38a5fb..8beecfa93ce 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.nebula.widgets.xviewer.XViewer;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
+import org.eclipse.nebula.widgets.xviewer.XViewerFactory;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
@@ -26,8 +27,8 @@ import org.eclipse.swt.widgets.TreeItem;
*/
public class ResultsXViewer extends XViewer {
- public ResultsXViewer(Composite parent, int style, List<XViewerColumn> xColumns) {
- super(parent, style, new ResultsXViewerFactory(xColumns));
+ public ResultsXViewer(Composite parent, int style, List<XViewerColumn> xColumns, XViewerFactory xViewerFactory) {
+ super(parent, style, xViewerFactory);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/IWorkPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/IWorkPage.java
new file mode 100644
index 00000000000..d93314ba9b0
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/IWorkPage.java
@@ -0,0 +1,22 @@
+/*
+ * Created on Nov 16, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.ui.skynet.widgets.workflow;
+
+public interface IWorkPage {
+
+ public WorkPageType getWorkPageType();
+
+ public String getPageName();
+
+ public boolean isCompletedPage();
+
+ public boolean isCancelledPage();
+
+ public boolean isWorkingPage();
+
+ public boolean isCompletedOrCancelledPage();
+
+}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java
index ef08a696149..8e039f4ab95 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkFlowDefinition.java
@@ -372,7 +372,7 @@ public class WorkFlowDefinition extends WorkItemWithChildrenDefinition {
// Move completed to the end if it exists
WorkPageDefinition completedPage = null;
for (WorkPageDefinition workPageDefinition : orderedPages) {
- if (workPageDefinition.isCompletePage()) {
+ if (workPageDefinition.isCompletedPage()) {
completedPage = workPageDefinition;
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPage.java
index 7271be85072..c3fe901ec1b 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPage.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPage.java
@@ -36,7 +36,7 @@ import org.w3c.dom.Element;
*
* @author Donald G. Dunne
*/
-public class WorkPage implements IDynamicWidgetLayoutListener {
+public class WorkPage implements IDynamicWidgetLayoutListener, IWorkPage {
protected DynamicXWidgetLayout dynamicXWidgetLayout;
protected final WorkPageDefinition workPageDefinition;
@@ -158,7 +158,7 @@ public class WorkPage implements IDynamicWidgetLayoutListener {
public String getHtml(String backgroundColor, String preHtml, String postHtml) throws OseeCoreException {
StringBuffer sb = new StringBuffer();
- sb.append(AHTML.startBorderTable(100, backgroundColor, getName()));
+ sb.append(AHTML.startBorderTable(100, backgroundColor, getPageName()));
if (preHtml != null) {
sb.append(preHtml);
}
@@ -223,10 +223,16 @@ public class WorkPage implements IDynamicWidgetLayoutListener {
dynamicXWidgetLayout.processLayoutDatas(element);
}
- public String getName() {
+ @Override
+ public String getPageName() {
return workPageDefinition.getPageName();
}
+ @Override
+ public WorkPageType getWorkPageType() {
+ return workPageDefinition.getWorkPageType();
+ }
+
public String getId() {
return workPageDefinition.id;
}
@@ -264,4 +270,24 @@ public class WorkPage implements IDynamicWidgetLayoutListener {
return super.hashCode();
}
+ @Override
+ public boolean isCompletedOrCancelledPage() {
+ return getWorkPageType().isCompletedOrCancelledPage();
+ }
+
+ @Override
+ public boolean isCompletedPage() {
+ return getWorkPageType().isCompletedPage();
+ }
+
+ @Override
+ public boolean isCancelledPage() {
+ return getWorkPageType().isCancelledPage();
+ }
+
+ @Override
+ public boolean isWorkingPage() {
+ return getWorkPageType().isWorkingPage();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java
index 35b74ef893e..5ff7dbd0da6 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageDefinition.java
@@ -11,7 +11,9 @@
package org.eclipse.osee.framework.ui.skynet.widgets.workflow;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -21,18 +23,21 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
/**
* @author Donald G. Dunne
*/
-public class WorkPageDefinition extends WorkItemWithChildrenDefinition {
+public class WorkPageDefinition extends WorkItemWithChildrenDefinition implements IWorkPage {
private String pageName;
+ private WorkPageType workPageType;
- public WorkPageDefinition(String pageName, String pageId, String parentId) {
- this(pageId, pageName, pageId, parentId);
+ public WorkPageDefinition(String pageName, String pageId, String parentId, WorkPageType workPageType) {
+ this(pageId, pageName, pageId, parentId, workPageType);
}
- public WorkPageDefinition(String itemName, String pageName, String pageId, String parentId) {
+ public WorkPageDefinition(String itemName, String pageName, String pageId, String parentId, WorkPageType workPageType) {
super(itemName, pageId, parentId);
this.pageName = pageName;
+ this.workPageType = workPageType;
}
+ private static final Set<String> notValidAttributeType = new HashSet<String>();
public WorkPageDefinition(Artifact artifact) throws OseeCoreException {
super(artifact, artifact.getName(), //
@@ -40,10 +45,30 @@ public class WorkPageDefinition extends WorkItemWithChildrenDefinition {
artifact.getSoleAttributeValue(CoreAttributeTypes.WorkId, (String) null), //
artifact.getSoleAttributeValue(CoreAttributeTypes.WorkParentId, (String) null)//
);
+
setType(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkType, (String) null));
loadWorkDataKeyValueMap(artifact);
setPageName(artifact.getSoleAttributeValue(CoreAttributeTypes.WorkPageName, (String) null));
+ if (artifact.isAttributeTypeValid(CoreAttributeTypes.WorkPageType)) {
+ setWorkPageType(WorkPageType.valueOf(artifact.getSoleAttributeValueAsString(CoreAttributeTypes.WorkPageType,
+ null)));
+ } else {
+ // display console error, but only once
+ if (!notValidAttributeType.contains(artifact.getArtifactTypeName())) {
+ notValidAttributeType.add(artifact.getArtifactTypeName());
+ System.err.println("WorkPageType not valid for " + artifact.getArtifactTypeName());
+ }
+ // TODO get rid of this once database configured for new types (or leave for backward compatibility?
+ if (getPageName().equals("Completed")) {
+ setWorkPageType(WorkPageType.Completed);
+ } else if (getPageName().equals("Cancelled")) {
+ setWorkPageType(WorkPageType.Cancelled);
+ } else {
+ setWorkPageType(WorkPageType.Working);
+ }
+ }
+
}
public boolean hasWorkRule(String ruleId) throws OseeCoreException {
@@ -68,6 +93,10 @@ public class WorkPageDefinition extends WorkItemWithChildrenDefinition {
// Only store start page if it's part of this definition
if (pageName != null) {
art.setSoleAttributeFromString(CoreAttributeTypes.WorkPageName, pageName);
+ System.err.println("remove this once types imported");
+ if (art.isAttributeTypeValid(CoreAttributeTypes.WorkPageType)) {
+ art.setSoleAttributeFromString(CoreAttributeTypes.WorkPageType, workPageType.name());
+ }
}
return art;
}
@@ -82,14 +111,6 @@ public class WorkPageDefinition extends WorkItemWithChildrenDefinition {
return wids;
}
- public boolean isCompletePage() {
- return getPageName().equals("Completed");
- }
-
- public boolean isCancelledPage() {
- return getPageName().equals("Cancelled");
- }
-
public boolean isInstanceof(String workPageDefinitionId) throws OseeCoreException {
return isInstanceofRecurse(this, workPageDefinitionId);
}
@@ -109,6 +130,7 @@ public class WorkPageDefinition extends WorkItemWithChildrenDefinition {
return CoreArtifactTypes.WorkPageDefinition;
}
+ @Override
public String getPageName() {
return pageName;
}
@@ -117,4 +139,33 @@ public class WorkPageDefinition extends WorkItemWithChildrenDefinition {
this.pageName = pageName;
}
+ @Override
+ public WorkPageType getWorkPageType() {
+ return workPageType;
+ }
+
+ public void setWorkPageType(WorkPageType workPageType) {
+ this.workPageType = workPageType;
+ }
+
+ @Override
+ public boolean isCompletedOrCancelledPage() {
+ return getWorkPageType().isCompletedOrCancelledPage();
+ }
+
+ @Override
+ public boolean isCompletedPage() {
+ return getWorkPageType().isCompletedPage();
+ }
+
+ @Override
+ public boolean isCancelledPage() {
+ return getWorkPageType().isCancelledPage();
+ }
+
+ @Override
+ public boolean isWorkingPage() {
+ return getWorkPageType().isWorkingPage();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageSection.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageSection.java
index a562d9609f2..2866cdc2e8c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageSection.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageSection.java
@@ -31,7 +31,7 @@ public class WorkPageSection extends SectionPart {
private Section createPage(Composite comp, WorkPage page, XFormToolkit toolkit) throws Exception {
Section section = toolkit.createSection(comp, ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
- section.setText(page.getName());
+ section.setText(page.getPageName());
section.setExpanded(true);
section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageType.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageType.java
new file mode 100644
index 00000000000..11d91e2d3f6
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/workflow/WorkPageType.java
@@ -0,0 +1,28 @@
+/*
+ * Created on Nov 15, 2010
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.ui.skynet.widgets.workflow;
+
+public enum WorkPageType {
+ Completed,
+ Cancelled,
+ Working;
+
+ public boolean isCompletedPage() {
+ return this == Completed;
+ }
+
+ public boolean isCompletedOrCancelledPage() {
+ return isCompletedPage() || isCancelledPage();
+ }
+
+ public boolean isCancelledPage() {
+ return this == Cancelled;
+ }
+
+ public boolean isWorkingPage() {
+ return this == Working;
+ }
+}
diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch
index ff823c23ec1..7f0f17400dd 100644
--- a/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch
+++ b/plugins/org.eclipse.osee.support.config/launchConfig/OSEE Demo product [localhost].launch
@@ -20,8 +20,8 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.osee.framework.ui.product.osee"/>
<booleanAttribute key="restart" value="false"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.jdt.debug@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.team.core@default:default,org.eclipse.zest.core@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.jdt.junit.core@default:default,org.apache.log4j@default:default,com.jcraft.jsch@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.emf.compare.ui@default:default,org.eclipse.update.core.win32@default:false,org.eclipse.core.runtime@default:true,org.apache.commons.el@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,