Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2017-10-03 13:46:46 -0400
committerDavid Miller2017-10-03 19:29:58 -0400
commit3c53b7c2387c074dd01f15e045ac0019b67e1b68 (patch)
treef399684a9c9daad6c36765cbe4ac46e61af1d312
parent0648066cb07bf5f0e27703b383defcb517fd7886 (diff)
downloadorg.eclipse.osee-3c53b7c2387c074dd01f15e045ac0019b67e1b68.tar.gz
org.eclipse.osee-3c53b7c2387c074dd01f15e045ac0019b67e1b68.tar.xz
org.eclipse.osee-3c53b7c2387c074dd01f15e045ac0019b67e1b68.zip
bug[ats_TW2208]: Fix feature group setting and removal
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java17
2 files changed, 14 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java
index 007ec955f80..f704db940a5 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java
@@ -67,7 +67,7 @@ public class AgileItemWriter {
for (ArtifactToken awa : services.getArtifacts(newItem.getUuids())) {
for (ArtifactToken feature : services.getRelationResolver().getRelated(awa,
AtsRelationTypes.AgileFeatureToItem_FeatureGroup)) {
- changes.unrelate(feature, AtsRelationTypes.AgileFeatureToItem_FeatureGroup, awa);
+ changes.unrelate(feature, AtsRelationTypes.AgileFeatureToItem_AtsItem, awa);
}
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java
index 58de0f93eb8..337ffb00ae7 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java
@@ -137,7 +137,7 @@ public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IAtsXVi
new FilteredCheckboxTreeDialog("Select Feature Group(s)", "Select Feature Group(s)",
new ArrayTreeContentProvider(), new StringLabelProvider(), new StringNameComparator());
dialog.setInput(activeFeatureGroups);
- Collection<IAgileFeatureGroup> selectedFeatureGroups = getSelectedFeatureGroups(awas);
+ Collection<JaxAgileFeatureGroup> selectedFeatureGroups = getSelectedFeatureGroups(awas);
if (!selectedFeatureGroups.isEmpty()) {
dialog.setInitialSelections(selectedFeatureGroups);
}
@@ -171,21 +171,30 @@ public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IAtsXVi
return true;
}
- private static Collection<IAgileFeatureGroup> getSelectedFeatureGroups(Collection<? extends AbstractWorkflowArtifact> awas) {
- List<IAgileFeatureGroup> selected = new LinkedList<>();
+ private static Collection<JaxAgileFeatureGroup> getSelectedFeatureGroups(Collection<? extends AbstractWorkflowArtifact> awas) {
+ List<JaxAgileFeatureGroup> selected = new LinkedList<>();
if (awas.size() == 1) {
for (Artifact featureArt : awas.iterator().next().getRelatedArtifacts(
AtsRelationTypes.AgileFeatureToItem_FeatureGroup)) {
IAgileFeatureGroup featureGroup =
AtsClientService.get().getConfigItemFactory().getAgileFeatureGroup(featureArt);
if (featureGroup.isActive()) {
- selected.add(featureGroup);
+ selected.add(createJaxAgileFeatureGroupFromAgileFeatureGroup(featureGroup));
}
}
}
return selected;
}
+ private static JaxAgileFeatureGroup createJaxAgileFeatureGroupFromAgileFeatureGroup(IAgileFeatureGroup group) {
+ JaxAgileFeatureGroup newGroup = new JaxAgileFeatureGroup();
+ newGroup.setName(group.getName());
+ newGroup.setUuid(group.getId());
+ newGroup.setActive(group.isActive());
+ newGroup.setTeamUuid(group.getTeamUuid());
+ return newGroup;
+ }
+
@Override
public Long getKey(Object obj) {
Long result = 0L;

Back to the top