Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-09-20 19:35:38 -0400
committerdonald.g.dunne2017-09-22 12:04:41 -0400
commit29b544dabbf16e36b6c0a602ad919b7c67630c07 (patch)
treec89c95f8dfdb182cd16ffefd1f83b88972c00064
parent34120a9534303f09677c8bcca15cd56a5fd6257a (diff)
downloadorg.eclipse.osee-ats_agile.tar.gz
org.eclipse.osee-ats_agile.tar.xz
org.eclipse.osee-ats_agile.zip
feature: Add Agile New Action pageats_agile
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java4
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileEndpointApi.java7
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileService.java3
-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.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java9
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsAttributeEndpointImplTest.java4
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java7
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileService.java11
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java24
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java17
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agile.css13
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agileFactory.js11
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/app.js4
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogAndSprint.html16
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogCtrl.js8
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/main.html1
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/newAction.html65
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/newActionCtrl.js93
-rw-r--r--plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/teamsCtrl.js6
-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.java8
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java20
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TeamResource.java19
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java1
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java3
26 files changed, 348 insertions, 20 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
index 6414fba9e3..6a09400b54 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsServices.java
@@ -14,6 +14,7 @@ import java.util.Collection;
import java.util.List;
import org.eclipse.osee.ats.api.agile.IAgileService;
import org.eclipse.osee.ats.api.agile.IAgileSprintHtmlOperation;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.column.IAtsColumnService;
import org.eclipse.osee.ats.api.config.AtsConfigKey;
import org.eclipse.osee.ats.api.config.AtsConfigurations;
@@ -187,6 +188,7 @@ public interface IAtsServices extends IAtsEarnedValueServiceProvider, IAtsConfig
ArtifactToken getArtifactByAtsId(String id);
<T> T getConfigItem(ArtifactId artId);
+
IAtsTeamWorkflow getTeamWf(Long id);
IAtsTeamWorkflow getTeamWf(ArtifactId artifact);
@@ -223,4 +225,6 @@ public interface IAtsServices extends IAtsEarnedValueServiceProvider, IAtsConfig
Collection<ArtifactId> getArtifacts(IArtifactType artifactType);
+ IAtsActionableItemService getActionableItemService();
+
}
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 a4c6e3beb7..8559db20f3 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
@@ -22,8 +22,10 @@ import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.eclipse.osee.ats.api.agile.kanban.JaxKbSprint;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.util.ILineChart;
import org.eclipse.osee.ats.api.workflow.JaxAtsObjects;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.util.result.XResultData;
/**
@@ -51,6 +53,11 @@ public interface AgileEndpointApi {
public List<JaxAgileFeatureGroup> getFeatureGroups(@PathParam("teamUuid") long teamUuid);
@GET
+ @Path("team/{teamId}/ai")
+ @Produces(MediaType.APPLICATION_JSON)
+ public List<IAtsActionableItem> getActionableAis(@PathParam("teamId") ArtifactId teamId);
+
+ @GET
@Path("team/{teamUuid}/feature/{featureUuid}")
@Produces(MediaType.APPLICATION_JSON)
public JaxAgileFeatureGroup getFeatureGroup(long teamUuid, long featureUuid);
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 e7bc39b335..fcb003820f 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
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.api.agile;
import java.util.Collection;
import java.util.List;
import org.eclipse.osee.ats.api.IAtsWorkItem;
+import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
@@ -101,4 +102,6 @@ public interface IAgileService {
XResultData storeSprintReports(long teamId, long sprintId);
+ Collection<IAtsTeamDefinition> getAtsTeams(IAgileTeam aTeam);
+
}
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 1bdb890534..e3d39124c3 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
@@ -11,6 +11,7 @@
package org.eclipse.osee.ats.api.ai;
import java.util.Collection;
+import java.util.List;
import java.util.Set;
import org.eclipse.osee.ats.api.IAtsObject;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
@@ -39,4 +40,6 @@ public interface IAtsActionableItemService {
Collection<IAtsTeamDefinition> getCorrespondingTeamDefinitions(IAtsObject atsObject);
+ List<IAtsActionableItem> getActiveActionableItemsAndChildren(IAtsTeamDefinition teamDef);
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java
index 75e1adbf45..77920870e8 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java
@@ -33,6 +33,7 @@ public class NewActionData {
String createdByUserId;
String transactionComment;
String needByDateLong;
+ String needByDate;
Map<String, String> attrValues = new HashMap<String, String>();
public NewActionData() {
@@ -151,4 +152,12 @@ public class NewActionData {
public void addAttrValue(AttributeTypeId type, String value) {
attrValues.put(type.getIdString(), value);
}
+
+ public String getNeedByDate() {
+ return needByDate;
+ }
+
+ public void setNeedByDate(String needByDate) {
+ this.needByDate = needByDate;
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsAttributeEndpointImplTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsAttributeEndpointImplTest.java
index 8e16cbb9dc..c76d58fb14 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsAttributeEndpointImplTest.java
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/resource/AtsAttributeEndpointImplTest.java
@@ -41,13 +41,13 @@ public class AtsAttributeEndpointImplTest extends AbstractRestTest {
@Test
public void testGetValidAssignees() throws Exception {
- JsonArray json = queryAndConfirmCount("ats/attr/Assignee", 20);
+ JsonArray json = queryAndConfirmCount("ats/attr/Assignee", 6);
Assert.assertEquals(DemoUsers.Alex_Kay.getName(), json.iterator().next().getAsString());
}
@Test
public void testGetValidOriginators() throws Exception {
- queryAndConfirmCount("ats/attr/Originator", 20);
+ queryAndConfirmCount("ats/attr/Originator", 6);
}
@Test
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
index a3cbff8b98..d495ff0ad8 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.IAtsWorkItem;
import org.eclipse.osee.ats.api.agile.IAgileService;
import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.config.JaxActionableItem;
import org.eclipse.osee.ats.api.config.JaxTeamDefinition;
import org.eclipse.osee.ats.api.data.AtsArtifactToken;
@@ -581,9 +582,15 @@ public class AtsClientImpl extends AtsCoreServiceImpl implements IAtsClient {
public String getApplicationServerBase() {
return OseeClientProperties.getOseeApplicationServer();
}
+
@Override
public Collection<ArtifactId> getArtifacts(IArtifactType artifactType) {
return Collections.castAll(ArtifactQuery.getArtifactListFromType(artifactType, getAtsBranch()));
}
+ @Override
+ public IAtsActionableItemService getActionableItemService() {
+ return actionableItemManager;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java
index 842849365b..10646d15d5 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileFactory.java
@@ -111,7 +111,12 @@ public class AgileFactory {
}
public static IAgileTeam getAgileTeam(Log logger, IAtsServices services, Object artifact) {
- return new AgileTeam(logger, services, (ArtifactToken) artifact);
+ IAgileTeam team = null;
+ if (artifact instanceof ArtifactId) {
+ ArtifactToken art = services.getArtifact((ArtifactId) artifact);
+ team = new AgileTeam(logger, services, art);
+ }
+ return team;
}
public static IAgileFeatureGroup createAgileFeatureGroup(Log logger, IAtsServices services, long teamUuid, String name, String guid, Long uuid) {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileService.java
index 0de2421580..510e850616 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileService.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileService.java
@@ -37,6 +37,7 @@ 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.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.core.agile.operations.SprintBurndownOperations;
import org.eclipse.osee.ats.core.agile.operations.SprintBurnupOperations;
@@ -462,4 +463,14 @@ public class AgileService implements IAgileService {
}
}
+ @Override
+ public Collection<IAtsTeamDefinition> getAtsTeams(IAgileTeam aTeam) {
+ List<IAtsTeamDefinition> teamDefs = new LinkedList<>();
+ for (ArtifactId teamArt : services.getRelationResolver().getRelated(aTeam.getStoreObject(),
+ AtsRelationTypes.AgileTeamToAtsTeam_AtsTeam)) {
+ teamDefs.add(services.getConfigItem(teamArt));
+ }
+ return teamDefs;
+ }
+
}
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 5e16af0896..b0c71365ec 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
@@ -12,6 +12,8 @@ package org.eclipse.osee.ats.core.ai;
import java.util.Collection;
import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import org.eclipse.osee.ats.api.IAtsObject;
@@ -19,12 +21,14 @@ 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.data.AtsRelationTypes;
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.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.util.Result;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -45,6 +49,26 @@ public class ActionableItemManager implements IAtsActionableItemService {
}
@Override
+ public List<IAtsActionableItem> getActiveActionableItemsAndChildren(IAtsTeamDefinition teamDef) {
+ List<IAtsActionableItem> ais = new LinkedList<>();
+ getActiveActionableItemsAndChildrenRecurse(teamDef, ais);
+ return ais;
+ }
+
+ private void getActiveActionableItemsAndChildrenRecurse(IAtsTeamDefinition teamDef, List<IAtsActionableItem> ais) {
+ for (ArtifactId aiArt : services.getRelationResolver().getRelated(teamDef,
+ AtsRelationTypes.TeamActionableItem_ActionableItem)) {
+ IAtsActionableItem ai = services.getConfigItem(aiArt);
+ if (ai.isActionable()) {
+ ais.add(ai);
+ }
+ }
+ for (IAtsTeamDefinition childTeamDef : teamDef.getChildrenTeamDefinitions()) {
+ getActiveActionableItemsAndChildrenRecurse(childTeamDef, ais);
+ }
+ }
+
+ @Override
public Set<IAtsActionableItem> getActionableItems(IAtsObject atsObject) throws OseeCoreException {
Set<IAtsActionableItem> ais = new HashSet<>();
if (!atsStoreService.isDeleted(atsObject)) {
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
index b76bdb12db..ae87feff9a 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java
@@ -93,15 +93,24 @@ public class ActionFactory implements IAtsActionFactory {
@Override
public ActionResult createAction(NewActionData data, IAtsChangeSet changes) {
IAtsUser asUser = services.getUserService().getUserById(data.getAsUserId());
- Conditions.assertNotNull(asUser, "asUser");
- IAtsUser createdBy = services.getUserService().getUserById(data.getCreatedByUserId());
- Conditions.assertNotNull(createdBy, "createdBy");
+ Conditions.assertNotNull(asUser, "As-User must be specified.");
+ IAtsUser createdBy = null;
+ if (Strings.isValid(data.getCreatedByUserId())) {
+ createdBy = services.getUserService().getUserById(data.getCreatedByUserId());
+ }
+ if (createdBy == null && Strings.isValid(data.getCreatedDateLong())) {
+ createdBy = services.getUserService().getUserByAccountId(Long.valueOf(data.getCreatedDateLong()));
+ }
+ Conditions.assertNotNull(createdBy, "Created-By must be specified.");
+ Conditions.assertNotNullOrEmpty(data.getAiIds(), "Actionable Items must be specified");
List<IAtsActionableItem> ais = new LinkedList<>();
for (String aiId : data.getAiIds()) {
IAtsActionableItem ai = services.getConfigItem(Long.valueOf(aiId));
- Conditions.assertNotNull(ai, "as");
+ Conditions.assertNotNull(ai, "Actionable Item must be specified.");
ais.add(ai);
}
+ Conditions.assertNotNull(data.getDescription(), "Description must be specified.");
+
Date needByDate = null;
if (Strings.isNumeric(data.getNeedByDateLong())) {
needByDate = new Date(Long.valueOf(data.getNeedByDateLong()));
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agile.css b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agile.css
index 062c2f2744..31beb54f37 100644
--- a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agile.css
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agile.css
@@ -19,6 +19,17 @@
height: 55px;
}
+#newActionForm {
+ width: 100% !important;
+ background: white;
+ forground: black;
+ margin: 10px;
+}
+
+#newActionButtonContainer {
+ margin: 0px;
+}
+
#backlogTable {
width: 100% !important;
}
@@ -66,5 +77,5 @@
}
.grid-align {
- text-align: center;
+ text-align: center;
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agileFactory.js b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agileFactory.js
index 8948642c1e..9753136c9e 100644
--- a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agileFactory.js
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/agileFactory.js
@@ -8,6 +8,7 @@ angular.module('AgileApp').factory('AgileFactory',
var teamResource = $resource('/ats/agile/team');
var teamSingleResource = $resource('/ats/agile/team/:uuid');
+ var teamAisResource = $resource('/ats/agile/team/:uuid/ai');
var featuresResource = $resource('/ats/agile/team/:uuid/feature');
var featureSingleResource = $resource('/ats/agile/team/:teamUuid/feature/:uuid');
var sprintResource = $resource('/ats/agile/team/:uuid/sprint');
@@ -17,6 +18,7 @@ angular.module('AgileApp').factory('AgileFactory',
var sprintItemsResource = $resource('/ats/agile/team/:teamId/sprint/:sprintId/item');
var backlogResource = $resource('/ats/agile/team/:uuid/backlog');
var backlogItemsResource = $resource('/ats/agile/team/:teamId/backlog/item');
+ var actionResource = $resource('/ats/action');
var itemResource = $resource('/ats/agile/items/:uuid',
{}, { 'update': { method:'PUT' } });
@@ -27,6 +29,10 @@ angular.module('AgileApp').factory('AgileFactory',
factory.updateStatus = function(data) {
return itemResource.update(data);
}
+
+ factory.createItem = function(data) {
+ return actionResource.save(data);
+ }
// ////////////////////////////////////
// Agile Teams
@@ -39,6 +45,10 @@ angular.module('AgileApp').factory('AgileFactory',
return teamSingleResource.get(team)
}
+ factory.getTeamAis = function(team) {
+ return teamAisResource.query(team)
+ }
+
factory.deleteTeam = function(team) {
return teamSingleResource.delete(team);
}
@@ -48,7 +58,6 @@ angular.module('AgileApp').factory('AgileFactory',
toPost.name = teamName;
toPost.active = true;
return teamResource.save(toPost);
-
}
// ////////////////////////////////////
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/app.js b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/app.js
index 1bef38ec6c..3884b3a8d4 100644
--- a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/app.js
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/app.js
@@ -30,6 +30,10 @@ app.config([ '$routeProvider', function($routeProvider) {
}).when('/report', {
templateUrl : 'report.html',
controller : 'ReportCtrl'
+ }).when('/newAction', {
+ templateUrl : 'newAction.html',
+ controller : 'NewActionCtrl',
+ caseInsensitiveMatch : true
}).otherwise({
redirectTo : "/teams"
});
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogAndSprint.html b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogAndSprint.html
index 107db0881d..5ff962bf2c 100644
--- a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogAndSprint.html
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogAndSprint.html
@@ -27,19 +27,19 @@
</select></td>
</tr>
</table>
- <td width="20%"></strong>
+ </td>
+ <td align="right">
+ <button type="button" class="btn btn-default btn-xs"
+ ng-click="openNewActionForTeam()">
+ <span class="glyphicon glyphicon-plus"></span>
+ </button>
<button type="button" class="btn btn-default btn-xs"
ng-click="updateItems()">
<span class="glyphicon glyphicon-refresh"></span>
- </button></td>
+ </button>
+ </td>
</tr>
</table>
- <span class="pull-right">
- <button type="button" class="btn btn-default btn-xs"
- ng-click="updateItems()">
- <span class="glyphicon glyphicon-refresh"></span>
- </button>
- </span>
</div>
<div ng-show="tasks" id="taskTable" class="gridStyle"
ng-grid="tasksGridOptions"></div>
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogCtrl.js b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogCtrl.js
index 0dd2ee1c3a..0a958f53bf 100644
--- a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogCtrl.js
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/backlogCtrl.js
@@ -133,7 +133,13 @@ angular
}
});
- // add backlog and sprints to pulldown and set default if specified as query parameter
+ $scope.openNewActionForTeam = function() {
+ window.location.assign("main#/newAction?team="
+ .concat($scope.team.uuid))
+ }
+
+ // add backlog and sprints to pulldown and set
+ // default if specified as query parameter
$scope.setupItemsPulldown = function() {
var loadingModal = PopupService
.showLoadingModal();
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/main.html b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/main.html
index a7cf9d6a1d..f0ac9e1b02 100644
--- a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/main.html
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/main.html
@@ -71,6 +71,7 @@
<script src="teamCtrl.js"></script>
<script src="reportCtrl.js"></script>
<script src="backlogCtrl.js"></script>
+ <script src="newActionCtrl.js"></script>
<script src="kanban/kanbanCtrl.js"></script>
<script src="kanban/ngDraggable.js"></script>
</body>
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/newAction.html b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/newAction.html
new file mode 100644
index 0000000000..bfd889f348
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/newAction.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+<body onload="zoom()">
+ <div class="container-fluid">
+ <div class="row col-lg-12"">
+ <div class="panel panel-primary" id="backlogContainer">
+ <div class="panel-heading" id="backlogHeader">
+ <table>
+ <tr>
+ <td width="15%">Team: <strong>{{teamName}}</strong>
+ </td>
+ <td width="30%" align="right"><strong>New Action</strong></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div id="newActionForm">
+ <form novalidate class="simple-form">
+
+ <!-- Title-->
+ <label>Title: <input type="text" ng-model="action.title"
+ width="100%" /></label><br />
+
+ <!-- Actionable Items-->
+ <label for="textarea">Actionable Item: </label>
+ <select ng-model="actionableItem"
+ ng-options="item.uuid as item.Name for item in validAis">
+ </select>
+
+ <!-- Description-->
+ <label for="textarea">Description: <textarea id="textarea"
+ rows name="Description" cols="40" ng-model="action.description"
+ rows="5"></textarea> <!-- Change Type--> <!-- Change Type-->
+ </label><br /> <label>Change Type:</label>&nbsp; <select id="changeType"
+ ng-model="action.changeType">
+ <option selected="selected" value="Improvement">Improvement</option>
+ <option value="Problem">Problem</option>
+ <option value="Refinement">Refinement</option>
+ <option value="Support">Support</option>
+ <br />
+
+ <!-- Priority-->
+ </select> <label>Priority:</label>&nbsp; <select id="priority"
+ ng-model="action.priority">
+ <option value="1">1 (High)</option>
+ <option value="2">2</option>
+ <option selected="selected" value="3">3 (Med)</option>
+ <option value="4">4</option>
+ <option value="5 (Low)">5</option>
+
+ <!-- Need-By Date-->
+ </select> <label>Need-By Date:</label> <input type="date" name="deadline"
+ ng-model="action.needByDate"><br />
+
+ <div id="newActionButtonContainer">
+ <br /> <input type="button" ng-click="reset()" value="Reset" />
+ <input type="submit" ng-click="createItem(action)" value="Create" />
+ </div>
+
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/newActionCtrl.js b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/newActionCtrl.js
new file mode 100644
index 0000000000..2a8541acea
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/newActionCtrl.js
@@ -0,0 +1,93 @@
+/**
+ * Agile Config Controller
+ */
+angular.module('AgileApp').controller(
+ 'NewActionCtrl',
+ [
+ '$scope',
+ 'AgileFactory',
+ '$resource',
+ '$window',
+ '$modal',
+ '$filter',
+ '$routeParams',
+ 'LayoutService',
+ 'PopupService',
+ function($scope, AgileFactory, $resource, $window, $modal,
+ $filter, $routeParams, LayoutService, PopupService) {
+
+ $scope.team = {};
+ $scope.team.uuid = $routeParams.team;
+ $scope.selectedTeam = {};
+ $scope.selectedTeam.name = "";
+ $scope.selectedTeam.backlog = "";
+ $scope.selectedTeam.sprint = "";
+ $scope.isLoaded = "";
+ $scope.action = {};
+
+ $scope.refresh = function() {
+ $scope.isLoaded = "";
+ var loadingModal = PopupService.showLoadingModal();
+ AgileFactory.getTeamSingle($scope.team).$promise
+ .then(function(data) {
+ $scope.selectedTeam = data;
+ $scope.teamName = data.name;
+ loadingModal.close();
+ $scope.isLoaded = "true";
+ });
+ AgileFactory.getTeamAis($scope.team).$promise
+ .then(function(data) {
+ $scope.validAis = data;
+ $scope.actionableItem = "";
+ });
+ }
+
+ $scope.reset = function() {
+ $scope.action.title = "";
+ $scope.action.actionableItems = "";
+ $scope.action.description = "";
+ $scope.action.changeType = "";
+ $scope.action.priority = "";
+ $scope.action.needByDate = "";
+ }
+
+ $scope.createItem = function() {
+ var loadingModal = null;
+ try {
+ $scope.action.asUserId = 99999999;
+ $scope.action.createdByUserId = 99999999;
+ if ($scope.actionableItem) {
+ $scope.action.aiIds = [];
+ $scope.action.aiIds[0] = $scope.actionableItem;
+ }
+ loadingModal = PopupService.showLoadingModal();
+ AgileFactory.createItem($scope.action).$promise
+ .then(function(data) {
+ // open new tab to new action
+ if (data.results.numErrors > 0) {
+ alert(data.results.results);
+ } else {
+ var url = "/ats/ui/action/" + data.teamWfs[0];
+ var win = window.open(url, '_blank');
+ if (win) {
+ // Browser has allowed it to be opened
+ win.focus();
+ } else {
+ // Browser has blocked it
+ alert('Action Created; Please allow popups for this site.');
+ }
+ }
+ loadingModal.close();
+ }).catch((err) => {
+ loadingModal.close();
+ alert(err);
+ });
+ } finally {
+ if(loadingModal) {
+ loadingModal.close();
+ }
+ }
+ };
+ $scope.refresh();
+
+ } ]);
diff --git a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/teamsCtrl.js b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/teamsCtrl.js
index d791a10786..f322422e07 100644
--- a/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/teamsCtrl.js
+++ b/plugins/org.eclipse.osee.ats.rest/OSEE-INF/web/agileui/teamsCtrl.js
@@ -33,6 +33,7 @@ angular
var openBurnupImpl = '<button class="btn btn-default btn-sm" ng-click="openBurnup(row.entity)">Burn-Up</button>';
var openSummaryImpl = '<button class="btn btn-default btn-sm" ng-click="openSummary(row.entity)">Summary</button>';
var openDataImpl = '<button class="btn btn-default btn-sm" ng-click="openData(row.entity)">Data</button>';
+ var openNewActionImpl = '<button class="btn btn-default btn-sm" ng-click="openNewAction(row.entity)">New Action</button>';
$scope.teamGridOptions = {
data : 'teams',
@@ -154,6 +155,11 @@ angular
.concat(team.uuid).concat("&default=backlog"))
}
+ $scope.openNewAction = function(team) {
+ window.location.assign("main#/newAction?team="
+ .concat(team.uuid))
+ }
+
$scope.openSprint = function(team) {
window.location.assign("main#/sprint?team="
.concat(team.uuid).concat("&default=sprint"))
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 c8d5f31751..9369d2d8f0 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
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.rest;
import java.util.Collection;
import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
import org.eclipse.osee.ats.api.IAtsServices;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.config.AtsConfigEndpointApi;
import org.eclipse.osee.ats.api.notify.IAtsNotifier;
import org.eclipse.osee.ats.api.review.IAtsReviewServiceProvider;
@@ -72,6 +73,9 @@ public interface IAtsServer extends IAtsServices, IAtsNotifier, IAtsConfigItemFa
@Override
IAtsChangeSet createChangeSet(String string, IAtsUser systemUser);
+ @Override
IAtsTeamWorkflow getTeamWf(Long id);
+ IAtsActionableItemService getActionableItemService();
+
} \ 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 5da9ebeacb..c52bf26c42 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
@@ -25,6 +25,7 @@ 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.agile.IAgileService;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItemService;
import org.eclipse.osee.ats.api.config.AtsConfigEndpointApi;
import org.eclipse.osee.ats.api.config.AtsConfigurations;
import org.eclipse.osee.ats.api.data.AtsArtifactToken;
@@ -485,9 +486,16 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
public IAtsTeamWorkflow getTeamWf(Long id) {
return getWorkItemFactory().getTeamWf(services.getArtifact(id));
}
+
+ @Override
public Collection<ArtifactId> getArtifacts(IArtifactType artifactType) {
return org.eclipse.osee.framework.jdk.core.util.Collections.castAll(
orcsApi.getQueryFactory().fromBranch(getAtsBranch()).andIsOfType(artifactType).getResults().getList());
}
+ @Override
+ public IAtsActionableItemService getActionableItemService() {
+ return actionableItemManager;
+ }
+
} \ 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 175287f099..3f833f8eb8 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
@@ -15,6 +15,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import javax.ws.rs.GET;
@@ -53,9 +54,11 @@ 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.agile.kanban.JaxKbSprint;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
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.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.ILineChart;
import org.eclipse.osee.ats.api.workflow.JaxAtsObjects;
@@ -68,6 +71,7 @@ import org.eclipse.osee.ats.rest.IAtsServer;
import org.eclipse.osee.ats.rest.internal.agile.operations.KanbanOperations;
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.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -79,6 +83,8 @@ import org.eclipse.osee.framework.jdk.core.util.AHTML;
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.NamedComparator;
+import org.eclipse.osee.framework.jdk.core.util.SortOrder;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.jaxrs.OseeWebApplicationException;
import org.eclipse.osee.orcs.data.ArtifactReadable;
@@ -129,6 +135,20 @@ public class AgileEndpointImpl implements AgileEndpointApi {
}
@Override
+ @Path("team/{teamId}/ai")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public List<IAtsActionableItem> getActionableAis(@PathParam("teamId") ArtifactId teamId) {
+ IAgileTeam aTeam = atsServer.getAgileService().getAgileTeam(teamId);
+ List<IAtsActionableItem> ais = new LinkedList<>();
+ for (IAtsTeamDefinition teamDef : atsServer.getAgileService().getAtsTeams(aTeam)) {
+ ais.addAll(atsServer.getActionableItemService().getActiveActionableItemsAndChildren(teamDef));
+ }
+ Collections.sort(ais, new NamedComparator(SortOrder.ASCENDING));
+ return ais;
+ }
+
+ @Override
public Response createTeam(JaxNewAgileTeam newTeam) {
// validate title
if (!Strings.isValid(newTeam.getName())) {
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TeamResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TeamResource.java
index 5befaf7cd7..ab9e7809a9 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TeamResource.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TeamResource.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ats.rest.internal.config;
+import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import javax.ws.rs.GET;
@@ -18,10 +19,14 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.eclipse.osee.ats.api.IAtsServices;
+import org.eclipse.osee.ats.api.ai.IAtsActionableItem;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
import org.eclipse.osee.ats.api.version.IAtsVersion;
import org.eclipse.osee.ats.rest.util.AbstractConfigResource;
+import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.jdk.core.util.NamedComparator;
+import org.eclipse.osee.framework.jdk.core.util.SortOrder;
/**
* Donald G. Dunne
@@ -45,4 +50,18 @@ public class TeamResource extends AbstractConfigResource {
return versions;
}
+ @Path("{id}/ai")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public List<IAtsActionableItem> getActionableAis(@PathParam("id") ArtifactId teamId) {
+ IAtsTeamDefinition teamDef = services.getConfigItem(teamId);
+ if (teamDef != null) {
+ List<IAtsActionableItem> ais =
+ services.getActionableItemService().getActiveActionableItemsAndChildren(teamDef);
+ Collections.sort(ais, new NamedComparator(SortOrder.ASCENDING));
+ return ais;
+ }
+ return Collections.emptyList();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java
index e0dd4fca0c..c75dca4b0b 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java
@@ -452,6 +452,7 @@ public final class AtsActionEndpointImpl implements AtsActionEndpointApi {
@Override
@POST
@Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
public NewActionResult createAction(NewActionData newActionData) {
NewActionResult result = new NewActionResult();
try {
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java
index 887f50f63c..c27a8aec61 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Conditions.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.jdk.core.util;
import java.util.Arrays;
import java.util.Collection;
-import java.util.List;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -193,7 +192,7 @@ public final class Conditions {
}
}
- public static void assertNotNullOrEmpty(List<String> values, String message, Object... data) {
+ public static void assertNotNullOrEmpty(Collection<String> values, String message, Object... data) {
if (values == null || values.isEmpty()) {
throw new OseeArgumentException(message, data);
}

Back to the top