Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-10-08 14:04:30 -0400
committerRyan D. Brooks2010-10-08 14:04:30 -0400
commita1736c664449df12da081cef6f60a280e97a8964 (patch)
tree3012ce6e1e0062e0eefc6a771c8e67f202dd58ca /plugins/org.eclipse.osee.coverage
parentb27220fb9d37d7620a6f79e4ab7b39203a12d0fd (diff)
downloadorg.eclipse.osee-a1736c664449df12da081cef6f60a280e97a8964.tar.gz
org.eclipse.osee-a1736c664449df12da081cef6f60a280e97a8964.tar.xz
org.eclipse.osee-a1736c664449df12da081cef6f60a280e97a8964.zip
bug: Coverage changes got overwritten for relating to work products by guid versus link
Diffstat (limited to 'plugins/org.eclipse.osee.coverage')
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/DbWorkProductTaskProvider.java26
1 files changed, 3 insertions, 23 deletions
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/DbWorkProductTaskProvider.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/DbWorkProductTaskProvider.java
index be32af3d64..b514dc48f0 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/DbWorkProductTaskProvider.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/store/DbWorkProductTaskProvider.java
@@ -16,7 +16,6 @@ import org.eclipse.osee.coverage.model.CoveragePackage;
import org.eclipse.osee.coverage.model.IWorkProductTaskProvider;
import org.eclipse.osee.coverage.model.WorkProductAction;
import org.eclipse.osee.coverage.model.WorkProductTask;
-import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.logging.OseeLevel;
@@ -24,8 +23,6 @@ import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import org.eclipse.osee.framework.skynet.core.relation.crossbranch.CrossBranchLinkManager;
-import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.cm.IOseeCmService;
@@ -97,20 +94,12 @@ public class DbWorkProductTaskProvider implements IWorkProductTaskProvider {
try {
OseeCoveragePackageStore store = OseeCoveragePackageStore.get(coveragePackage, branch);
Artifact artifact = store.getArtifact(false);
- SkynetTransaction transaction = new SkynetTransaction(branch, "Un-Relate Coverage work product Actions");
List<String> relatedActionGuids =
artifact.getAttributesToStringList(CoverageAttributeTypes.WorkProductPcrGuid);
if (relatedActionGuids.contains(action.getGuid())) {
- artifact.deleteAttribute(CoverageAttributeTypes.WorkProductPcrGuid, action.getGuid());
-
- // remove links from Action to coverage package
- Artifact actionArt = ArtifactQuery.getArtifactFromId(action.getGuid(), BranchManager.getCommonBranch());
- CrossBranchLinkManager.deleteRelation(actionArt, CoreRelationTypes.SupportingInfo_SupportingInfo, artifact);
- actionArt.persist(transaction);
-
+ store.getArtifact(false).deleteAttribute(CoverageAttributeTypes.WorkProductPcrGuid, action.getGuid());
}
- artifact.persist(transaction);
- transaction.execute();
+ store.getArtifact(false).persist("Un-Relate Coverage work product Actions");
reload();
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
@@ -121,25 +110,16 @@ public class DbWorkProductTaskProvider implements IWorkProductTaskProvider {
public void addWorkProductAction(Collection<WorkProductAction> actions) {
try {
OseeCoveragePackageStore store = OseeCoveragePackageStore.get(coveragePackage, branch);
- SkynetTransaction transaction = new SkynetTransaction(branch, "Relate Coverage work product Actions");
Artifact artifact = store.getArtifact(false);
- // create links from coverage package to Actions
List<String> relatedActionGuids =
artifact.getAttributesToStringList(CoverageAttributeTypes.WorkProductPcrGuid);
for (WorkProductAction action : actions) {
if (!relatedActionGuids.contains(action.getGuid())) {
artifact.addAttribute(CoverageAttributeTypes.WorkProductPcrGuid, action.getGuid());
relatedActionGuids.add(action.getGuid());
-
- // create links from Action to coverage package
- Artifact actionArt = ArtifactQuery.getArtifactFromId(action.getGuid(), BranchManager.getCommonBranch());
- CrossBranchLinkManager.addRelation(actionArt, CoreRelationTypes.SupportingInfo_SupportingInfo, artifact);
- actionArt.persist(transaction);
}
}
-
- artifact.persist(transaction);
- transaction.execute();
+ artifact.persist("Relate Coverage work product Actions");
reload();
} catch (OseeCoreException ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);

Back to the top