Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-09-06 12:32:15 -0400
committerAngel Avila2016-10-04 21:35:14 -0400
commit067a4273a4e824b02d6761a9c41b057f40b09d77 (patch)
treed5006dcea8bd7105ae461f485d89ac88e350d9aa
parent3a3a3e6aa0def99641c87125f0cbeeb7cb145bae (diff)
downloadorg.eclipse.osee-067a4273a4e824b02d6761a9c41b057f40b09d77.tar.gz
org.eclipse.osee-067a4273a4e824b02d6761a9c41b057f40b09d77.tar.xz
org.eclipse.osee-067a4273a4e824b02d6761a9c41b057f40b09d77.zip
feature[ats_ATS315180]: Improve Agile to provide sprint burndown rest call
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java17
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java8
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsRelationResolverServiceTest.java18
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java13
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AgileFeatureGroupColum.java46
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AgileTeamPointsColumn.java60
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnId.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnToken.java16
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/CompletedCancelledDateColumn.java41
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/SprintOrderColumn.java52
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java20
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/support/DefaultAgileCustomization.json191
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java64
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java2
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java13
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/world/WorldResource.java21
18 files changed, 560 insertions, 37 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java
index ee247a40ecf..02c88615d3a 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.api.agile;
+import java.util.Collection;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
@@ -21,6 +22,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import org.eclipse.osee.ats.api.IAtsWorkItem;
/**
* @author Donald G. Dunne
@@ -71,6 +73,21 @@ public interface AgileEndpointApi {
@Produces(MediaType.TEXT_HTML)
public Response getSprintSummary(@PathParam("teamUuid") long teamUuid, @PathParam("sprintUuid") long sprintUuid);
+ @GET
+ @Path("team/{teamUuid}/sprint/{sprintUuid}/world")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Collection<IAtsWorkItem> getSprintItems(@PathParam("teamUuid") long teamUuid, @PathParam("sprintUuid") long sprintUuid);
+
+ @GET
+ @Path("team/{teamUuid}/sprint/{sprintUuid}/world/ui")
+ @Produces(MediaType.TEXT_HTML)
+ public Response getSprintItemsUI(@PathParam("teamUuid") long teamUuid, @PathParam("sprintUuid") long sprintUuid);
+
+ @GET
+ @Path("team/{teamUuid}/sprint/{sprintUuid}/world/ui/{customizeGuid}")
+ @Produces(MediaType.TEXT_HTML)
+ public Response getSprintItemsUICustomized(@PathParam("teamUuid") long teamUuid, @PathParam("sprintUuid") long sprintUuid, @PathParam("customizeGuid") String customizeGuid);
+
@POST
@Path("team")
@Consumes(MediaType.APPLICATION_JSON)
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java
index 6b9b1a35997..1babeb442d0 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java
@@ -138,7 +138,7 @@ public final class AtsAttributeTypes {
public static final IAttributeType WorkPackageProgram = createType(0x1000000000000381L, "Work Package Program");
public static final IAttributeType WorkPackageType = createType(0x100000000000081L, "Work Package Type");
public static final IAttributeType ActivityId = createType(0x1000000000000382L, "Activity ID");
- public static final IAttributeType UnplannedWork = createType(0x219973F5F43E2BE5L, "Unplanned Work");
+ public static final IAttributeType UnPlannedWork = createType(0x219973F5F43E2BE5L, "Unplanned Work");
public static final IAttributeType ActivityName = createType(0x1000000000000383L, "Activity Name");
public static final IAttributeType WorkPackageGuid = createType(0x1000000000000384L, "Work Package Guid", "Work Package for this Team Workflow, Review, Task or Goal");
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
index def25072634..88fb3e0509b 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/IRelationResolver.java
@@ -34,16 +34,18 @@ public interface IRelationResolver {
boolean areRelated(IAtsObject atsObject1, IRelationTypeSide relationType, IAtsObject atsObject2);
- ArtifactId getRelatedOrNull(ArtifactId artifact, IRelationTypeSide relationType);
+ ArtifactToken getRelatedOrNull(ArtifactId artifact, IRelationTypeSide relationType);
- ArtifactId getRelatedOrNull(IAtsObject atsObject, IRelationTypeSide relationType);
+ ArtifactToken getRelatedOrNull(IAtsObject atsObject, IRelationTypeSide relationType);
<T> T getRelatedOrNull(IAtsObject atsObject, IRelationTypeSide relationType, Class<T> clazz);
int getRelatedCount(IAtsWorkItem workItem, IRelationTypeSide relationType);
- List<ArtifactId> getRelatedArtifacts(IAtsWorkItem workItem, IRelationTypeSide relationTypeSide);
+ List<ArtifactToken> getRelatedArtifacts(IAtsWorkItem workItem, IRelationTypeSide relationTypeSide);
Collection<ArtifactToken> getRelated(IAtsObject atsObject, IRelationTypeSide relationTypeSide);
+ Collection<ArtifactToken> getRelatedArtifacts(ArtifactId artifact, IRelationTypeSide relationTypeSide);
+
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsRelationResolverServiceTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsRelationResolverServiceTest.java
index 92ff5c72b90..2867d56da52 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsRelationResolverServiceTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/AtsRelationResolverServiceTest.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.client.integration.tests.ats.workflow;
import java.util.Collection;
import org.eclipse.osee.ats.api.IAtsServices;
+import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.data.AtsArtifactToken;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.workdef.IRelationResolver;
@@ -22,6 +23,7 @@ import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
import org.eclipse.osee.ats.core.client.team.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.junit.Assert;
@@ -55,8 +57,8 @@ public class AtsRelationResolverServiceTest {
@Test
public void testGetRelatedIAtsObjectIRelationTypeSideClassOfT() {
- Assert.assertEquals(8,
- relationResolver.getRelatedArtifacts(sawCodeCommittedWf, AtsRelationTypes.TeamWfToTask_Task).size());
+ Assert.assertEquals(8, relationResolver.getRelatedArtifacts((ArtifactId) sawCodeCommittedWf,
+ AtsRelationTypes.TeamWfToTask_Task).size());
}
@Test
@@ -72,8 +74,8 @@ public class AtsRelationResolverServiceTest {
@Test
public void testAreRelatedIAtsObjectIRelationTypeSideIAtsObject() {
- Collection<ArtifactId> related =
- relationResolver.getRelatedArtifacts(sawCodeCommittedWf, AtsRelationTypes.TeamWfToTask_Task);
+ Collection<ArtifactToken> related =
+ relationResolver.getRelatedArtifacts((IAtsWorkItem) sawCodeCommittedWf, AtsRelationTypes.TeamWfToTask_Task);
ArtifactId firstTask = related.iterator().next();
Assert.assertTrue(relationResolver.areRelated(sawCodeCommittedWf, AtsRelationTypes.TeamWfToTask_Task, firstTask));
@@ -81,8 +83,8 @@ public class AtsRelationResolverServiceTest {
relationResolver.areRelated(firstTask, AtsRelationTypes.TeamWfToTask_TeamWf, sawCodeCommittedWf));
// get task from un-related workflow
- Collection<ArtifactId> unRelated =
- relationResolver.getRelatedArtifacts(sawCodeUnCommittedWf, AtsRelationTypes.TeamWfToTask_Task);
+ Collection<ArtifactToken> unRelated =
+ relationResolver.getRelatedArtifacts((IAtsWorkItem) sawCodeUnCommittedWf, AtsRelationTypes.TeamWfToTask_Task);
ArtifactId firstUnRelatedTask = unRelated.iterator().next();
Assert.assertFalse(
@@ -105,8 +107,8 @@ public class AtsRelationResolverServiceTest {
@Test
public void testGetRelatedOrNullIAtsObjectIRelationTypeSideClassOfT() {
- Collection<ArtifactId> related =
- relationResolver.getRelatedArtifacts(sawCodeCommittedWf, AtsRelationTypes.TeamWfToTask_Task);
+ Collection<ArtifactToken> related =
+ relationResolver.getRelatedArtifacts((IAtsWorkItem) sawCodeCommittedWf, AtsRelationTypes.TeamWfToTask_Task);
ArtifactId firstTaskArt = related.iterator().next();
IAtsTask firstTask = services.getWorkItemFactory().getTask(firstTaskArt);
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
index b11b59e5dec..96824dfc9d9 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java
@@ -118,8 +118,8 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public ArtifactId getRelatedOrNull(ArtifactId artifact, IRelationTypeSide relationType) {
- ArtifactId related = null;
+ public ArtifactToken getRelatedOrNull(ArtifactId artifact, IRelationTypeSide relationType) {
+ ArtifactToken related = null;
Artifact art = getArtifact(artifact);
if (art != null) {
try {
@@ -163,7 +163,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public ArtifactId getRelatedOrNull(IAtsObject atsObject, IRelationTypeSide relationSide) {
+ public ArtifactToken getRelatedOrNull(IAtsObject atsObject, IRelationTypeSide relationSide) {
Artifact art = getArtifact(atsObject);
if (art != null) {
return art.getRelatedArtifactOrNull(relationSide);
@@ -172,7 +172,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public List<ArtifactId> getRelatedArtifacts(IAtsWorkItem workItem, IRelationTypeSide relationTypeSide) {
+ public List<ArtifactToken> getRelatedArtifacts(IAtsWorkItem workItem, IRelationTypeSide relationTypeSide) {
Artifact artifact = getArtifact(workItem);
return Collections.castAll(getRelated(artifact, relationTypeSide));
}
@@ -182,4 +182,9 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
return getRelated(atsObject.getStoreObject(), relationTypeSide);
}
+ @Override
+ public Collection<ArtifactToken> getRelatedArtifacts(ArtifactId artifact, IRelationTypeSide relationTypeSide) {
+ return getRelated(artifact, relationTypeSide);
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
index bbfe1376aa1..397cd60bd05 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/config/WorkPackageUtilityTest.java
@@ -27,6 +27,7 @@ import org.eclipse.osee.ats.api.workflow.IAtsGoal;
import org.eclipse.osee.ats.api.workflow.IAtsTask;
import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.junit.Before;
@@ -51,7 +52,7 @@ public class WorkPackageUtilityTest {
@Mock private IAttributeResolver attributeResolver;
@Mock private IRelationResolver relationResolver;
- @Mock private ArtifactId activityArt;
+ @Mock private ArtifactToken activityArt;
@Mock private IAtsInsertionActivity activity;
@Mock private IAtsInsertion insertion;
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AgileFeatureGroupColum.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AgileFeatureGroupColum.java
new file mode 100644
index 00000000000..ec0fad16745
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AgileFeatureGroupColum.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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.core.column;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.IAtsServices;
+import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.jdk.core.util.Collections;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class AgileFeatureGroupColum extends AbstractServicesColumn {
+
+ public AgileFeatureGroupColum(IAtsServices services) {
+ super(services);
+ }
+
+ @Override
+ public String getText(IAtsObject atsObject) throws Exception {
+ String result = "";
+ if (atsObject instanceof IAtsWorkItem) {
+ IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
+ Set<String> groups = new HashSet<>();
+ for (ArtifactToken featureGroup : services.getRelationResolver().getRelated(workItem,
+ AtsRelationTypes.AgileFeatureToItem_FeatureGroup)) {
+ groups.add(featureGroup.getName());
+ }
+ result = Collections.toString(", ", groups);
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AgileTeamPointsColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AgileTeamPointsColumn.java
new file mode 100644
index 00000000000..9939f74734e
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AgileTeamPointsColumn.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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.core.column;
+
+import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.IAtsServices;
+import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.IAttributeType;
+import org.eclipse.osee.framework.jdk.core.util.Conditions;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
+
+/**
+ * Display Points as either "ats.Points" or "ats.Points Numeric" as configured on Agile Team artifact
+ *
+ * @author Donald G. Dunne
+ */
+public class AgileTeamPointsColumn extends AbstractServicesColumn {
+
+ public AgileTeamPointsColumn(IAtsServices services) {
+ super(services);
+ }
+
+ @Override
+ public String getText(IAtsObject atsObject) throws Exception {
+ String result = "";
+ if (atsObject instanceof IAtsWorkItem) {
+ ArtifactToken sprintArt =
+ services.getRelationResolver().getRelatedOrNull(atsObject, AtsRelationTypes.AgileSprintToItem_Sprint);
+ Conditions.assertNotNull(sprintArt, "Sprint not found for item %s", atsObject.toStringWithId());
+ if (sprintArt != null) {
+ ArtifactToken agileTeamArt =
+ services.getRelationResolver().getRelatedOrNull(sprintArt, AtsRelationTypes.AgileTeamToSprint_AgileTeam);
+ Conditions.assertNotNull(agileTeamArt, "Agile Team not found for Stpring %s", sprintArt.toStringWithId());
+ IAttributeType pointsAttrType = AtsAttributeTypes.Points;
+ String pointsAttrTypeName = services.getAttributeResolver().getSoleAttributeValue(agileTeamArt,
+ AtsAttributeTypes.PointsAttributeType, "");
+ if (Strings.isValid(pointsAttrTypeName)) {
+ IAttributeType type = services.getStoreService().getAttributeType(pointsAttrTypeName);
+ if (type != null) {
+ pointsAttrType = type;
+ }
+ }
+ result = services.getAttributeResolver().getSoleAttributeValue(atsObject, pointsAttrType, "");
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnId.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnId.java
index cafadb5ec1c..e5927f8a7af 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnId.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnId.java
@@ -19,10 +19,13 @@ public enum AtsColumnId implements IAtsColumnId {
ActionableItem("ats.column.actionableItems"),
ActivityId("ats.column.activityId"),
+ AgileTeamPoints("ats.agileTeam.Points"),
Assignees("ats.column.assignees"),
AtsId("ats.id"),
- ChangeType("ats.Change Type"),
+ ChangeType("ats.column.changetype"),
CreatedDate("ats.column.createdDate"),
+ CompletedCancelledDate("ats.column.cmpCnclDate"),
+ AgileFeatureGroup("ats.column.agileFeatureGroup"),
Insertion("ats.column.insertion"),
InsertionActivity("ats.column.insertionActivity"),
LegacyPcrId("ats.column.legacyPcr"),
@@ -30,13 +33,16 @@ public enum AtsColumnId implements IAtsColumnId {
Notes("ats.column.notes"),
PercentCompleteWorkflow("ats.column.workflowPercentComplete"),
PercentCompleteTasks("ats.column.taskPercentComplete"),
- Priority("ats.column.Priority"),
+ Points("ats.column.points"),
+ Priority("ats.column.priority"),
State("ats.column.state"),
+ SprintOrder("ats.column.sprintOrder"),
Team("ats.column.team"),
TargetedVersion("ats.column.versionTarget"),
Title("framework.artifact.name.Title"),
Type("ats.column.type"),
Uuid("framework.uuid"),
+ UnPlannedWork("ats.Unplanned Work"),
WorkPackageName("ats.column.workPackageName"),
WorkPackageId("ats.column.workPackageId"),
WorkPackageType("ats.column.workPackageType"),
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnToken.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnToken.java
index 5444bc55220..ba2c7b2cd60 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnToken.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AtsColumnToken.java
@@ -50,6 +50,18 @@ public class AtsColumnToken {
public static AtsColumnIdValueColumn InsertionColumn = new AtsColumnIdValueColumn(AtsColumnId.Insertion, "Insertion",
80, ColumnAlign.Left.name(), false, ColumnType.String, false,
"Insertion specified by related Work Package. (I) if inherited from parent.", true, true);
+ public static AtsColumnIdValueColumn SprintOrderColumn = new AtsColumnIdValueColumn(AtsColumnId.SprintOrder,
+ "Sprint order", 45, ColumnAlign.Left.name(), false, ColumnType.Integer, true,
+ "Order of item within displayed sprint. Editing this field changes order.", false, false);
+ public static AtsColumnIdValueColumn AgileTeamPointsColumn = new AtsColumnIdValueColumn(AtsColumnId.AgileTeamPoints,
+ "Points", 40, ColumnAlign.Left.name(), false, ColumnType.Integer, false,
+ "Points as defined by AgileTeam configuration. Either Points or Points Numeric", false, false);
+ public static AtsColumnIdValueColumn AgileFeatureGroupColumn =
+ new AtsColumnIdValueColumn(AtsColumnId.AgileFeatureGroup, "Feature Group", 110, ColumnAlign.Left.name(), false,
+ ColumnType.String, false, "Agile Feature Group for this Item", false, false);
+ public static AtsColumnIdValueColumn CompletedCancelledDateColumn =
+ new AtsColumnIdValueColumn(AtsColumnId.CompletedCancelledDate, "Completed or Cancelled Date", 80,
+ ColumnAlign.Left.name(), false, ColumnType.Date, false, "Date action to completed or cancelled", false, false);
// AttributeValue columns
public static AtsAttributeValueColumn NotesColumn = new AtsAttributeValueColumn(AtsAttributeTypes.SmaNote,
@@ -57,6 +69,10 @@ public class AtsColumnToken {
public static AtsAttributeValueColumn ChangeTypeColumn = new AtsAttributeValueColumn(AtsAttributeTypes.ChangeType,
AtsColumnId.ChangeType.getId(), AtsAttributeTypes.ChangeType.getUnqualifiedName(), 22, ColumnAlign.Center.name(),
true, ColumnType.String, true, "", true, true);
+ public static AtsAttributeValueColumn UnPlannedWorkColumn =
+ new AtsAttributeValueColumn(AtsAttributeTypes.UnPlannedWork, AtsColumnId.UnPlannedWork.getId(),
+ AtsAttributeTypes.UnPlannedWork.getUnqualifiedName(), 20, ColumnAlign.Left.name(), false, ColumnType.Boolean,
+ true, "", false, false);
public static AtsAttributeValueColumn PriorityColumn = new AtsAttributeValueColumn(AtsAttributeTypes.PriorityType,
AtsColumnId.Priority.getId(), AtsAttributeTypes.PriorityType.getUnqualifiedName(), 20, ColumnAlign.Left.name(),
true, ColumnType.String, true, "", true, false);
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/CompletedCancelledDateColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/CompletedCancelledDateColumn.java
new file mode 100644
index 00000000000..a0ea5e8d35f
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/CompletedCancelledDateColumn.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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.core.column;
+
+import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.IAtsServices;
+import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.framework.jdk.core.util.DateUtil;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class CompletedCancelledDateColumn extends AbstractServicesColumn {
+
+ public CompletedCancelledDateColumn(IAtsServices services) {
+ super(services);
+ }
+
+ @Override
+ public String getText(IAtsObject atsObject) throws Exception {
+ String result = "";
+ if (atsObject instanceof IAtsWorkItem) {
+ IAtsWorkItem workItem = (IAtsWorkItem) atsObject;
+ if (workItem.isCompleted()) {
+ result = DateUtil.getMMDDYYHHMM(workItem.getCompletedDate());
+ } else {
+ result = DateUtil.getMMDDYYHHMM(workItem.getCancelledDate());
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/SprintOrderColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/SprintOrderColumn.java
new file mode 100644
index 00000000000..016a375c918
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/SprintOrderColumn.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2016 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.core.column;
+
+import java.util.Collection;
+import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.IAtsServices;
+import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.data.ArtifactToken;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class SprintOrderColumn extends AbstractServicesColumn {
+
+ public SprintOrderColumn(IAtsServices services) {
+ super(services);
+ }
+
+ @Override
+ public String getText(IAtsObject atsObject) throws Exception {
+ String result = "";
+ if (atsObject instanceof IAtsWorkItem) {
+ ArtifactId sprintArt =
+ services.getRelationResolver().getRelatedOrNull(atsObject, AtsRelationTypes.AgileSprintToItem_Sprint);
+ if (sprintArt != null) {
+ Collection<ArtifactToken> items = services.getRelationResolver().getRelatedArtifacts(sprintArt,
+ AtsRelationTypes.AgileSprintToItem_AtsItem);
+ int x = 1;
+ for (ArtifactId item : items) {
+ if (item.equals(atsObject.getStoreObject())) {
+ result = String.valueOf(x);
+ break;
+ }
+ x++;
+ }
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java
index 0daad40edb5..62b43432634 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java
@@ -20,18 +20,22 @@ import org.eclipse.osee.ats.api.column.IAtsColumnService;
import org.eclipse.osee.ats.api.config.AtsAttributeValueColumn;
import org.eclipse.osee.ats.api.config.AtsConfigurations;
import org.eclipse.osee.ats.core.column.ActionableItemsColumn;
+import org.eclipse.osee.ats.core.column.AgileFeatureGroupColum;
+import org.eclipse.osee.ats.core.column.AgileTeamPointsColumn;
import org.eclipse.osee.ats.core.column.AssigneeColumn;
import org.eclipse.osee.ats.core.column.AtsAttributeValueColumnHandler;
import org.eclipse.osee.ats.core.column.AtsColumnId;
import org.eclipse.osee.ats.core.column.AtsColumnToken;
import org.eclipse.osee.ats.core.column.AtsIdColumn;
import org.eclipse.osee.ats.core.column.AttributeColumn;
+import org.eclipse.osee.ats.core.column.CompletedCancelledDateColumn;
import org.eclipse.osee.ats.core.column.CreatedDateColumn;
import org.eclipse.osee.ats.core.column.IAtsColumnProvider;
import org.eclipse.osee.ats.core.column.ImplementerColumn;
import org.eclipse.osee.ats.core.column.InsertionActivityColumn;
import org.eclipse.osee.ats.core.column.InsertionColumn;
import org.eclipse.osee.ats.core.column.PercentCompleteTasksColumn;
+import org.eclipse.osee.ats.core.column.SprintOrderColumn;
import org.eclipse.osee.ats.core.column.StateColumn;
import org.eclipse.osee.ats.core.column.TargetedVersionColumn;
import org.eclipse.osee.ats.core.column.TeamColumn;
@@ -129,6 +133,16 @@ public class AtsColumnService implements IAtsColumnService {
column = new InsertionActivityColumn(services);
} else if (id.equals(AtsColumnId.TargetedVersion.getId())) {
column = new TargetedVersionColumn(services);
+ } else if (id.equals(AtsColumnId.UnPlannedWork.getId())) {
+ column = new AtsAttributeValueColumnHandler(AtsColumnToken.UnPlannedWorkColumn, services);
+ } else if (id.equals(AtsColumnId.SprintOrder.getId())) {
+ column = new SprintOrderColumn(services);
+ } else if (id.equals(AtsColumnId.AgileTeamPoints.getId())) {
+ column = new AgileTeamPointsColumn(services);
+ } else if (id.equals(AtsColumnId.CompletedCancelledDate.getId())) {
+ column = new CompletedCancelledDateColumn(services);
+ } else if (id.equals(AtsColumnId.AgileFeatureGroup.getId())) {
+ column = new AgileFeatureGroupColum(services);
}
}
// Add columns provided through OSGI services
@@ -148,6 +162,12 @@ public class AtsColumnService implements IAtsColumnService {
column = new AttributeColumn(services, attrType);
}
}
+ if (id.startsWith("ats.")) {
+ IAttributeType attrType = services.getStoreService().getAttributeType(id);
+ if (attrType != null) {
+ column = new AttributeColumn(services, attrType);
+ }
+ }
}
// Add to cache even if not found so don't need to look again
add(id, column);
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/support/DefaultAgileCustomization.json b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/support/DefaultAgileCustomization.json
new file mode 100644
index 00000000000..19ea81d61bd
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/support/DefaultAgileCustomization.json
@@ -0,0 +1,191 @@
+{
+ "guid":"64dgre5qv203d19eulckd4",
+ "name":"Agile Default",
+ "nameSpace":"org.eclipse.osee.ats.SprintXViewer",
+ "personal":false,
+ "sortingData":{
+ "sortingIds":[
+ "ats.column.sprintOrder"
+ ]
+ },
+ "filterData":{
+ "filterText":"",
+ "regularExpression":false
+ },
+ "columnFilterData":{
+ "colIds":[
+ ]
+ },
+ "columnData":{
+ "columns":[
+ {
+ "id":"ats.column.sprintOrder",
+ "name":"Sprint Order",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":88,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.agileTeam.Points",
+ "name":"Points",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":40,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"framework.artifact.name.Title",
+ "name":"Title",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":399,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.column.state",
+ "name":"State",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":76,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.column.Priority",
+ "name":"Priority",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":20,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.Change Type",
+ "name":"Change Type",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":85,
+ "align":"Center",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.column.assignees",
+ "name":"Assignees",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":100,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.column.versionTarget",
+ "name":"Targeted Version",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":50,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.Unplanned Work",
+ "name":"Unplanned Work",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":20,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.column.agileFeatureGroup",
+ "name":"Feature Group",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":110,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.column.notes",
+ "name":"Notes",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":134,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.column.createdDate",
+ "name":"Created Date",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":82,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ },
+ {
+ "id":"ats.column.cmpCnclDate",
+ "name":"Completed or Cancelled Date",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":80,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"Date",
+ "toolTip":""
+ },
+ {
+ "id":"ats.id",
+ "name":"AtsId",
+ "description":null,
+ "multiColumnEditable":false,
+ "width":50,
+ "align":"Left",
+ "sortForward":true,
+ "show":true,
+ "sortDataType":"String",
+ "toolTip":""
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java
index 8456684b085..4369f948078 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java
@@ -11,8 +11,10 @@
package org.eclipse.osee.ats.rest.internal.agile;
import java.net.URI;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import javax.ws.rs.core.Context;
@@ -20,6 +22,9 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
+import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.agile.AgileEndpointApi;
import org.eclipse.osee.ats.api.agile.AgileItem;
import org.eclipse.osee.ats.api.agile.AgileUtil;
@@ -40,11 +45,14 @@ import org.eclipse.osee.ats.api.agile.JaxNewAgileTeam;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.rest.IAtsServer;
+import org.eclipse.osee.ats.rest.internal.util.RestUtil;
+import org.eclipse.osee.ats.rest.internal.world.WorldResource;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.jdk.core.type.ClassBasedResourceToken;
import org.eclipse.osee.framework.jdk.core.type.IResourceRegistry;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Collections;
+import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.GUID;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -62,6 +70,7 @@ public class AgileEndpointImpl implements AgileEndpointApi {
private UriInfo uriInfo;
private final IAtsServer atsServer;
private final IResourceRegistry resourceRegistry;
+ private static ObjectMapper mapper;
public AgileEndpointImpl(IAtsServer atsServer, IResourceRegistry resourceRegistry) {
this.atsServer = atsServer;
@@ -432,4 +441,59 @@ public class AgileEndpointImpl implements AgileEndpointApi {
return Response.created(location).entity(item).build();
}
+ /********************************
+ ** Sprint Reporting
+ ***********************************/
+ @Override
+ public Collection<IAtsWorkItem> getSprintItems(long teamUuid, long sprintUuid) {
+ ArtifactReadable sprintArt = atsServer.getArtifact(sprintUuid);
+ return atsServer.getWorkItemFactory().getWorkItems(
+ sprintArt.getRelated(AtsRelationTypes.AgileSprintToItem_AtsItem).getList());
+ }
+
+ @Override
+ public Response getSprintItemsUI(long teamUuid, long sprintUuid) {
+ ArtifactReadable sprintArt = atsServer.getArtifact(sprintUuid);
+ Conditions.assertNotNull(sprintArt, "Sprint not found with id %s", sprintUuid);
+ Collection<IAtsWorkItem> myWorldItems = getSprintItems(teamUuid, sprintUuid);
+ CustomizeData custData = getDefaultAgileCustData();
+ Conditions.assertNotNull(custData, "Can't retrieve default customization");
+ String table =
+ WorldResource.getCustomizedTable(atsServer, "Sprint - " + sprintArt.getName(), custData, myWorldItems);
+ return Response.ok().entity(table).build();
+ }
+
+ private CustomizeData getDefaultAgileCustData() {
+ CustomizeData result = null;
+ try {
+ String custDataStr = RestUtil.getResource("support/DefaultAgileCustomization.json");
+ if (Strings.isValid(custDataStr)) {
+ result = getMapper().readValue(custDataStr, CustomizeData.class);
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ return result;
+ }
+
+ @Override
+ public Response getSprintItemsUICustomized(long teamUuid, long sprintUuid, String customizeGuid) {
+ ArtifactReadable sprintArt = atsServer.getArtifact(sprintUuid);
+ Conditions.assertNotNull(sprintArt, "Sprint not found with id %s", sprintUuid);
+ Collection<IAtsWorkItem> myWorldItems = getSprintItems(teamUuid, sprintUuid);
+ CustomizeData custData = atsServer.getCustomizationByGuid(customizeGuid);
+ Conditions.assertNotNull(custData, "Can't retrieve customization with id %s", customizeGuid);
+ String table =
+ WorldResource.getCustomizedTable(atsServer, "Sprint - " + sprintArt.getName(), custData, myWorldItems);
+ return Response.ok().entity(table).build();
+ }
+
+ public static ObjectMapper getMapper() {
+ if (mapper == null) {
+ mapper = new ObjectMapper();
+ mapper.setDateFormat(new SimpleDateFormat("MMM d, yyyy h:mm:ss aa"));
+ }
+ return mapper;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java
index 3a7f3cc9402..aa717b211e9 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java
@@ -68,7 +68,7 @@ public class SprintPageBuilder {
if (includeInCount(item)) {
++numActionsCompleted;
double points = getPointsFromAction(item);
- if (item.getSoleAttributeValue(AtsAttributeTypes.UnplannedWork, false)) {
+ if (item.getSoleAttributeValue(AtsAttributeTypes.UnPlannedWork, false)) {
walkupCompleted += points;
} else {
workCompleted += points;
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
index d80dffc0c1a..c960214e1bc 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsRelationResolverServiceImpl.java
@@ -84,8 +84,8 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public ArtifactId getRelatedOrNull(ArtifactId artifact, IRelationTypeSide relationType) {
- ArtifactId related = null;
+ public ArtifactToken getRelatedOrNull(ArtifactId artifact, IRelationTypeSide relationType) {
+ ArtifactToken related = null;
try {
related = ((ArtifactReadable) artifact).getRelated(relationType).getAtMostOneOrNull();
} catch (ArtifactDoesNotExist ex) {
@@ -162,7 +162,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public ArtifactId getRelatedOrNull(IAtsObject atsObject, IRelationTypeSide relationSide) {
+ public ArtifactToken getRelatedOrNull(IAtsObject atsObject, IRelationTypeSide relationSide) {
ArtifactReadable art = getArtifact(atsObject);
if (art != null) {
return art.getRelated(relationSide).getAtMostOneOrNull();
@@ -171,7 +171,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
}
@Override
- public List<ArtifactId> getRelatedArtifacts(IAtsWorkItem workItem, IRelationTypeSide relationTypeSide) {
+ public List<ArtifactToken> getRelatedArtifacts(IAtsWorkItem workItem, IRelationTypeSide relationTypeSide) {
ArtifactReadable artifact = getArtifact(workItem);
return Collections.castAll(getRelated(artifact, relationTypeSide));
}
@@ -181,4 +181,9 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver {
return getRelated(atsObject.getStoreObject(), relationTypeSide);
}
+ @Override
+ public Collection<ArtifactToken> getRelatedArtifacts(ArtifactId artifact, IRelationTypeSide relationTypeSide) {
+ return getRelated(artifact, relationTypeSide);
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/world/WorldResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/world/WorldResource.java
index 8291c079637..cd9c2e94037 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/world/WorldResource.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/world/WorldResource.java
@@ -124,9 +124,9 @@ public class WorldResource {
IAtsWorkItem.class);
getWorkItems.end();
- String table =
- getCustomizedTable("MY World - " + userById.getName() + " - Customization: " + customization.getName(),
- customization, myWorldItems);
+ String table = getCustomizedTable(atsServer,
+ "MY World - " + userById.getName() + " - Customization: " + customization.getName(), customization,
+ myWorldItems);
time.end();
return table;
}
@@ -179,35 +179,31 @@ public class WorldResource {
Collection<IAtsWorkItem> collectorItems = getCollection(collectorArt);
getWorkItems.end();
- String table =
- getCustomizedTable("Collector - " + collectorArt.getName() + " - Customization: " + customization.getName(),
- customization, collectorItems);
+ String table = getCustomizedTable(atsServer,
+ "Collector - " + collectorArt.getName() + " - Customization: " + customization.getName(), customization,
+ collectorItems);
time.end();
return table;
}
- private String getCustomizedTable(String title, CustomizeData customization, Collection<IAtsWorkItem> workItems) {
- Conditions.checkNotNull(customization, "Cuatomization" + customization);
+ public static String getCustomizedTable(IAtsServer atsServer, String title, CustomizeData customization, Collection<IAtsWorkItem> workItems) {
+ Conditions.checkNotNull(customization, "Customization " + customization + " ");
StringBuilder sb = new StringBuilder();
sb.append(AHTML.heading(2, title));
sb.append(AHTML.beginMultiColumnTable(97, 1));
- ElapsedTime getHeaders = new ElapsedTime("get column headers");
// get column headers
List<String> headers = new ArrayList<>();
for (XViewerColumn col : customization.getColumnData().getColumns()) {
- System.err.println(col);
if (col.isShow()) {
headers.add(col.getName());
}
}
headers.add("Link");
sb.append(AHTML.addHeaderRowMultiColumnTable(headers));
- getHeaders.end();
AtsConfigurations configurations = atsServer.getConfigurations();
- ElapsedTime getRows = new ElapsedTime("get rows");
for (IAtsWorkItem workItem : workItems) {
// create row
@@ -230,7 +226,6 @@ public class WorldResource {
sb.append(AHTML.addRowMultiColumnTable(rowStrs.toArray(new String[rowStrs.size()]), null));
}
- getRows.end();
sb.append(AHTML.endMultiColumnTable());
return sb.toString();

Back to the top