Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshawn.f.cook2012-04-19 16:49:35 +0000
committerRoberto E. Escobar2012-04-19 16:49:35 +0000
commit52475f13181346eb1d7d710a54a9d3757b3a3aeb (patch)
treec6e60aa9b6993a1ff1db9de133d04f214d931a84
parent5f1569e4f86b95f7aff22f0c89d0e01a9efc47fc (diff)
downloadorg.eclipse.osee-52475f13181346eb1d7d710a54a9d3757b3a3aeb.tar.gz
org.eclipse.osee-52475f13181346eb1d7d710a54a9d3757b3a3aeb.tar.xz
org.eclipse.osee-52475f13181346eb1d7d710a54a9d3757b3a3aeb.zip
bug[ats_Q5XWD]: TransitionStatusDialog.createCustomArea(Composite) check for weighted states
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TransitionStatusDialog.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TransitionStatusDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TransitionStatusDialog.java
index 32b205171ea..2509abc75d5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TransitionStatusDialog.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TransitionStatusDialog.java
@@ -13,6 +13,8 @@ package org.eclipse.osee.ats.util.widgets.dialog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osee.ats.core.type.AtsAttributeTypes;
+import org.eclipse.osee.ats.core.workflow.AbstractWorkflowArtifact;
import org.eclipse.osee.ats.core.workflow.transition.TransitionStatusData;
import org.eclipse.osee.ats.internal.Activator;
import org.eclipse.osee.framework.core.util.Result;
@@ -88,7 +90,13 @@ public class TransitionStatusDialog extends MessageDialog {
percent.set(defaultPercent);
percentSet = true;
} else if (data.getAwas().size() == 1) {
- int currentPercent = data.getAwas().iterator().next().getStateMgr().getPercentComplete();
+ int currentPercent = 0;
+ AbstractWorkflowArtifact awa = data.getAwas().iterator().next();
+ if (!awa.getWorkDefinition().isStateWeightingEnabled()) {
+ currentPercent = awa.getSoleAttributeValue(AtsAttributeTypes.PercentComplete, 0);
+ } else {
+ currentPercent = awa.getStateMgr().getPercentComplete();
+ }
data.setPercent(currentPercent);
percent.set(currentPercent);
percentSet = true;

Back to the top