Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-07-08 00:10:31 -0400
committerdonald.g.dunne2017-07-25 17:47:54 -0400
commit57e180699158cb2515e349a4ebcc66772d62454e (patch)
tree271a479ecb42648c724c50afa33e3367b0e00a67
parentdd8360b04137e33f12416e44596bf9ec78a9489c (diff)
downloadorg.eclipse.osee-57e180699158cb2515e349a4ebcc66772d62454e.tar.gz
org.eclipse.osee-57e180699158cb2515e349a4ebcc66772d62454e.tar.xz
org.eclipse.osee-57e180699158cb2515e349a4ebcc66772d62454e.zip
feature[ats_TW1161]: Create work package GUID removal conversion
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQuery.java3
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java10
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java19
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java6
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java10
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConvertAtsConfigGuidAttributesOperation.java144
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java11
-rw-r--r--plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee10
10 files changed, 194 insertions, 27 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQuery.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQuery.java
index e4d95fd224..a5232414fd 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQuery.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/query/IAtsQuery.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.api.workflow.WorkItemType;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
+import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.QueryOption;
@@ -125,5 +126,7 @@ public interface IAtsQuery {
IAtsQuery andVersion(IAtsVersion version);
IAtsQuery andName(String name, QueryOption... queryOption);
+
+ IAtsQuery andExists(AttributeTypeToken attributeType);
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java
index e0648fa7a6..e78bca846b 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsChangeSet.java
@@ -117,7 +117,7 @@ public interface IAtsChangeSet {
/**
* Will check if anything is to be stored, else return quietly.
*/
- void executeIfNeeded();
+ boolean executeIfNeeded();
/**
* User making these changes
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java
index 36bd00ed4c..d051f40fa9 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java
@@ -18,12 +18,12 @@ import java.util.List;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
-import org.eclipse.osee.ats.api.query.IAtsQuery;
import org.eclipse.osee.ats.core.client.internal.AtsClientService;
import org.eclipse.osee.ats.core.query.AbstractAtsQueryImpl;
import org.eclipse.osee.ats.core.query.AtsAttributeQuery;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
+import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.QueryOption;
@@ -151,9 +151,13 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl {
}
@Override
- public IAtsQuery andNotExists(AttributeTypeId attributeType) {
+ protected void queryAndNotExists(AttributeTypeId attributeType) {
query.andNotExists(attributeType);
- return this;
+ }
+
+ @Override
+ protected void queryAndExists(AttributeTypeToken attributeType) {
+ query.andExists(attributeType);
}
} \ No newline at end of file
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 ac40e8aaf6..41b29c56a9 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
@@ -75,13 +75,15 @@ public class ActionableItemManager implements IAtsActionableItemService {
@Override
public void addActionableItem(IAtsObject atsObject, IAtsActionableItem aia, IAtsChangeSet changes) throws OseeCoreException {
if (!getActionableItemIds(atsObject).contains(atsObject.getId())) {
- changes.addAttribute(atsObject, AtsAttributeTypes.ActionableItemReference, aia.getStoreObject());
+ changes.addAttribute(atsObject, AtsAttributeTypes.ActionableItemReference,
+ services.getArtifact(aia.getStoreObject()));
}
}
@Override
public void removeActionableItem(IAtsObject atsObject, IAtsActionableItem aia, IAtsChangeSet changes) throws OseeCoreException {
- changes.deleteAttribute(atsObject, AtsAttributeTypes.ActionableItemReference, aia.getIdString());
+ changes.deleteAttribute(atsObject, AtsAttributeTypes.ActionableItemReference,
+ services.getArtifact(aia.getStoreObject()));
}
@Override
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java
index a5cde45c2a..29effbd2ab 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java
@@ -43,6 +43,7 @@ import org.eclipse.osee.ats.core.util.AtsObjects;
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.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -1010,4 +1011,22 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery {
return this;
}
+ @Override
+ public IAtsQuery andNotExists(AttributeTypeId attributeType) {
+ createQueryBuilder();
+ queryAndNotExists(attributeType);
+ return this;
+ }
+
+ protected abstract void queryAndNotExists(AttributeTypeId attributeType);
+
+ @Override
+ public IAtsQuery andExists(AttributeTypeToken attributeType) {
+ createQueryBuilder();
+ queryAndExists(attributeType);
+ return this;
+ }
+
+ protected abstract void queryAndExists(AttributeTypeToken attributeType);
+
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java
index 6ba73b25c7..7dc5a16d46 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java
@@ -29,6 +29,7 @@ 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.data.RelationTypeSide;
+import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
@@ -158,9 +159,10 @@ public abstract class AbstractAtsChangeSet implements IAtsChangeSet {
}
@Override
- public void executeIfNeeded() {
+ public boolean executeIfNeeded() {
execptionIfEmpty = false;
- execute();
+ TransactionId trans = execute();
+ return trans != null && trans.isValid();
}
@Override
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 3596fc8625..f73c681537 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
@@ -286,11 +286,11 @@ public class AtsServerImpl extends AtsCoreServiceImpl implements IAtsServer {
loggedNotificationDisabled = true;
}
} else {
- workItemNotificationProcessor =
- new WorkItemNotificationProcessor(logger, this, workItemFactory, userService, attributeResolverService);
- notificationEventProcessor = new AtsNotificationEventProcessor(workItemNotificationProcessor, userService,
- getConfigValue("NoReplyEmail"));
- notificationEventProcessor.sendNotifications(notifications, notifiers);
+ // workItemNotificationProcessor =
+ // new WorkItemNotificationProcessor(logger, this, workItemFactory, userService, attributeResolverService);
+ // notificationEventProcessor = new AtsNotificationEventProcessor(workItemNotificationProcessor, userService,
+ // getConfigValue("NoReplyEmail"));
+ // notificationEventProcessor.sendNotifications(notifications, notifiers);
}
}
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConvertAtsConfigGuidAttributesOperation.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConvertAtsConfigGuidAttributesOperation.java
index f9931798d5..fe1ff5b1c1 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConvertAtsConfigGuidAttributesOperation.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConvertAtsConfigGuidAttributesOperation.java
@@ -11,12 +11,14 @@
package org.eclipse.osee.ats.rest.internal.config;
import java.util.Collection;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
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.data.AtsAttributeTypes;
+import org.eclipse.osee.ats.api.ev.IAtsWorkPackage;
import org.eclipse.osee.ats.api.program.IAtsProgram;
import org.eclipse.osee.ats.api.review.IAtsAbstractReview;
import org.eclipse.osee.ats.api.team.IAtsTeamDefinition;
@@ -31,6 +33,8 @@ import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.jdk.core.util.Strings;
/**
+ * See ConvertAtsConfigGuidAttributes for explanation of what this operation does.
+ *
* @author Donald G. Dunne
*/
public class ConvertAtsConfigGuidAttributesOperation {
@@ -40,6 +44,8 @@ public class ConvertAtsConfigGuidAttributesOperation {
AtsAttributeTypes.createType(1152921504606847201L, "Team Definition");
private final AttributeTypeToken ActionableItem = AtsAttributeTypes.createType(1152921504606847200L,
"Actionable Item", "Actionable Items that are impacted by this change.");
+ private final AttributeTypeToken WorkPackageGuid = AtsAttributeTypes.createType(1152921504606847876L,
+ "Work Package Guid", "Work Package for this Team Workflow, Review, Task or Goal");
public ConvertAtsConfigGuidAttributesOperation(IAtsServices services) {
this.services = services;
@@ -47,10 +53,15 @@ public class ConvertAtsConfigGuidAttributesOperation {
public XResultData createUpdateConfig(XResultData rd) {
+ System.err.println("starting");
+
// Convert Team Def and AIs for Team Workflow
List<ArtifactId> artIdList = new LinkedList<>();
- artIdList.addAll(services.getQueryService().createQuery(WorkItemType.TeamWorkflow).getItemIds());
- List<Collection<ArtifactId>> subDivide = Collections.subDivide(artIdList, 4000);
+ artIdList.addAll(services.getQueryService().createQuery(WorkItemType.TeamWorkflow).andNotExists(
+ AtsAttributeTypes.TeamDefinitionReference).getItemIds());
+ artIdList.addAll(
+ services.getQueryService().createQuery(WorkItemType.TeamWorkflow).andNotExists(TeamDefinition).getItemIds());
+ List<Collection<ArtifactId>> subDivide = Collections.subDivide(artIdList, 1000);
int size = subDivide.size(), count = 1;
for (Collection<ArtifactId> artIds : subDivide) {
services.getLogger().error(String.format("processing %s / %s", count++, size));
@@ -59,12 +70,54 @@ public class ConvertAtsConfigGuidAttributesOperation {
ids.add(art.getId());
}
Collection<ArtifactToken> allArtifacts = services.getArtifacts(ids);
- IAtsChangeSet changes = services.createChangeSet("Update Team Def and AI TeamWf GUIDs");
+ IAtsChangeSet changes = services.createChangeSet("Update TeamDef, AI and WorkPkg TeamWf GUIDs");
for (ArtifactToken art : allArtifacts) {
convertTeamDefinitionIfNeeded(changes, art);
convertActionableItemsIfNeeded(changes, art);
+ System.err.println(art.toStringWithId());
+ }
+ boolean changed = changes.executeIfNeeded();
+ if (changed) {
+ services.getLogger().error("================================== > executed");
+ }
+ try {
+ Thread.sleep(5 * 1000);
+ } catch (InterruptedException ex) {
+ // do nothing
+ }
+ }
+
+ List<ArtifactId> artIdList2 = new LinkedList<>();
+ artIdList2.addAll(
+ services.getQueryService().createQuery(WorkItemType.WorkItem).andNotExists(WorkPackageGuid).getItemIds());
+ artIdList2.addAll(services.getQueryService().createQuery(WorkItemType.WorkItem).andExists(
+ AtsAttributeTypes.WorkPackageReference).getItemIds());
+ List<Collection<ArtifactId>> subDivide2 = Collections.subDivide(artIdList2, 2000);
+ int size2 = subDivide2.size(), count2 = 1;
+ for (Collection<ArtifactId> artIds : subDivide2) {
+ services.getLogger().error(String.format("processing %s / %s", count2++, size2));
+ if (count2 < 252) {
+ continue;
+ }
+ List<Long> ids = new LinkedList<>();
+ for (ArtifactId art : artIds) {
+ ids.add(art.getId());
+ }
+ Collection<ArtifactToken> allArtifacts = services.getArtifacts(ids);
+ IAtsChangeSet changes = services.createChangeSet("Update Work Package GUIDs");
+ for (ArtifactToken art : allArtifacts) {
+ convertWorkPackageIfNeeded(changes, art);
+ // System.err.println(art.toStringWithId());
+ }
+ boolean changed = changes.executeIfNeeded();
+ if (changed) {
+ services.getLogger().error("================================== > executed");
+ }
+ try {
+ Thread.sleep(5 * 1000);
+ } catch (InterruptedException ex) {
+ // do nothing
}
- changes.executeIfNeeded();
}
// Convert Program Team Definition
@@ -95,30 +148,90 @@ public class ConvertAtsConfigGuidAttributesOperation {
}
private void convertActionableItemsIfNeeded(IAtsChangeSet changes, ArtifactToken art) {
+ // convert guids to id
Collection<IAttribute<Object>> aiRefAttrs =
services.getAttributeResolver().getAttributes(art, AtsAttributeTypes.ActionableItemReference);
List<Long> currentAiRefIds = new LinkedList<>();
for (IAttribute<Object> aiRefAttr : aiRefAttrs) {
- currentAiRefIds.add(aiRefAttr.getId());
+ currentAiRefIds.add(Long.valueOf(aiRefAttr.getValue().toString()));
}
List<Long> neededAiRefIds = new LinkedList<>();
for (IAttribute<?> attr : services.getAttributeResolver().getAttributes(art, ActionableItem)) {
String aiArtGuid = (String) attr.getValue();
IAtsActionableItem ai = services.getConfigItem(aiArtGuid);
- neededAiRefIds.add(ai.getId());
+ if (!currentAiRefIds.contains(ai.getId())) {
+ neededAiRefIds.add(ai.getId());
+ }
}
- if (!Collections.isEqual(currentAiRefIds, neededAiRefIds)) {
- List<Object> newSet = new LinkedList<>();
- for (Long id : neededAiRefIds) {
- newSet.add(id.toString());
+ for (Long need : neededAiRefIds) {
+ changes.addAttribute(art, AtsAttributeTypes.ActionableItemReference, need);
+ }
+
+ // convert id to guid
+ Collection<IAttribute<Object>> aiGuidAttrs = services.getAttributeResolver().getAttributes(art, ActionableItem);
+ List<String> currentAiGuidIds = new LinkedList<>();
+ for (IAttribute<Object> aiRefAttr : aiGuidAttrs) {
+ currentAiGuidIds.add(aiRefAttr.getValue().toString());
+ }
+
+ List<String> neededAiGuidIds = new LinkedList<>();
+ for (String id : services.getAttributeResolver().getAttributesToStringList(art,
+ AtsAttributeTypes.ActionableItemReference)) {
+ IAtsActionableItem ai = services.getConfigItem(Long.valueOf(id));
+ if (!currentAiGuidIds.contains(ai.getStoreObject().getGuid())) {
+ neededAiGuidIds.add(ai.getStoreObject().getGuid());
}
- changes.setAttributeValues(art, AtsAttributeTypes.ActionableItemReference, newSet);
+ }
+
+ for (String guid : neededAiGuidIds) {
+ changes.addAttribute(art, ActionableItem, guid);
}
}
+ boolean workPackagesLoaded = false;
+
+ private void convertWorkPackageIfNeeded(IAtsChangeSet changes, ArtifactToken workItemArt) {
+ if (!workPackagesLoaded) {
+ for (ArtifactToken workPackageArt : services.getQueryService().getArtifacts(AtsArtifactTypes.WorkPackage,
+ services.getAtsBranch())) {
+ IAtsWorkPackage workPkg = services.getEarnedValueService().getWorkPackage(workPackageArt);
+ guidToWorkPackage.put(services.getStoreService().getGuid(workPkg), workPkg);
+ }
+ workPackagesLoaded = true;
+ }
+ // convert guid to id
+ ArtifactId workPackageId = services.getAttributeResolver().getSoleArtifactIdReference(workItemArt,
+ AtsAttributeTypes.WorkPackageReference, ArtifactId.SENTINEL);
+ if (workPackageId.isInvalid()) {
+ String workPackageGuid =
+ services.getAttributeResolver().getSoleAttributeValue(workItemArt, WorkPackageGuid, "");
+ if (Strings.isValid(workPackageGuid)) {
+ IAtsWorkPackage workPackage = guidToWorkPackage.get(workPackageGuid);
+ if (workPackage == null) {
+ System.err.println(String.format("Work Package null for guid %s", workPackageGuid));
+ } else {
+ changes.setSoleAttributeValue(workItemArt, AtsAttributeTypes.WorkPackageReference,
+ workPackage.getStoreObject().getId().toString());
+ }
+ }
+ }
+ // convert id to guid
+ String workPackageGuid = services.getAttributeResolver().getSoleAttributeValue(workItemArt, WorkPackageGuid, "");
+ if (Strings.isInValid(workPackageGuid)) {
+ ArtifactId workPackageArt = services.getAttributeResolver().getSoleArtifactIdReference(workItemArt,
+ AtsAttributeTypes.WorkPackageReference, ArtifactId.SENTINEL);
+ if (workPackageArt.isValid()) {
+ changes.setSoleAttributeValue(workItemArt, WorkPackageGuid, workPackageArt.getGuid());
+ }
+ }
+ }
+
+ java.util.Map<String, IAtsWorkPackage> guidToWorkPackage = new HashMap<>();
+
private void convertTeamDefinitionIfNeeded(IAtsChangeSet changes, ArtifactToken art) {
+ // convert guid to id
ArtifactId teamDefId = services.getAttributeResolver().getSoleArtifactIdReference(art,
AtsAttributeTypes.TeamDefinitionReference, ArtifactId.SENTINEL);
if (teamDefId.isInvalid()) {
@@ -129,6 +242,15 @@ public class ConvertAtsConfigGuidAttributesOperation {
teamDef.getStoreObject().getId().toString());
}
}
+ // convert id to guid
+ String teamDefGuid = services.getAttributeResolver().getSoleAttributeValue(art, TeamDefinition, "");
+ if (!Strings.isValid(teamDefGuid)) {
+ ArtifactId teamDefArt = services.getAttributeResolver().getSoleArtifactIdReference(art,
+ AtsAttributeTypes.TeamDefinitionReference, ArtifactId.SENTINEL);
+ if (teamDefArt.isValid()) {
+ changes.setSoleAttributeValue(art, TeamDefinition, teamDefArt.getGuid());
+ }
+ }
}
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java
index b0d84b6318..fb767221f6 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java
@@ -17,12 +17,12 @@ import java.util.LinkedList;
import java.util.List;
import org.eclipse.osee.ats.api.data.AtsArtifactTypes;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
-import org.eclipse.osee.ats.api.query.IAtsQuery;
import org.eclipse.osee.ats.core.query.AbstractAtsQueryImpl;
import org.eclipse.osee.ats.core.query.AtsAttributeQuery;
import org.eclipse.osee.ats.rest.IAtsServer;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
+import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.QueryOption;
@@ -152,8 +152,13 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl {
}
@Override
- public IAtsQuery andNotExists(AttributeTypeId attributeType) {
+ protected void queryAndNotExists(AttributeTypeId attributeType) {
query.andNotExists(attributeType);
- return this;
}
+
+ @Override
+ protected void queryAndExists(AttributeTypeToken attributeType) {
+ query.andExists(attributeType);
+ }
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee b/plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee
index 3c2bf2885a..56238b94ca 100644
--- a/plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee
+++ b/plugins/org.eclipse.osee.ats/support/OseeTypes_ATS.osee
@@ -203,6 +203,7 @@ abstract artifactType "ats.State Machine" extends "ats.Ats Artifact" {
attribute "ats.Cancelled Reason"
attribute "ats.Workflow Definition"
attribute "ats.Work Package Guid"
+ attribute "ats.Work Package Reference"
attribute "ats.Id"
attribute "ats.Unplanned Work"
attribute "ats.Peer Review Id"
@@ -533,6 +534,15 @@ attributeType "ats.Actionable Item Reference" extends ArtifactReferenceAttribute
mediaType "text/plain"
}
+attributeType "ats.Work Package Reference" extends ArtifactReferenceAttribute {
+ id 473096133909456789
+ dataProvider DefaultAttributeDataProvider
+ min 0
+ max 1
+ taggerId DefaultAttributeTaggerProvider
+ mediaType "text/plain"
+}
+
attributeType "ats.Work Package Id" extends StringAttribute {
id 1152921504606847872
dataProvider DefaultAttributeDataProvider

Back to the top