Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-08-02 20:26:40 +0000
committerRyan D. Brooks2016-08-31 16:18:01 +0000
commit1247492461b677ebcf7d41eeefa0ea92c7913f44 (patch)
tree68aa09071db194e471f65e5a0648119104913ab3 /plugins
parentfa9a747aedfe1b24dd620206e72532d8254ad4d1 (diff)
downloadorg.eclipse.osee-1247492461b677ebcf7d41eeefa0ea92c7913f44.tar.gz
org.eclipse.osee-1247492461b677ebcf7d41eeefa0ea92c7913f44.tar.xz
org.eclipse.osee-1247492461b677ebcf7d41eeefa0ea92c7913f44.zip
bug[ats_ATS305531]: ATS Work Item report failing on Peer Reviews
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java15
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java11
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java25
4 files changed, 36 insertions, 18 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java
index 8c263638f44..2ef8e56f0a9 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/ai/IAtsActionableItemService.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.api.ai;
import java.util.Collection;
import java.util.Set;
import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -36,4 +37,6 @@ public interface IAtsActionableItemService {
boolean hasActionableItems(IAtsObject atsObject);
+ Collection<IAtsTeamDefinition> getCorrespondingTeamDefinitions(IAtsObject atsObject);
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java
index ab6cbdf7610..ba50df3bef9 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.ats.core.client.review;
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
@@ -19,7 +18,6 @@ import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
-import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.workdef.IStateToken;
import org.eclipse.osee.ats.api.workdef.ReviewBlockType;
@@ -28,7 +26,6 @@ import org.eclipse.osee.ats.core.client.internal.Activator;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.core.client.workflow.AbstractWorkflowArtifact;
-import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -81,18 +78,6 @@ public abstract class AbstractReviewArtifact extends AbstractWorkflowArtifact im
return ReviewBlockType.valueOf(typeStr);
}
- public Set<IAtsTeamDefinition> getCorrespondingTeamDefinition() throws OseeCoreException {
- Set<IAtsTeamDefinition> teamDefs = new HashSet<>();
- if (getParentTeamWorkflow() != null) {
- teamDefs.add(getParentTeamWorkflow().getTeamDefinition());
- }
- if (AtsClientService.get().getWorkItemService().getActionableItemService().getActionableItems(this).size() > 0) {
- teamDefs.addAll(ActionableItems.getImpactedTeamDefs(
- AtsClientService.get().getWorkItemService().getActionableItemService().getActionableItems(this)));
- }
- return teamDefs;
- }
-
@Override
public AbstractWorkflowArtifact getParentAWA() throws OseeCoreException {
if (isStandAloneReview()) {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
index d3d1199f923..e1e47c90eaf 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java
@@ -19,9 +19,11 @@ import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.IAtsStoreService;
import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
+import org.eclipse.osee.ats.core.config.ActionableItems;
import org.eclipse.osee.ats.core.util.AtsObjects;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
import org.eclipse.osee.framework.core.util.Result;
@@ -111,4 +113,13 @@ public class ActionableItemManager implements IAtsActionableItemService {
return attrResolver.getAttributeCount(atsObject, AtsAttributeTypes.ActionableItem) > 0;
}
+ @Override
+ public Collection<IAtsTeamDefinition> getCorrespondingTeamDefinitions(IAtsObject atsObject) {
+ Set<IAtsTeamDefinition> teamDefs = new HashSet<>();
+ if (getActionableItems(atsObject).size() > 0) {
+ teamDefs.addAll(ActionableItems.getImpactedTeamDefs(getActionableItems(atsObject)));
+ }
+ return teamDefs;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java
index 909e448139e..449f43476c0 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.ev;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.logging.Level;
@@ -19,6 +20,7 @@ import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.column.PercentCompleteTotalColumn;
import org.eclipse.osee.ats.core.column.AtsAttributeValueColumnHandler;
import org.eclipse.osee.ats.core.util.AtsUtilCore;
@@ -99,14 +101,17 @@ public class WorkItemAndPackageReport extends XNavigateItemAction {
workPackageGuid, item.toStringWithId());
} else {
rows.add(new ResultsXViewerRow(new String[] {
+ workItemArt.getArtifactTypeName(),
workItemArt.getName(),
workItemArt.getSoleAttributeValue(AtsAttributeTypes.AtsId, ""),
- item.getParentTeamWorkflow().getTeamDefinition().getName(),
+ getTeamDefName(item),
item.getStateMgr().getCurrentStateName(),
AtsAttributeValueColumnHandler.getColumnText(item, AtsAttributeTypes.PercentComplete, false, false,
AtsClientService.get().getServices()),
PercentCompleteTotalColumn.getInstance().getColumnText(workItemArt, null, 0),
item.getStateMgr().getAssigneesStr(),
+ workItemArt.getSoleAttributeValue(AtsAttributeTypes.Points, ""),
+ workItemArt.getSoleAttributeValue(AtsAttributeTypes.PointsNumeric, ""),
data.getCountryName(),
data.getProgramName(),
data.getInsertionName(),
@@ -133,14 +138,28 @@ public class WorkItemAndPackageReport extends XNavigateItemAction {
tabs.add(new ResultsEditorTableTab(TITLE + " Report", columns, rows));
}
+ private String getTeamDefName(IAtsWorkItem item) {
+ if (item.getParentTeamWorkflow() != null) {
+ return item.getParentTeamWorkflow().getTeamDefinition().getName();
+ }
+ Collection<IAtsTeamDefinition> teamDefs =
+ AtsClientService.get().getWorkItemService().getActionableItemService().getCorrespondingTeamDefinitions(item);
+ if (!teamDefs.isEmpty()) {
+ return org.eclipse.osee.framework.jdk.core.util.Collections.toString(", ", teamDefs);
+ }
+ return "unknown";
+ }
+
private List<XViewerColumn> getColumns() {
List<XViewerColumn> columns = Arrays.asList( //
- WorkPackageReportColumns.getDefaultColumn("Title", 160),
+ WorkPackageReportColumns.getDefaultColumn("Type", 40), WorkPackageReportColumns.getDefaultColumn("Title", 160),
WorkPackageReportColumns.getDefaultColumn("ATS ID", 40), WorkPackageReportColumns.getDefaultColumn("Team", 40),
WorkPackageReportColumns.getDefaultColumn("State", 40),
WorkPackageReportColumns.getDefaultColumn("Workflow Percent Complete", 40),
WorkPackageReportColumns.getDefaultColumn("Total Percent Complete", 40),
- WorkPackageReportColumns.getDefaultColumn("Assignees", 40), WorkPackageReportColumns.countryColumn,
+ WorkPackageReportColumns.getDefaultColumn("Assignees", 40),
+ WorkPackageReportColumns.getDefaultColumn("Points", 40),
+ WorkPackageReportColumns.getDefaultColumn("Points Numeric", 40), WorkPackageReportColumns.countryColumn,
WorkPackageReportColumns.programColumn, WorkPackageReportColumns.insertionColumn,
WorkPackageReportColumns.insertionActivityColumn, WorkPackageReportColumns.workPackageNameColumn,
WorkPackageReportColumns.wpColorTeamColumn, WorkPackageReportColumns.wpProgramColumn,

Back to the top