Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-10-05 19:38:41 -0400
committerDonald Dunne2016-10-11 20:57:39 -0400
commit64186cc2251682628c6890693cd9d5c0d8f0bd9e (patch)
treedd51f91f4b2ad5c3f4b5eb83f4a4b4fe07697074
parent4f166d0b828acda3a7bf10f414b39ec06e6167f3 (diff)
downloadorg.eclipse.osee-64186cc2251682628c6890693cd9d5c0d8f0bd9e.tar.gz
org.eclipse.osee-64186cc2251682628c6890693cd9d5c0d8f0bd9e.tar.xz
org.eclipse.osee-64186cc2251682628c6890693cd9d5c0d8f0bd9e.zip
feature[ats_ATS315180]: Add Agile Sprint dbInit settings and tests
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java20
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileService.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/JaxAtsObjects.java39
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java112
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/SprintItemData.java82
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AgileEndpointTest.java56
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java77
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java22
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java3
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java12
-rw-r--r--plugins/org.eclipse.osee.ats/support/WorkDef_Sprint.ats2
13 files changed, 425 insertions, 12 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 54b69e2b960..d6ae85dab2f 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,7 +10,6 @@
*******************************************************************************/
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;
@@ -22,7 +21,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;
+import org.eclipse.osee.ats.api.workflow.JaxAtsObjects;
/**
* @author Donald G. Dunne
@@ -86,7 +85,7 @@ public interface AgileEndpointApi {
@GET
@Path("team/{teamUuid}/sprint/{sprintUuid}/world")
@Produces(MediaType.APPLICATION_JSON)
- public Collection<IAtsWorkItem> getSprintItems(@PathParam("teamUuid") long teamUuid, @PathParam("sprintUuid") long sprintUuid);
+ public JaxAtsObjects getSprintItemsAsJax(@PathParam("teamUuid") long teamUuid, @PathParam("sprintUuid") long sprintUuid);
@GET
@Path("team/{teamUuid}/sprint/{sprintUuid}/world/ui")
@@ -158,4 +157,19 @@ public interface AgileEndpointApi {
@Path("team/{teamUuid}")
public Response deleteTeam(@PathParam("teamUuid") long teamUuid);
+ @PUT
+ @Path("item/{itemId}/feature")
+ public Response addFeatureGroup(@PathParam("itemId") long itemId, String featureGroupName);
+
+ @PUT
+ @Path("item/{itemId}/unplanned")
+ public Response setUnPlanned(@PathParam("itemId") long itemId, boolean unPlanned);
+
+ /**
+ * Set points based on points attribute type configured in Agile Team. ats.Points is default.
+ */
+ @PUT
+ @Path("item/{itemId}/points")
+ public Response setPoints(@PathParam("itemId") long itemId, String points);
+
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileService.java
index abaf1df6b7b..15e37c2b571 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileService.java
@@ -80,4 +80,6 @@ public interface IAgileService {
Collection<IAgileItem> getItems(IAgileSprint sprint);
+ IAgileTeam getAgileTeam(IAgileItem item);
+
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/JaxAtsObjects.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/JaxAtsObjects.java
new file mode 100644
index 00000000000..6c298b4002c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/JaxAtsObjects.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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.api.workflow;
+
+import java.util.LinkedList;
+import java.util.List;
+import org.eclipse.osee.ats.api.IAtsObject;
+import org.eclipse.osee.ats.api.config.JaxAtsObject;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class JaxAtsObjects {
+
+ List<JaxAtsObject> atsObjects = new LinkedList<>();
+
+ public List<JaxAtsObject> getAtsObjects() {
+ return atsObjects;
+ }
+
+ public void setAtsObjects(List<JaxAtsObject> atsObjects) {
+ this.atsObjects = atsObjects;
+ }
+
+ public static JaxAtsObject create(IAtsObject atsObject) {
+ JaxAtsObject obj = new JaxAtsObject();
+ obj.setName(atsObject.getName());
+ obj.setUuid(atsObject.getId());
+ return obj;
+ }
+}
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java
index 66796dc6cbf..44fb1ace749 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoAgile.java
@@ -12,16 +12,23 @@ package org.eclipse.osee.ats.client.demo;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
import java.util.logging.Level;
import javax.ws.rs.core.Response;
import org.eclipse.core.runtime.Assert;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.agile.AgileEndpointApi;
+import org.eclipse.osee.ats.api.agile.IAgileSprint;
import org.eclipse.osee.ats.api.agile.JaxAgileItem;
import org.eclipse.osee.ats.api.agile.JaxNewAgileBacklog;
import org.eclipse.osee.ats.api.agile.JaxNewAgileFeatureGroup;
import org.eclipse.osee.ats.api.agile.JaxNewAgileSprint;
import org.eclipse.osee.ats.api.agile.JaxNewAgileTeam;
+import org.eclipse.osee.ats.api.config.JaxAtsObject;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.api.workflow.WorkItemType;
import org.eclipse.osee.ats.api.workflow.transition.IAtsTransitionManager;
import org.eclipse.osee.ats.api.workflow.transition.TransitionOption;
@@ -34,11 +41,14 @@ import org.eclipse.osee.ats.core.client.util.AtsUtilClient;
import org.eclipse.osee.ats.core.workflow.state.TeamState;
import org.eclipse.osee.ats.core.workflow.transition.TransitionFactory;
import org.eclipse.osee.ats.core.workflow.transition.TransitionHelper;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
import org.eclipse.osee.ats.demo.api.DemoArtifactTypes;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
+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;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -100,6 +110,13 @@ public class PopulateDemoAgile {
Response response = agile.createTeam(newTeam);
Assert.isTrue(Response.Status.CREATED.getStatusCode() == response.getStatus());
+ // Assigne ATS Team to Agile Team
+ Artifact sawCodeArt = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Code);
+ Conditions.assertNotNull(sawCodeArt, "sawCodeArt");
+ Artifact agileTeam = AtsClientService.get().getArtifact(newTeam.getUuid());
+ agileTeam.addRelation(AtsRelationTypes.AgileTeamToAtsTeam_AtsTeam, sawCodeArt);
+ agileTeam.persist("Assigne ATS Team to Agile Team");
+
// Create Backlog
JaxNewAgileBacklog backlog = newBacklog(teamUuid);
response = agile.createBacklog(teamUuid, backlog);
@@ -178,6 +195,101 @@ public class PopulateDemoAgile {
Assert.isTrue(Response.Status.CREATED.getStatusCode() == response.getStatus());
}
+ setupSprint2ForBurndown(secondSprintUuid);
+ }
+
+ private void setupSprint2ForBurndown(long secondSprintUuid) {
+
+ // Transition First Sprint to completed
+ IAtsWorkItem sprint = AtsClientService.get().getQueryService().createQuery(WorkItemType.WorkItem).andUuids(
+ secondSprintUuid).getItems().iterator().next();
+ AtsChangeSet changes = new AtsChangeSet("Setup Sprint 2 for Burndown");
+
+ long oneDay = 24 * 60 * 60 * 1000;
+ Date now = new Date();
+ Date startDate = new Date(now.getTime() - (oneDay * 5));
+ Date holiday1 = new Date(now.getTime() + (oneDay * 3));
+ Date holiday2 = new Date(now.getTime() + (oneDay * 4));
+ Date endDate = new Date(now.getTime() + (oneDay * 25));
+ changes.setSoleAttributeValue(sprint, AtsAttributeTypes.StartDate, startDate);
+ changes.setSoleAttributeValue(sprint, AtsAttributeTypes.EndDate, endDate);
+ changes.setSoleAttributeValue(sprint, AtsAttributeTypes.UnPlannedPoints, 45);
+ changes.setSoleAttributeValue(sprint, AtsAttributeTypes.PlannedPoints, 200);
+ changes.addAttribute(sprint, AtsAttributeTypes.Holiday, holiday1);
+ changes.addAttribute(sprint, AtsAttributeTypes.Holiday, holiday2);
+ // set sprint data on sprint items
+ Artifact agileTeamArt =
+ ((Artifact) sprint.getStoreObject()).getRelatedArtifact(AtsRelationTypes.AgileTeamToSprint_AgileTeam);
+ changes.execute();
+
+ setSprintItemData(agileTeamArt.getUuid(), (IAgileSprint) sprint);
+ }
+
+ private void setSprintItemData(Long teamUuid, IAgileSprint sprint) {
+ List<SprintItemData> datas = new LinkedList<>();
+ datas.add(
+ new SprintItemData("Sprint Order", "Title", "Points", "Unplanned Work", "Feature Group", "CreatedDate"));
+ datas.add(
+ new SprintItemData("1", "Button W doesn't work on Situation Page", "8", " ", "Communications", "10/03/2016"));
+ datas.add(new SprintItemData("2", "Can't load Diagram Tree", "4", "Unplanned Work", "Framework", "10/03/2016"));
+ datas.add(new SprintItemData("3", "Can't see the Graph View", "8", "Unplanned Work", "Framework", "10/03/2016"));
+ datas.add(new SprintItemData("4", "Problem in Diagram Tree", "40", " ", "Framework", "10/03/2016"));
+ datas.add(new SprintItemData("5", "Problem with the Graph View", "8", " ", "Communications", "10/03/2016"));
+ datas.add(new SprintItemData("6", "SAW (committed) Reqt Changes for Diagram View", "2", "Unplanned Work",
+ "Framework", "10/03/2016"));
+ datas.add(
+ new SprintItemData("7", "SAW (committed) Reqt Changes for Diagram View", "8", " ", "Framework", "10/03/2016"));
+ datas.add(
+ new SprintItemData("8", "SAW (committed) Reqt Changes for Diagram View", "16", " ", "UI", "10/03/2016"));
+ datas.add(new SprintItemData("9", "SAW (no-branch) Even More Requirement Changes for Diagram View", "32", " ",
+ "Communications", "10/03/2016"));
+ datas.add(new SprintItemData("10", "SAW (no-branch) Even More Requirement Changes for Diagram View", "40", " ",
+ "Documentation", "10/03/2016"));
+ datas.add(new SprintItemData("11", "SAW (no-branch) Even More Requirement Changes for Diagram View", "8", " ",
+ "Documentation", "10/03/2016"));
+ datas.add(new SprintItemData("12", "SAW (uncommitted) More Reqt Changes for Diagram View", "1", " ",
+ "Communications", "10/03/2016"));
+ datas.add(new SprintItemData("13", "SAW (uncommitted) More Reqt Changes for Diagram View", "6", " ",
+ "Documentation", "10/03/2016"));
+ datas.add(new SprintItemData("14", "SAW (uncommitted) More Reqt Changes for Diagram View", "32", " ",
+ "Communications", "10/03/2016"));
+ datas.add(new SprintItemData("15", "SAW (uncommitted-conflicted) More Requirement Changes for Diagram View", "1",
+ " ", "Communications", "10/03/2016"));
+ datas.add(new SprintItemData("16", "Workaround for Graph View for SAW_Bld_2", "1", "Unplanned Work",
+ "Communications", "10/03/2016"));
+ datas.add(new SprintItemData("17", "Workaround for Graph View for SAW_Bld_3", "2", "Unplanned Work",
+ "Communications", "10/03/2016"));
+
+ int x = 1;
+ for (JaxAtsObject jaxWorkItem : AtsClientService.getAgile().getSprintItemsAsJax(teamUuid,
+ sprint.getId()).getAtsObjects()) {
+ SprintItemData data = getSprintData(datas, x++, jaxWorkItem);
+ String featureGroupName = data.getFeature();
+ if (Strings.isValid(featureGroupName)) {
+ AtsClientService.getAgile().addFeatureGroup(jaxWorkItem.getUuid(), featureGroupName);
+ }
+ String unPlannedStr = data.getUnPlanned();
+ boolean unPlanned = false;
+ if (Strings.isValid(unPlannedStr)) {
+ if (unPlannedStr.toLowerCase().contains("un")) {
+ unPlanned = true;
+ }
+ }
+ AtsClientService.getAgile().setUnPlanned(jaxWorkItem.getUuid(), unPlanned);
+ String points = data.getPoints();
+ if (Strings.isValid(points)) {
+ AtsClientService.getAgile().setPoints(jaxWorkItem.getUuid(), points);
+ }
+ }
+ }
+
+ private SprintItemData getSprintData(List<SprintItemData> datas, int i, JaxAtsObject workItem) {
+ for (SprintItemData data : datas) {
+ if (data.getOrder().equals(String.valueOf(i)) && data.getTitle().equals(workItem.getName())) {
+ return data;
+ }
+ }
+ return null;
}
private JaxNewAgileBacklog newBacklog(long teamUuid) {
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/SprintItemData.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/SprintItemData.java
new file mode 100644
index 00000000000..6f08c62dc34
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/SprintItemData.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.client.demo;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class SprintItemData {
+
+ private String order;
+ private String title;
+ private String points;
+ private String unPlanned;
+ private String feature;
+ private String createdDate;
+
+ public SprintItemData(String order, String title, String points, String unPlanned, String feature, String createdDate) {
+ this.order = order;
+ this.title = title;
+ this.points = points;
+ this.unPlanned = unPlanned;
+ this.feature = feature;
+ this.createdDate = createdDate;
+ }
+
+ public String getOrder() {
+ return order;
+ }
+
+ public void setOrder(String order) {
+ this.order = order;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getPoints() {
+ return points;
+ }
+
+ public void setPoints(String points) {
+ this.points = points;
+ }
+
+ public String getUnPlanned() {
+ return unPlanned;
+ }
+
+ public void setUnPlanned(String unPlanned) {
+ this.unPlanned = unPlanned;
+ }
+
+ public String getFeature() {
+ return feature;
+ }
+
+ public void setFeature(String feature) {
+ this.feature = feature;
+ }
+
+ public String getCreatedDate() {
+ return createdDate;
+ }
+
+ public void setCreatedDate(String createdDate) {
+ this.createdDate = createdDate;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AgileEndpointTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AgileEndpointTest.java
index f3842291546..ebc014f1d26 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AgileEndpointTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/agile/AgileEndpointTest.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.ats.client.integration.tests.ats.agile;
import java.util.List;
import javax.ws.rs.core.Response;
+import org.eclipse.osee.ats.api.agile.AgileBurndown;
import org.eclipse.osee.ats.api.agile.AgileEndpointApi;
import org.eclipse.osee.ats.api.agile.JaxAgileBacklog;
import org.eclipse.osee.ats.api.agile.JaxAgileFeatureGroup;
@@ -21,7 +22,10 @@ import org.eclipse.osee.ats.api.agile.JaxNewAgileBacklog;
import org.eclipse.osee.ats.api.agile.JaxNewAgileFeatureGroup;
import org.eclipse.osee.ats.api.agile.JaxNewAgileSprint;
import org.eclipse.osee.ats.api.agile.JaxNewAgileTeam;
+import org.eclipse.osee.ats.api.data.AtsRelationTypes;
import org.eclipse.osee.ats.client.integration.tests.AtsClientService;
+import org.eclipse.osee.ats.demo.api.DemoArtifactToken;
+import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.junit.After;
@@ -175,4 +179,56 @@ public class AgileEndpointTest {
Assert.assertEquals(uuid.longValue(), newBacklog.getUuid().longValue());
}
+ private Pair<Artifact, Artifact> getTeamSprint() {
+ Artifact sawCodeArt = AtsClientService.get().getArtifact(DemoArtifactToken.SAW_Code);
+ Assert.assertNotNull(sawCodeArt);
+ Artifact agileTeam = sawCodeArt.getRelatedArtifact(AtsRelationTypes.AgileTeamToAtsTeam_AgileTeam);
+ Assert.assertNotNull(agileTeam);
+ Artifact sprint2 = null;
+ for (Artifact sprint : agileTeam.getRelatedArtifacts(AtsRelationTypes.AgileTeamToSprint_Sprint)) {
+ if (sprint.getName().equals("Sprint 02")) {
+ sprint2 = sprint;
+ break;
+ }
+ }
+ Assert.assertNotNull(sprint2);
+ return new Pair<>(agileTeam, sprint2);
+ }
+
+ @Test
+ public void testGetSprintBurndown() {
+ Pair<Artifact, Artifact> teamSprint = getTeamSprint();
+ Artifact agileTeam = teamSprint.getFirst();
+ Artifact sprint2 = teamSprint.getSecond();
+ Response response = agile.getSprintBurndown(agileTeam.getUuid(), sprint2.getUuid());
+ Assert.assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());
+
+ AgileBurndown burndown = response.readEntity(AgileBurndown.class);
+ Assert.assertNotNull(burndown);
+ Assert.assertEquals("SAW Agile Team", burndown.getAgileTeamName());
+ Assert.assertEquals("Sprint 02", burndown.getSprintName());
+ Assert.assertEquals(2, burndown.getHolidays().size());
+ Assert.assertEquals("ats.Points", burndown.getPointsAttrTypeName());
+ Assert.assertEquals(new Integer(200), burndown.getPlannedPoints());
+ Assert.assertEquals(new Integer(45), burndown.getUnPlannedPoints());
+ Assert.assertEquals(21, burndown.getDates().size());
+ }
+
+ @Test
+ public void testGetSprintBurndownUi() {
+ Pair<Artifact, Artifact> teamSprint = getTeamSprint();
+ Artifact agileTeam = teamSprint.getFirst();
+ Artifact sprint2 = teamSprint.getSecond();
+ Response response = agile.getSprintBurndownUi(agileTeam.getUuid(), sprint2.getUuid());
+ Assert.assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());
+
+ String html = response.readEntity(String.class);
+ Assert.assertNotNull(html);
+ Assert.assertTrue(html.contains("Sprint 02"));
+ Assert.assertTrue(html.contains("200"));
+ Assert.assertTrue(html.contains("45"));
+ Assert.assertTrue(html.contains("Planned Complete"));
+ Assert.assertTrue(html.contains("Total Remaining"));
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java
index 7025b17fc9f..68a4722bc0d 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/IAtsServer.java
@@ -21,6 +21,8 @@ import org.eclipse.osee.ats.api.notify.IAtsNotifier;
import org.eclipse.osee.ats.api.review.IAtsReviewServiceProvider;
import org.eclipse.osee.ats.api.team.IAtsConfigItemFactoryProvider;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinitionService;
+import org.eclipse.osee.ats.api.user.IAtsUser;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.IAtsDatabaseConversion;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionAdmin;
import org.eclipse.osee.ats.api.workdef.IAtsWorkDefinitionServiceProvider;
@@ -84,4 +86,6 @@ public interface IAtsServer extends IAtsServices, IAtsNotifier, IAtsConfigItemFa
Collection<CustomizeData> getCustomizationsGlobal(String namespace);
+ IAtsChangeSet createChangeSet(String string, IAtsUser systemUser);
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
index 55a37ca5efc..639e8be0cdc 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java
@@ -43,6 +43,7 @@ import org.eclipse.osee.ats.api.team.ChangeType;
import org.eclipse.osee.ats.api.team.IAtsConfigItemFactory;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinitionService;
import org.eclipse.osee.ats.api.team.IAtsWorkItemFactory;
+import org.eclipse.osee.ats.api.user.IAtsUser;
import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IArtifactResolver;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
@@ -724,4 +725,9 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
public IOseeBranch getAtsBranch() {
return AtsUtilCore.getAtsBranch();
}
+
+ @Override
+ public IAtsChangeSet createChangeSet(String comment, IAtsUser user) {
+ return getStoreService().createAtsChangeSet(comment, user);
+ }
} \ 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 50e397f17d8..6977ca34a44 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
@@ -17,6 +17,9 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
@@ -44,10 +47,15 @@ import org.eclipse.osee.ats.api.agile.JaxNewAgileFeatureGroup;
import org.eclipse.osee.ats.api.agile.JaxNewAgileSprint;
import org.eclipse.osee.ats.api.agile.JaxNewAgileTeam;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
+import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.api.util.IAtsChangeSet;
+import org.eclipse.osee.ats.api.workflow.JaxAtsObjects;
+import org.eclipse.osee.ats.core.users.AtsCoreUsers;
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.data.IAttributeType;
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;
@@ -488,6 +496,16 @@ public class AgileEndpointImpl implements AgileEndpointApi {
** Sprint Reporting
***********************************/
@Override
+ public JaxAtsObjects getSprintItemsAsJax(long teamUuid, long sprintUuid) {
+ ArtifactReadable sprintArt = atsServer.getArtifact(sprintUuid);
+ JaxAtsObjects objs = new JaxAtsObjects();
+ for (IAtsWorkItem workItem : atsServer.getWorkItemFactory().getWorkItems(
+ sprintArt.getRelated(AtsRelationTypes.AgileSprintToItem_AtsItem).getList())) {
+ objs.getAtsObjects().add(JaxAtsObjects.create(workItem));
+ }
+ return objs;
+ }
+
public Collection<IAtsWorkItem> getSprintItems(long teamUuid, long sprintUuid) {
ArtifactReadable sprintArt = atsServer.getArtifact(sprintUuid);
return atsServer.getWorkItemFactory().getWorkItems(
@@ -539,4 +557,63 @@ public class AgileEndpointImpl implements AgileEndpointApi {
return mapper;
}
+ @Override
+ @PUT
+ @Path("item/{itemId}/feature")
+ public Response addFeatureGroup(@PathParam("itemId") long itemId, String featureGroupName) {
+ ArtifactReadable itemArt = atsServer.getArtifact(itemId);
+ Conditions.assertNotNull(itemArt, "Work Item not found with id %s", itemId);
+ IAgileItem item = atsServer.getWorkItemFactory().getAgileItem(itemArt);
+ boolean found = false;
+ // check to make sure item is not already related
+ for (IAgileFeatureGroup feature : atsServer.getAgileService().getFeatureGroups(item)) {
+ if (feature.getName().equals(featureGroupName)) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ IAgileTeam team = atsServer.getAgileService().getAgileTeam(item);
+ for (ArtifactReadable featureArt : ((ArtifactReadable) team.getStoreObject()).getRelated(
+ AtsRelationTypes.AgileTeamToFeatureGroup_FeatureGroup)) {
+ if (featureArt.getName().equals(featureGroupName)) {
+ IAtsChangeSet changes =
+ atsServer.createChangeSet("Add Feature Group to WorkItem", AtsCoreUsers.SYSTEM_USER);
+ changes.relate(featureArt, AtsRelationTypes.AgileFeatureToItem_AtsItem, item);
+ changes.execute();
+ return Response.ok().build();
+ }
+ }
+ }
+ return Response.notModified().build();
+ }
+
+ @Override
+ @PUT
+ @Path("item/{itemId}/unplanned")
+ public Response setUnPlanned(@PathParam("itemId") long itemId, boolean unPlanned) {
+ ArtifactReadable itemArt = atsServer.getArtifact(itemId);
+ Conditions.assertNotNull(itemArt, "Work Item not found with id %s", itemId);
+ IAgileItem item = atsServer.getWorkItemFactory().getAgileItem(itemArt);
+ IAtsChangeSet changes = atsServer.createChangeSet("Set Agile UnPlanned", AtsCoreUsers.SYSTEM_USER);
+ changes.setSoleAttributeValue(item, AtsAttributeTypes.UnPlannedWork, unPlanned);
+ changes.execute();
+ return Response.ok().build();
+ }
+
+ @Override
+ @PUT
+ @Path("item/{itemId}/points")
+ public Response setPoints(@PathParam("itemId") long itemId, String points) {
+ ArtifactReadable itemArt = atsServer.getArtifact(itemId);
+ Conditions.assertNotNull(itemArt, "Work Item not found with id %s", itemId);
+ IAgileItem item = atsServer.getWorkItemFactory().getAgileItem(itemArt);
+ IAgileTeam team = atsServer.getAgileService().getAgileTeam(item);
+ IAttributeType agileTeamPointsAttributeType = atsServer.getAgileService().getAgileTeamPointsAttributeType(team);
+ IAtsChangeSet changes = atsServer.createChangeSet("Set Points", AtsCoreUsers.SYSTEM_USER);
+ changes.setSoleAttributeValue(item, agileTeamPointsAttributeType, points);
+ changes.execute();
+ return Response.ok().build();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java
index bb5bb0af3b3..6052ce0dcb0 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileService.java
@@ -360,4 +360,26 @@ public class AgileService implements IAgileService {
}
}
+ @Override
+ public IAgileTeam getAgileTeam(IAgileItem item) {
+ ArtifactReadable itemArt = atsServer.getArtifact(item);
+ ArtifactReadable backlogArt = itemArt.getRelated(AtsRelationTypes.Goal_Member).getAtMostOneOrNull();
+ if (backlogArt != null) {
+ ArtifactReadable teamArt =
+ backlogArt.getRelated(AtsRelationTypes.AgileTeamToBacklog_AgileTeam).getAtMostOneOrNull();
+ if (teamArt != null) {
+ return atsServer.getConfigItemFactory().getAgileTeam(teamArt);
+ }
+ }
+ ArtifactReadable sprintArt = itemArt.getRelated(AtsRelationTypes.AgileSprintToItem_Sprint).getAtMostOneOrNull();
+ if (sprintArt != null) {
+ ArtifactReadable teamArt =
+ sprintArt.getRelated(AtsRelationTypes.AgileTeamToSprint_AgileTeam).getAtMostOneOrNull();
+ if (teamArt != null) {
+ return atsServer.getConfigItemFactory().getAgileTeam(teamArt);
+ }
+ }
+ return null;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java
index 60fdba83de0..3202ff71962 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java
@@ -143,7 +143,6 @@ public class UpdateAtsConfiguration {
return VIEWS_EQUAL_KEY + gson.toJson(defaultViews);
}
- @SuppressWarnings("unchecked")
public ArtifactId getOrCreateConfigFolder(ArtifactId userArt, XResultData rd) {
ArtifactReadable configFolderArt =
atsServer.getOrcsApi().getQueryFactory().fromBranch(CoreBranches.COMMON).andIds(
@@ -162,7 +161,6 @@ public class UpdateAtsConfiguration {
return configFolderArt;
}
- @SuppressWarnings("unchecked")
public ArtifactId getOrCreateAtsConfig(ArtifactReadable userArt, XResultData rd) {
ArtifactReadable atsConfigArt = atsServer.getOrcsApi().getQueryFactory().fromBranch(CoreBranches.COMMON).andIds(
AtsArtifactToken.AtsConfig).getResults().getAtMostOneOrNull();
@@ -190,7 +188,6 @@ public class UpdateAtsConfiguration {
atsServer.setConfigValue(VIEWS_KEY, Collections.toString(",", validStateNames));
}
- @SuppressWarnings("unchecked")
public ArtifactId getOrCreateConfigsFolder(ArtifactId userArt, XResultData rd) {
ArtifactId configFolderArt = getOrCreateConfigFolder(userArt, rd);
ArtifactId configsFolderArt = atsServer.getOrcsApi().getQueryFactory().fromBranch(CoreBranches.COMMON).andIds(
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java
index 69110076d80..de7d83abc0d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java
@@ -35,7 +35,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewer
*/
public class SprintXViewerFactory extends SkynetXViewerFactory {
- private SprintArtifact soleSprintArtifact;
+ private final SprintArtifact soleSprintArtifact;
public SprintXViewerFactory(SprintArtifact soleSprintArtifact, IOseeTreeReportProvider reportProvider) {
super("org.eclipse.osee.ats.SprintXViewer", reportProvider);
@@ -47,6 +47,8 @@ public class SprintXViewerFactory extends SkynetXViewerFactory {
// Add default Sprint columns
WorldXViewerUtil.addColumn(this, SprintOrderColumn.getInstance(), 45, sprintCols);
WorldXViewerUtil.addColumn(this, new XViewerAtsAttributeValueColumn(AtsColumnToken.TitleColumn), 339, sprintCols);
+ WorldXViewerUtil.addColumn(this, WorldXViewerFactory.getColumnServiceColumn(AtsColumnToken.AgileTeamPointsColumn),
+ 15, sprintCols);
WorldXViewerUtil.addColumn(this, WorldXViewerFactory.getColumnServiceColumn(AtsColumnToken.StateColumn), 74,
sprintCols);
WorldXViewerUtil.addColumn(this, PriorityColumnUI.getInstance(), 20, sprintCols);
@@ -54,12 +56,12 @@ public class SprintXViewerFactory extends SkynetXViewerFactory {
WorldXViewerUtil.addColumn(this, AssigneeColumnUI.getInstance(), 113, sprintCols);
XViewerColumn unPlannedWorkColumn = WorldXViewerUtil.getConfigColumn("ats.Unplanned Work", configCols);
if (unPlannedWorkColumn != null) {
- WorldXViewerUtil.addColumn(this, unPlannedWorkColumn, 43, sprintCols);
- configCols.remove(unPlannedWorkColumn);
+ WorldXViewerUtil.addColumn(this, unPlannedWorkColumn, 40, sprintCols);
+ } else {
+ WorldXViewerUtil.addColumn(this, new XViewerAtsAttributeValueColumn(AtsColumnToken.UnPlannedWorkColumn), 40,
+ sprintCols);
}
WorldXViewerUtil.addColumn(this, TargetedVersionColumnUI.getInstance(), 50, sprintCols);
- WorldXViewerUtil.addColumn(this, WorldXViewerFactory.getColumnServiceColumn(AtsColumnToken.StateColumn), 116,
- sprintCols);
WorldXViewerUtil.addColumn(this, AgileFeatureGroupColumn.getInstance(), 91, sprintCols);
WorldXViewerUtil.addColumn(this, CreatedDateColumnUI.getInstance(), 82, sprintCols);
WorldXViewerUtil.addColumn(this, WorldXViewerFactory.getColumnServiceColumn(AtsColumnToken.AtsIdColumnShow), 50,
diff --git a/plugins/org.eclipse.osee.ats/support/WorkDef_Sprint.ats b/plugins/org.eclipse.osee.ats/support/WorkDef_Sprint.ats
index 5e64ddd0823..2f105a92f6f 100644
--- a/plugins/org.eclipse.osee.ats/support/WorkDef_Sprint.ats
+++ b/plugins/org.eclipse.osee.ats/support/WorkDef_Sprint.ats
@@ -43,7 +43,7 @@ workDefinition "WorkDef_Sprint" {
}
widgetDefinition "Run Sprint Summary" {
- xWidgetName "XRunSprintReportButton"
+ xWidgetName "XRunSprintSummaryButton"
}
state "Cancelled" {

Back to the top