Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-01-20 23:46:12 +0000
committerRyan D. Brooks2011-01-20 23:46:12 +0000
commite5592958e73052fe5b07de6f32835ec133afa36e (patch)
tree987653bb82df4bfa02785ad429d771ddc8eb3f14
parenta62cd90384e574d523bd91c45d92a6b47cb3b13a (diff)
downloadorg.eclipse.osee-e5592958e73052fe5b07de6f32835ec133afa36e.tar.gz
org.eclipse.osee-e5592958e73052fe5b07de6f32835ec133afa36e.tar.xz
org.eclipse.osee-e5592958e73052fe5b07de6f32835ec133afa36e.zip
feature: Add parameters to allow metrics logging to include user and date
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowManager.java14
1 files changed, 11 insertions, 3 deletions
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 831150c3970..30f7d0e0e63 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
@@ -17,6 +17,7 @@ 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;
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;
@@ -44,7 +45,7 @@ public class TeamWorkflowManager {
public Result transitionTo(TeamState toState, User user, boolean popup, SkynetTransaction transaction) throws OseeCoreException {
Date date = new Date();
if (teamArt.isInState(TeamState.Endorse)) {
- Result result = processEndorseState(popup, teamArt, user, date, transaction);
+ Result result = processEndorseState(popup, teamArt, getUserOrDefault(user), date, transaction);
if (result.isFalse()) {
return result;
}
@@ -53,7 +54,7 @@ public class TeamWorkflowManager {
return Result.TrueResult;
}
- Result result = processAnalyzeState(popup, teamArt, user, date, transaction);
+ Result result = processAnalyzeState(popup, teamArt, getUserOrDefault(user), date, transaction);
if (result.isFalse()) {
return result;
}
@@ -62,7 +63,7 @@ public class TeamWorkflowManager {
return Result.TrueResult;
}
- result = processAuthorizeState(popup, teamArt, user, date, transaction);
+ result = processAuthorizeState(popup, teamArt, getUserOrDefault(user), date, transaction);
if (result.isFalse()) {
return result;
}
@@ -79,6 +80,13 @@ public class TeamWorkflowManager {
}
+ private User getUserOrDefault(User user) throws OseeCoreException {
+ if (user == null) {
+ return UserManager.getUser();
+ }
+ return user;
+ }
+
private Result processAuthorizeState(boolean popup, TeamWorkFlowArtifact teamArt, User user, Date date, SkynetTransaction transaction) throws OseeCoreException {
Result result = setAuthorizeData(popup, 100, .2, user, date);
if (result.isFalse()) {

Back to the top