Skip to content

Commit a05ae2b

Browse files
Merge branch 'main' into RevertJacksonVersion
2 parents a05452a + 441727f commit a05ae2b

File tree

55 files changed

+1159
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1159
-105
lines changed

plugins/org.eclipse.osee.ats.api/META-INF/MANIFEST.MF

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Export-Package: org.eclipse.osee.ats.api,
4141
org.eclipse.osee.ats.api.task,
4242
org.eclipse.osee.ats.api.task.create,
4343
org.eclipse.osee.ats.api.task.related,
44+
org.eclipse.osee.ats.api.task.track,
4445
org.eclipse.osee.ats.api.team,
4546
org.eclipse.osee.ats.api.user,
4647
org.eclipse.osee.ats.api.util,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*********************************************************************
2+
* Copyright (c) 2024 Boeing
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* Boeing - initial API and implementation
12+
**********************************************************************/
13+
package org.eclipse.osee.ats.api.task.track;
14+
15+
/**
16+
* @author Donald G. Dunne
17+
*/
18+
public class TaskTrackItem {
19+
20+
String title;
21+
String assigneesArtIds;
22+
String description;
23+
String supportingAtsId;
24+
25+
public TaskTrackItem() {
26+
// for jax-rs
27+
}
28+
29+
public String getTitle() {
30+
return title;
31+
}
32+
33+
public void setTitle(String title) {
34+
this.title = title;
35+
}
36+
37+
public String getAssigneesArtIds() {
38+
return assigneesArtIds;
39+
}
40+
41+
public void setAssigneesArtIds(String assigneesArtIds) {
42+
this.assigneesArtIds = assigneesArtIds;
43+
}
44+
45+
public String getDescription() {
46+
return description;
47+
}
48+
49+
public void setDescription(String description) {
50+
this.description = description;
51+
}
52+
53+
public String getSupportingAtsId() {
54+
return supportingAtsId;
55+
}
56+
57+
public void setSupportingAtsId(String supportingAtsId) {
58+
this.supportingAtsId = supportingAtsId;
59+
}
60+
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*********************************************************************
2+
* Copyright (c) 2024 Boeing
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* Boeing - initial API and implementation
12+
**********************************************************************/
13+
package org.eclipse.osee.ats.api.task.track;
14+
15+
import java.util.ArrayList;
16+
import java.util.List;
17+
18+
/**
19+
* @author Donald G. Dunne
20+
*/
21+
public class TaskTrackItems {
22+
23+
List<TaskTrackItem> tasks = new ArrayList<>();
24+
25+
public TaskTrackItems() {
26+
// for jax-rs
27+
}
28+
29+
public List<TaskTrackItem> getTasks() {
30+
return tasks;
31+
}
32+
33+
public void setTasks(List<TaskTrackItem> tasks) {
34+
this.tasks = tasks;
35+
}
36+
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
/*********************************************************************
2+
* Copyright (c) 2024 Boeing
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* Boeing - initial API and implementation
12+
**********************************************************************/
13+
package org.eclipse.osee.ats.api.task.track;
14+
15+
import java.util.HashMap;
16+
import java.util.Map;
17+
import org.eclipse.osee.ats.api.team.ChangeTypes;
18+
import org.eclipse.osee.framework.core.data.ArtifactToken;
19+
import org.eclipse.osee.framework.jdk.core.result.XResultData;
20+
21+
/**
22+
* @author Donald G. Dunne
23+
*/
24+
public class TaskTrackingData {
25+
26+
// User initiating request. Will author tx and be Originator
27+
String asUserArtId;
28+
String title;
29+
String description;
30+
ChangeTypes changeType;
31+
String priority;
32+
// Actionable Item for new Team Workflow
33+
String aiArtId;
34+
XResultData results = new XResultData();
35+
String transactionComment;
36+
Map<String, String> attrValues = new HashMap<>();
37+
TaskTrackItems trackItems = new TaskTrackItems();
38+
// Artifact on Common containing additional tasks to create
39+
String taskTrackArtId;
40+
String transitionTo;
41+
String assignees; // Comma-separated list of assignee Artifact IDs
42+
ArtifactToken teamWf = ArtifactToken.SENTINEL;
43+
44+
public TaskTrackingData() {
45+
// jax-rs
46+
}
47+
48+
public String getTitle() {
49+
return title;
50+
}
51+
52+
public void setTitle(String title) {
53+
this.title = title;
54+
}
55+
56+
public String getDescription() {
57+
return description;
58+
}
59+
60+
public void setDescription(String description) {
61+
this.description = description;
62+
}
63+
64+
public ChangeTypes getChangeType() {
65+
return changeType;
66+
}
67+
68+
public void setChangeType(ChangeTypes changeType) {
69+
this.changeType = changeType;
70+
}
71+
72+
public String getPriority() {
73+
return priority;
74+
}
75+
76+
public void setPriority(String priority) {
77+
this.priority = priority;
78+
}
79+
80+
public String getTransactionComment() {
81+
return transactionComment;
82+
}
83+
84+
public void setTransactionComment(String transactionComment) {
85+
this.transactionComment = transactionComment;
86+
}
87+
88+
public Map<String, String> getAttrValues() {
89+
return attrValues;
90+
}
91+
92+
public void setAttrValues(Map<String, String> attrValues) {
93+
this.attrValues = attrValues;
94+
}
95+
96+
public String getAssignees() {
97+
return assignees;
98+
}
99+
100+
public void setAssignees(String assignees) {
101+
this.assignees = assignees;
102+
}
103+
104+
public XResultData getResults() {
105+
return results;
106+
}
107+
108+
public void setResults(XResultData results) {
109+
this.results = results;
110+
}
111+
112+
public String getAsUserArtId() {
113+
return asUserArtId;
114+
}
115+
116+
public void setAsUserArtId(String asUserArtId) {
117+
this.asUserArtId = asUserArtId;
118+
}
119+
120+
public TaskTrackItems getTrackItems() {
121+
return trackItems;
122+
}
123+
124+
public void setTrackItems(TaskTrackItems trackItems) {
125+
this.trackItems = trackItems;
126+
}
127+
128+
public String getAiArtId() {
129+
return aiArtId;
130+
}
131+
132+
public void setAiArtId(String aiArtId) {
133+
this.aiArtId = aiArtId;
134+
}
135+
136+
public String getTaskTrackArtId() {
137+
return taskTrackArtId;
138+
}
139+
140+
public void setTaskTrackArtId(String taskTrackArtId) {
141+
this.taskTrackArtId = taskTrackArtId;
142+
}
143+
144+
public String getTransitionTo() {
145+
return transitionTo;
146+
}
147+
148+
public void setTransitionTo(String transitionTo) {
149+
this.transitionTo = transitionTo;
150+
}
151+
152+
public ArtifactToken getTeamWf() {
153+
return teamWf;
154+
}
155+
156+
public void setTeamWf(ArtifactToken teamWf) {
157+
this.teamWf = teamWf;
158+
}
159+
160+
}

plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/ExportChangeReportUtil.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ public class ExportChangeReportUtil {
2424
public static final ArtifactTypeToken[] ARTIFACT_ALLOW_TYPES = {
2525
CoreArtifactTypes.AbstractSoftwareRequirement,
2626
CoreArtifactTypes.AbstractImplementationDetails,
27-
CoreArtifactTypes.InterfaceRequirementMsWord,
28-
CoreArtifactTypes.HeadingMsWord};
27+
CoreArtifactTypes.InterfaceRequirementMsWord}; // HeadingMSWord removed
2928
}

plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/ActionResult.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.util.LinkedList;
1818
import java.util.List;
1919
import org.eclipse.osee.framework.core.data.ArtifactId;
20+
import org.eclipse.osee.framework.core.data.ArtifactToken;
2021
import org.eclipse.osee.framework.jdk.core.result.XResultData;
2122

2223
/**
@@ -49,8 +50,8 @@ public Collection<IAtsTeamWorkflow> getTeamWfs() {
4950
return teamWfs;
5051
}
5152

52-
public Collection<ArtifactId> getTeamWfArts() {
53-
List<ArtifactId> arts = new LinkedList<>();
53+
public Collection<ArtifactToken> getTeamWfArts() {
54+
List<ArtifactToken> arts = new LinkedList<>();
5455
for (IAtsTeamWorkflow team : teamWfs) {
5556
arts.add(team.getStoreObject());
5657
}

plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/AtsActionEndpointApi.java

+10-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.eclipse.osee.ats.api.IAtsWorkItem;
3636
import org.eclipse.osee.ats.api.agile.jira.JiraByEpicData;
3737
import org.eclipse.osee.ats.api.agile.jira.JiraDiffData;
38+
import org.eclipse.osee.ats.api.task.track.TaskTrackingData;
3839
import org.eclipse.osee.ats.api.workflow.cr.bit.model.BuildImpactDatas;
3940
import org.eclipse.osee.ats.api.workflow.journal.JournalData;
4041
import org.eclipse.osee.ats.api.workflow.transition.TransitionData;
@@ -57,10 +58,6 @@
5758
@Swagger
5859
public interface AtsActionEndpointApi {
5960

60-
@GET
61-
@Produces(MediaType.TEXT_HTML)
62-
String get();
63-
6461
/**
6562
* @param ids (atsId, artId) of action to display
6663
* @return html representation of the action
@@ -365,4 +362,13 @@ public List<String> getRelatedRequirements(@PathParam("workflowId") ArtifactId w
365362
@POST
366363
@Produces(MediaType.APPLICATION_JSON)
367364
public boolean setApproval(@PathParam("id") String atsId);
365+
366+
/**
367+
* See AtsTaskTrackingDesign.md for design and use
368+
*/
369+
@Path("tasktrack")
370+
@POST
371+
@Consumes(MediaType.APPLICATION_JSON)
372+
@Produces(MediaType.APPLICATION_JSON)
373+
public TaskTrackingData createUpdateTaskTrack(TaskTrackingData taskTrackingData);
368374
}

plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/AtsTeamWfEndpointApi.java

+5
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ int getSearchResultCount(@QueryParam("search") String search, @QueryParam("origi
122122
@Path("release/{release}")
123123
@Produces(MediaType.APPLICATION_JSON)
124124
Collection<ArtifactToken> getWfByRelease(@PathParam("release") String releaseName);
125+
126+
@GET
127+
@Path("release/id/{release}")
128+
@Produces(MediaType.APPLICATION_JSON)
129+
Collection<ArtifactToken> getWfByReleaseById(@PathParam("release") ArtifactId releaseId);
125130

126131
@PUT
127132
@Path("build/{build}")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# ATS Task Tracking Documentation/Design
2+
3+
* <a href="../workflow/AtsWorkflowLinks.md">ATS Workflow Links</a>
4+
5+
### Purpose
6+
Task Tracking is a generic REST accessible feature that allows for the creation of an action/team workflow
7+
and tasks using json. This capability is useful when a user wants to track anything with a set or changing
8+
set of steps.
9+
10+
Example: Generating readiness reviews for a release process where some tasks are
11+
dynamic and related to code commits and some reviews are static where you must do these steps/tasks on
12+
every release.
13+
14+
### Design
15+
16+
#### Creating a new Action/Team Workflow and Tasks using a REST call
17+
18+
* POST to <server>/ats/action/tasktrack with appropriate credentials and json payload
19+
* A new Action/Team Workflow will be created if it does not already exist.
20+
** Action Title MUST be unique
21+
** Use appropriate Actionable Item artifact id for action creation
22+
* See TaskTrackingDataExampleCreate.json in org.eclipse.osee.ats.ide.integration.tests/OSEE-INF/taskTrack for an example of the json to send it.
23+
* The resulting XResultData object will contain errors if something went wrong
24+
25+
#### Using database configured tasks during REST call
26+
27+
* If json payload to REST call contains <b>"taskTrackArtId" : "485234857",</b> (see example), the artifact with the art id (eg: 485234857) will be read for other tasks to create
28+
* This supports tasks that should always be created
29+
* A General Data artifact should be created on the Common branch.
30+
* See TaskTrackStaticArtExample.json for example of what to add as a single General String Data attribute
31+
32+
33+
#### Adding new tasks using successive REST calls
34+
35+
* Successive POSTs with json payload will create any new tasks if names don't match an existing task
36+
* Search of action/workflow is by name. If duplicate workflow names exist, operation will fail.
37+
* Tasks will NOT be duplicated/updated if they were already created
38+
39+
#### Relating tasks to "Supporting" Common branch Team Workflows
40+
41+
* If a task entry contains <b>"supportingAtsId" : "TW10"</b> (see example), then the task that is generated will be linked (using SupportingInfo relation) to that workflow. This TW number MUST be valid if it is used.
42+
43+
#### Task Assignees
44+
45+
* If a task entry contains <b>"assigneesArtIds" : "277990", "comment": "Jason Michael",</b>, then the user art id (eg: 277990) will be used to set the assignee of that task.
46+
* If multiple assignees are desired, you can use a comma delimited list of user art ids (eg: 277990,23244)
47+
* Note: "comment" json tag is not read or used by this feature, in this example it is used to show the name of the configured user so it is easy for someone to read when configuring / updating the json payload. This is because json does not provide a comment feature.
48+
49+
#### Example and Testing
50+
51+
This feature is tested by TaskTrackingOperationTest.java in the ATS Integration Test Suite. Running those test and loading the Action/Workflow/Tasks will show the capability in action. It also shows/tests the static db configured tasks in the created artifact TaskTrackItemsArt also in that test class.
52+
53+
#### Improvement of payload
54+
55+
TaskTrackDataMain.java can be used to generate the example payloads if the fields of TaskItem or TaskTrackItems or TaskTrackingData changes. This is a stand-alone java class that can just be run with right-click > Debug-As > Java Application

0 commit comments

Comments
 (0)