Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbroberts2020-12-08 22:04:50 +0000
committerRyan Brooks2020-12-11 19:24:55 +0000
commitee61c975c6b1deb2433958818a7774de3946ef6c (patch)
treef04c022f23fe8bb6b8c96264ea71452d9db7bfcf /plugins
parent58c7c310a4a69b899bf77f861115922339755ce2 (diff)
downloadorg.eclipse.osee-ee61c975c6b1deb2433958818a7774de3946ef6c.tar.gz
org.eclipse.osee-ee61c975c6b1deb2433958818a7774de3946ef6c.tar.xz
org.eclipse.osee-ee61c975c6b1deb2433958818a7774de3946ef6c.zip
bug[TW18480]: Have ats ide tests pass for postgres
Signed-off-by: broberts <baily.e.roberts@boeing.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java6
-rw-r--r--plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/operations/ValidateBranchOperation.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java2
-rw-r--r--plugins/org.eclipse.osee.support.config/launchConfig/osee.postgresql.json2
4 files changed, 6 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java
index 62b7c6acc88..89497a4afa7 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryService.java
@@ -162,7 +162,7 @@ public abstract class AbstractAtsQueryService implements IAtsQueryService {
ArtifactToken artifact = null;
try {
Collection<ArtifactToken> workItems =
- getArtifactsFromQuery(ATTR_QUERY, atsApi.getAtsBranch(), AtsAttributeTypes.AtsId.getIdString(), id);
+ getArtifactsFromQuery(ATTR_QUERY, atsApi.getAtsBranch(), AtsAttributeTypes.AtsId, id);
if (!workItems.isEmpty()) {
artifact = workItems.iterator().next();
}
@@ -176,7 +176,7 @@ public abstract class AbstractAtsQueryService implements IAtsQueryService {
public ArtifactToken getArtifactByLegacyPcrId(String id) {
try {
Collection<ArtifactToken> workItems =
- getArtifactsFromQuery(ATTR_QUERY, atsApi.getAtsBranch(), AtsAttributeTypes.LegacyPcrId.getIdString(), id);
+ getArtifactsFromQuery(ATTR_QUERY, atsApi.getAtsBranch(), AtsAttributeTypes.LegacyPcrId, id);
if (workItems.size() == 1) {
return workItems.iterator().next();
} else if (workItems.size() > 1) {
@@ -190,7 +190,7 @@ public abstract class AbstractAtsQueryService implements IAtsQueryService {
@Override
public Collection<ArtifactToken> getArtifactsByLegacyPcrId(String id) {
- return getArtifactsFromQuery(ATTR_QUERY, atsApi.getAtsBranch(), AtsAttributeTypes.LegacyPcrId.getIdString(), id);
+ return getArtifactsFromQuery(ATTR_QUERY, atsApi.getAtsBranch(), AtsAttributeTypes.LegacyPcrId, id);
}
@Override
diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/operations/ValidateBranchOperation.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/operations/ValidateBranchOperation.java
index 5474728ec2f..ca67d4b791f 100644
--- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/operations/ValidateBranchOperation.java
+++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/operations/ValidateBranchOperation.java
@@ -32,7 +32,7 @@ public class ValidateBranchOperation {
private final String FIND_CHILDREN_WITH_DUPLICATE_DEF_HIER_PARENTS =
"select the_count, b_art_id from ( SELECT count(*) the_count , B_ART_ID FROM OSEE_RELATION_LINK lin, " //
+ "OSEE_TXS txs WHERE txs.BRANCH_ID = ? AND lin.REL_LINK_TYPE_ID = 2305843009213694292 " //
- + "AND txs.GAMMA_ID = lin.GAMMA_ID AND txs.TX_CURRENT = 1 GROUP BY B_ART_ID ) where the_count > 1";
+ + "AND txs.GAMMA_ID = lin.GAMMA_ID AND txs.TX_CURRENT = 1 GROUP BY B_ART_ID ) AS alias where the_count > 1";
private final BranchId branch;
private final JdbcClient jdbcClient;
private final XResultData results;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
index 4f9c370b56a..fcea2e1a71d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java
@@ -936,7 +936,7 @@ public class ArtifactQuery {
"select txs.transaction_id from osee_artifact art, osee_attribute attr, " + //
"osee_txs txs, osee_tx_details txd where art.art_id = ? and " + //
"art.art_id = attr.art_id and attr.GAMMA_ID = txs.gamma_id and txs.TRANSACTION_ID = txd.TRANSACTION_ID " + //
- "and txs.BRANCH_ID = ?) " //
+ "and txs.BRANCH_ID = ?) AS alias " //
// order by latest transaction
+ "order by transaction_id desc ";
long transactionId = jdbcClient.fetch(-1L, query, artifact, artifact.getBranch(), artifact, artifact.getBranch());
diff --git a/plugins/org.eclipse.osee.support.config/launchConfig/osee.postgresql.json b/plugins/org.eclipse.osee.support.config/launchConfig/osee.postgresql.json
index c027fb0508a..b0365b8ca11 100644
--- a/plugins/org.eclipse.osee.support.config/launchConfig/osee.postgresql.json
+++ b/plugins/org.eclipse.osee.support.config/launchConfig/osee.postgresql.json
@@ -6,7 +6,7 @@
{
"service.id": "1001",
"jdbc.client.driver": "org.postgresql.Driver",
- "jdbc.client.db.uri": "jdbc:postgresql://localhost:5432/OSEE",
+ "jdbc.client.db.uri": "jdbc:postgresql://localhost:5432/osee",
"jdbc.client.db.username": "osee",
"jdbc.client.db.password": "osee",
"jdbc.client.connection.pool.enabled": "true"

Back to the top