Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/plugin.xml3
-rw-r--r--plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java3
-rw-r--r--plugins/org.eclipse.osee.ats.client.integration.tests/AtsClient_Integration_TestSuite.launch6
-rw-r--r--plugins/org.eclipse.osee.ats/schema/AtsWorkDefinitionSheetProvider.exsd7
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java79
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsItem.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java15
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java39
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ValidateWorkspaceToDatabaseWorkDefinitions.java69
-rw-r--r--plugins/org.eclipse.osee.ats/support/WorkDef_Task_Default.ats2
-rw-r--r--plugins/org.eclipse.osee.client.test.framework.p2/category.xml4
-rw-r--r--plugins/org.eclipse.osee.client.test.framework.p2/pom.xml2
13 files changed, 133 insertions, 104 deletions
diff --git a/plugins/org.eclipse.osee.ats.client.demo/plugin.xml b/plugins/org.eclipse.osee.ats.client.demo/plugin.xml
index d7e215e721..427efc483f 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/plugin.xml
+++ b/plugins/org.eclipse.osee.ats.client.demo/plugin.xml
@@ -55,7 +55,8 @@
name="DemoWorkDefinitionSheetProvider"
point="org.eclipse.osee.ats.AtsWorkDefinitionSheetProvider">
<AtsWorkDefinitionSheetProvider
- classname="org.eclipse.osee.ats.client.demo.config.DemoWorkDefinitionSheetProvider">
+ classname="org.eclipse.osee.ats.client.demo.config.DemoWorkDefinitionSheetProvider"
+ db_type="demo">
</AtsWorkDefinitionSheetProvider>
</extension>
<extension
diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java
index 6b382e5b42..01c35e6121 100644
--- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java
+++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDatabaseConfig.java
@@ -34,6 +34,7 @@ import org.eclipse.osee.ats.demo.api.DemoInsertionActivity;
import org.eclipse.osee.ats.demo.api.DemoProgram;
import org.eclipse.osee.ats.demo.api.DemoSubsystems;
import org.eclipse.osee.ats.demo.api.DemoUsers;
+import org.eclipse.osee.ats.workdef.AtsWorkDefinitionSheetProviders;
import org.eclipse.osee.framework.access.AccessControlManager;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
@@ -41,6 +42,7 @@ import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.exception.OseeWrappedException;
import org.eclipse.osee.framework.core.util.OsgiUtil;
+import org.eclipse.osee.framework.core.util.XResultData;
import org.eclipse.osee.framework.database.init.IDbInitializationTask;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.OseeSystemArtifacts;
@@ -66,6 +68,7 @@ public class DemoDatabaseConfig implements IDbInitializationTask {
@Override
public void run() throws OseeCoreException {
+ AtsWorkDefinitionSheetProviders.initializeDatabase(new XResultData(false), "demo");
TestUtil.setDemoDb(true);
// Create SAW_Bld_1 branch
diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/AtsClient_Integration_TestSuite.launch b/plugins/org.eclipse.osee.ats.client.integration.tests/AtsClient_Integration_TestSuite.launch
index 6e92c52ac8..4e1cf75d52 100644
--- a/plugins/org.eclipse.osee.ats.client.integration.tests/AtsClient_Integration_TestSuite.launch
+++ b/plugins/org.eclipse.osee.ats.client.integration.tests/AtsClient_Integration_TestSuite.launch
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<setAttribute key="additional_plugins">
-<setEntry value="org.eclipse.osee.ats.client.integration.tests:0.23.0.qualifier:default:true"/>
-<setEntry value="org.eclipse.osee.client.integration.tests:0.23.0.qualifier:default:true"/>
-<setEntry value="org.eclipse.osee.client.test.framework:0.23.0.qualifier:default:true"/>
+<setEntry value="org.eclipse.osee.ats.client.integration.tests:0.25.0.qualifier:default:true"/>
+<setEntry value="org.eclipse.osee.client.integration.tests:0.25.0.qualifier:default:true"/>
+<setEntry value="org.eclipse.osee.client.test.framework:0.25.0.qualifier:default:true"/>
<setEntry value="org.hamcrest.core:1.3.0.v201303031735:default:true"/>
</setAttribute>
<booleanAttribute key="append.args" value="true"/>
diff --git a/plugins/org.eclipse.osee.ats/schema/AtsWorkDefinitionSheetProvider.exsd b/plugins/org.eclipse.osee.ats/schema/AtsWorkDefinitionSheetProvider.exsd
index bc936c9161..6669e53f93 100644
--- a/plugins/org.eclipse.osee.ats/schema/AtsWorkDefinitionSheetProvider.exsd
+++ b/plugins/org.eclipse.osee.ats/schema/AtsWorkDefinitionSheetProvider.exsd
@@ -59,6 +59,13 @@
</appInfo>
</annotation>
</attribute>
+ <attribute name="db_type" type="string" use="required">
+ <annotation>
+ <documentation>
+ db_type indicates which database will be run during execution
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java
index e00c1c8d8b..78d9c803c2 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java
@@ -72,7 +72,7 @@ public class AtsDatabaseConfig implements IDbInitializationTask {
changes.setSoleAttributeValue(aia, AtsAttributeTypes.Actionable, false);
changes.execute();
- AtsWorkDefinitionSheetProviders.initializeDatabase(new XResultData(false));
+ AtsWorkDefinitionSheetProviders.initializeDatabase(new XResultData(false), "ats");
AtsGroup.AtsAdmin.getArtifact().persist(getClass().getSimpleName());
AtsGroup.AtsTempAdmin.getArtifact().persist(getClass().getSimpleName());
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java
index 293d86252c..6c32ee5417 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java
@@ -51,17 +51,17 @@ public final class AtsWorkDefinitionSheetProviders {
// Utility Class
}
- public static void initializeDatabase(XResultData resultData) throws OseeCoreException {
+ public static void initializeDatabase(XResultData resultData, String dbType) throws OseeCoreException {
IAtsChangeSet changes = AtsClientService.get().createChangeSet("Import ATS Work Definitions, Teams and AIs");
- Artifact folder =
- OseeSystemArtifacts.getOrCreateArtifact(AtsArtifactToken.WorkDefinitionsFolder, AtsClientService.get().getAtsBranch());
+ Artifact folder = OseeSystemArtifacts.getOrCreateArtifact(AtsArtifactToken.WorkDefinitionsFolder,
+ AtsClientService.get().getAtsBranch());
if (folder.isDirty()) {
changes.add(folder);
}
- List<WorkDefinitionSheet> sheets = getWorkDefinitionSheets();
+ List<WorkDefinitionSheet> sheets = getWorkDefinitionSheets(dbType);
Set<String> stateNames = new HashSet<>();
importWorkDefinitionSheets(resultData, changes, folder, sheets, stateNames);
- importTeamsAndAis(resultData, changes, folder, sheets);
+ importTeamsAndAis(resultData, changes, folder, sheets, dbType);
changes.execute();
}
@@ -77,17 +77,17 @@ public final class AtsWorkDefinitionSheetProviders {
}
}
- public static void importTeamsAndAis(XResultData resultData, IAtsChangeSet changes, Artifact folder, Collection<WorkDefinitionSheet> sheets) throws OseeCoreException {
+ public static void importTeamsAndAis(XResultData resultData, IAtsChangeSet changes, Artifact folder, Collection<WorkDefinitionSheet> sheets, String dbType) throws OseeCoreException {
for (WorkDefinitionSheet sheet : sheets) {
OseeLog.logf(Activator.class, Level.INFO, "Importing ATS Teams and AIs [%s]", sheet.getName());
importAIsAndTeamsToDb(sheet, changes);
}
}
- public static void importAIsAndTeamsToDatabase() throws OseeCoreException {
+ public static void importAIsAndTeamsToDatabase(String dbType) throws OseeCoreException {
IAtsChangeSet changes = AtsClientService.get().createChangeSet("Import ATS AIs and Team Definitions");
- for (WorkDefinitionSheet sheet : getWorkDefinitionSheets()) {
+ for (WorkDefinitionSheet sheet : getWorkDefinitionSheets(dbType)) {
OseeLog.logf(Activator.class, Level.INFO, "Importing ATS AIs and Teams sheet [%s]", sheet.getName());
importAIsAndTeamsToDb(sheet, changes);
}
@@ -101,23 +101,25 @@ public final class AtsWorkDefinitionSheetProviders {
importer.execute();
}
- public static List<WorkDefinitionSheet> getWorkDefinitionSheets() {
+ public static List<WorkDefinitionSheet> getWorkDefinitionSheets(String dbType) {
List<WorkDefinitionSheet> sheets = new ArrayList<>();
- sheets.add(new WorkDefinitionSheet(WORK_DEF_TEAM_DEFAULT,
- getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Team_Default.ats")));
- sheets.add(new WorkDefinitionSheet("WorkDef_Task_Default",
- getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Task_Default.ats")));
- sheets.add(new WorkDefinitionSheet("WorkDef_Review_Decision",
- getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Review_Decision.ats")));
- sheets.add(new WorkDefinitionSheet("WorkDef_Review_PeerToPeer",
- getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Review_PeerToPeer.ats")));
- sheets.add(new WorkDefinitionSheet("WorkDef_Team_Simple",
- getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Team_Simple.ats")));
- sheets.add(
- new WorkDefinitionSheet("WorkDef_Goal", getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Goal.ats")));
- sheets.add(
- new WorkDefinitionSheet("WorkDef_Sprint", getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Sprint.ats")));
- for (IAtsWorkDefinitionSheetProvider provider : getProviders()) {
+ if (dbType.equals("ats")) {
+ sheets.add(new WorkDefinitionSheet(WORK_DEF_TEAM_DEFAULT,
+ getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Team_Default.ats")));
+ sheets.add(new WorkDefinitionSheet("WorkDef_Task_Default",
+ getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Task_Default.ats")));
+ sheets.add(new WorkDefinitionSheet("WorkDef_Review_Decision",
+ getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Review_Decision.ats")));
+ sheets.add(new WorkDefinitionSheet("WorkDef_Review_PeerToPeer",
+ getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Review_PeerToPeer.ats")));
+ sheets.add(new WorkDefinitionSheet("WorkDef_Team_Simple",
+ getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Team_Simple.ats")));
+ sheets.add(
+ new WorkDefinitionSheet("WorkDef_Goal", getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Goal.ats")));
+ sheets.add(new WorkDefinitionSheet("WorkDef_Sprint",
+ getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Sprint.ats")));
+ }
+ for (IAtsWorkDefinitionSheetProvider provider : getProviders(dbType)) {
sheets.addAll(provider.getWorkDefinitionSheets());
}
return sheets;
@@ -136,10 +138,10 @@ public final class AtsWorkDefinitionSheetProviders {
/*
* due to lazy initialization, this function is non-reentrant therefore, the synchronized keyword is necessary
*/
- private synchronized static Set<IAtsWorkDefinitionSheetProvider> getProviders() {
- if (teamWorkflowExtensionItems != null) {
- return teamWorkflowExtensionItems;
- }
+ private synchronized static Set<IAtsWorkDefinitionSheetProvider> getProviders(String dbType) {
+ // if (teamWorkflowExtensionItems != null) {
+ // return teamWorkflowExtensionItems;
+ // }
teamWorkflowExtensionItems = new HashSet<>();
IExtensionPoint point =
@@ -158,15 +160,18 @@ public final class AtsWorkDefinitionSheetProviders {
if (el.getName().equals("AtsWorkDefinitionSheetProvider")) {
classname = el.getAttribute("classname");
bundleName = el.getContributor().getName();
- if (classname != null && bundleName != null) {
- Bundle bundle = Platform.getBundle(bundleName);
- try {
- Class<?> taskClass = bundle.loadClass(classname);
- Object obj = taskClass.newInstance();
- teamWorkflowExtensionItems.add((IAtsWorkDefinitionSheetProvider) obj);
- } catch (Exception ex) {
- OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP,
- "Error loading AtsWorkDefinitionSheetProvider extension", ex);
+ String actualDbType = el.getAttribute("db_type");
+ if (actualDbType != null && actualDbType.equals(dbType)) {
+ if (classname != null && bundleName != null) {
+ Bundle bundle = Platform.getBundle(bundleName);
+ try {
+ Class<?> taskClass = bundle.loadClass(classname);
+ Object obj = taskClass.newInstance();
+ teamWorkflowExtensionItems.add((IAtsWorkDefinitionSheetProvider) obj);
+ } catch (Exception ex) {
+ OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP,
+ "Error loading AtsWorkDefinitionSheetProvider extension", ex);
+ }
}
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsItem.java
index b202fa7701..bfd09e6d86 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsItem.java
@@ -15,6 +15,7 @@ import org.eclipse.osee.ats.workdef.AtsWorkDefinitionSheetProviders;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+import org.eclipse.osee.framework.ui.skynet.widgets.dialog.EntryDialog;
/**
* @author Donald G. Dunne
@@ -27,7 +28,10 @@ public class ImportAIsAndTeamDefinitionsItem extends XNavigateItemAction {
@Override
public void run(TableLoadOption... tableLoadOptions) throws Exception {
- AtsWorkDefinitionSheetProviders.importAIsAndTeamsToDatabase();
+ EntryDialog dialog = new EntryDialog(getName(), "Enter DB type");
+ if (dialog.open() == 0) {
+ AtsWorkDefinitionSheetProviders.importAIsAndTeamsToDatabase(dialog.getEntry());
+ }
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
index ef774ca61e..6962466a37 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java
@@ -97,7 +97,8 @@ public class ImportAIsAndTeamDefinitionsToDb {
changes.add(userArt);
}
if (userArt == null) {
- userArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.User, AtsClientService.get().getAtsBranch(), dslUserName);
+ userArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.User, AtsClientService.get().getAtsBranch(),
+ dslUserName);
}
if (userArt == null) {
throw new OseeStateException(
@@ -130,8 +131,8 @@ public class ImportAIsAndTeamDefinitionsToDb {
dslTeamDef);
}
long uuid = dslTeamDef.getUuid() > 0 ? dslTeamDef.getUuid() : Lib.generateArtifactIdAsInt();
- newTeam = ArtifactTypeManager.addArtifact(AtsArtifactTypes.TeamDefinition, AtsClientService.get().getAtsBranch(),
- dslTeamName, guid, uuid);
+ newTeam = ArtifactTypeManager.addArtifact(AtsArtifactTypes.TeamDefinition,
+ AtsClientService.get().getAtsBranch(), dslTeamName, guid, uuid);
}
if (parentArtifact != null && !parentArtifact.equals(newTeam)) {
parentArtifact.addChild(newTeam);
@@ -211,8 +212,8 @@ public class ImportAIsAndTeamDefinitionsToDb {
dslVersionDef);
}
long uuid = dslVersionDef.getUuid() > 0 ? dslVersionDef.getUuid() : Lib.generateArtifactIdAsInt();
- Artifact newVer = ArtifactTypeManager.addArtifact(AtsArtifactTypes.Version, AtsClientService.get().getAtsBranch(),
- dslVerName, guid, uuid);
+ Artifact newVer = ArtifactTypeManager.addArtifact(AtsArtifactTypes.Version,
+ AtsClientService.get().getAtsBranch(), dslVerName, guid, uuid);
teamDef.addRelation(AtsRelationTypes.TeamDefinitionToVersion_Version, newVer);
nameToVerArt.put(newVer.getName(), newVer);
@@ -260,8 +261,8 @@ public class ImportAIsAndTeamDefinitionsToDb {
guid, dslAIDef);
}
long uuid = dslAIDef.getUuid() > 0 ? dslAIDef.getUuid() : Lib.generateArtifactIdAsInt();
- newAi = ArtifactTypeManager.addArtifact(AtsArtifactTypes.ActionableItem, AtsClientService.get().getAtsBranch(),
- dslAIName, guid, uuid);
+ newAi = ArtifactTypeManager.addArtifact(AtsArtifactTypes.ActionableItem,
+ AtsClientService.get().getAtsBranch(), dslAIName, guid, uuid);
}
if (parentArtifact != null && !parentArtifact.equals(newAi)) {
parentArtifact.addChild(newAi);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java
index a5f8ac1ce9..237832c75f 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java
@@ -27,6 +27,7 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLo
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
import org.eclipse.osee.framework.ui.skynet.results.XResultDataUI;
+import org.eclipse.osee.framework.ui.skynet.widgets.dialog.EntryDialog;
/**
* @author Donald G. Dunne
@@ -40,25 +41,29 @@ public class ImportWorkDefinitionsItem extends XNavigateItemAction {
@Override
public void run(TableLoadOption... tableLoadOptions) throws Exception {
List<WorkDefinitionSheet> importSheets = new ArrayList<>();
- for (WorkDefinitionSheet sheet : AtsWorkDefinitionSheetProviders.getWorkDefinitionSheets()) {
- if (!sheet.getName().endsWith("AIs_And_Teams")) {
- importSheets.add(sheet);
+ EntryDialog dbDialog = new EntryDialog(getName(), "Enter DB Type");
+ if (dbDialog.open() == 0) {
+ for (WorkDefinitionSheet sheet : AtsWorkDefinitionSheetProviders.getWorkDefinitionSheets(
+ dbDialog.getEntry())) {
+ if (!sheet.getName().endsWith("AIs_And_Teams")) {
+ importSheets.add(sheet);
+ }
}
- }
- WorkDefinitionCheckTreeDialog dialog =
- new WorkDefinitionCheckTreeDialog(getName(), "Select Work Definition Sheet(s) to import", importSheets);
- if (dialog.open() == 0) {
- XResultData resultData = new XResultData(false);
- IAtsChangeSet changes = AtsClientService.get().createChangeSet(getName());
- Artifact folder =
- OseeSystemArtifacts.getOrCreateArtifact(AtsArtifactToken.WorkDefinitionsFolder, AtsClientService.get().getAtsBranch());
- Set<String> stateNames = new HashSet<>();
- AtsWorkDefinitionSheetProviders.importWorkDefinitionSheets(resultData, changes, folder, dialog.getSelection(),
- stateNames);
- if (!resultData.isErrors()) {
- changes.execute();
+ WorkDefinitionCheckTreeDialog dialog =
+ new WorkDefinitionCheckTreeDialog(getName(), "Select Work Definition Sheet(s) to import", importSheets);
+ if (dialog.open() == 0) {
+ XResultData resultData = new XResultData(false);
+ IAtsChangeSet changes = AtsClientService.get().createChangeSet(getName());
+ Artifact folder = OseeSystemArtifacts.getOrCreateArtifact(AtsArtifactToken.WorkDefinitionsFolder,
+ AtsClientService.get().getAtsBranch());
+ Set<String> stateNames = new HashSet<>();
+ AtsWorkDefinitionSheetProviders.importWorkDefinitionSheets(resultData, changes, folder,
+ dialog.getSelection(), stateNames);
+ if (!resultData.isErrors()) {
+ changes.execute();
+ }
+ XResultDataUI.report(resultData, getName());
}
- XResultDataUI.report(resultData, getName());
}
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ValidateWorkspaceToDatabaseWorkDefinitions.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ValidateWorkspaceToDatabaseWorkDefinitions.java
index 5466fed0bb..10613c1385 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ValidateWorkspaceToDatabaseWorkDefinitions.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ValidateWorkspaceToDatabaseWorkDefinitions.java
@@ -29,6 +29,7 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
import org.eclipse.osee.framework.ui.skynet.compare.CompareHandler;
import org.eclipse.osee.framework.ui.skynet.compare.CompareItem;
import org.eclipse.osee.framework.ui.skynet.results.XResultDataUI;
+import org.eclipse.osee.framework.ui.skynet.widgets.dialog.EntryDialog;
import org.eclipse.osee.framework.ui.swt.Displays;
/**
@@ -45,42 +46,46 @@ public class ValidateWorkspaceToDatabaseWorkDefinitions extends XNavigateItemAct
if (!MessageDialog.openConfirm(Displays.getActiveShell(), getName(), getName())) {
return;
}
- Collection<WorkDefinitionSheet> sheets = AtsWorkDefinitionSheetProviders.getWorkDefinitionSheets();
- XResultData resultData = new XResultData();
- resultData.log(getName());
- for (WorkDefinitionSheet sheet : sheets) {
- resultData.addRaw("Sheet: " + sheet.getName() + " ");
- if (sheet.getName().endsWith("AIs_And_Teams")) {
- resultData.log(" OK - AIs_And_Teams - No Artifact Needed");
- continue;
- }
- Artifact workDefArt = null;
- try {
- workDefArt = ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.WorkDefinition, sheet.getName(),
- AtsClientService.get().getAtsBranch());
- } catch (ArtifactDoesNotExist ex) {
- // do nothing;
- }
- if (workDefArt == null) {
- resultData.error(" No Artifact Found with name [" + sheet.getName() + "]");
- continue;
- }
- String sheetText = AtsDslUtil.getString(sheet);
- sheetText = sheetText.replaceAll("\r\n", "\n");
- String artText = workDefArt.getSoleAttributeValueAsString(AtsAttributeTypes.DslSheet, "");
- artText = artText.replaceAll("\r\n", "\n");
- if (!sheetText.equals(artText)) {
- resultData.error(" Different (see opened diff editor)");
- CompareHandler compareHandler =
- new CompareHandler("Compare [" + sheet.getName() + "] Work Definition file/artifact",
+ EntryDialog dialog = new EntryDialog(getName(), "Enter DB Type");
+ if (dialog.open() == 0) {
+ Collection<WorkDefinitionSheet> sheets =
+ AtsWorkDefinitionSheetProviders.getWorkDefinitionSheets(dialog.getEntry());
+ XResultData resultData = new XResultData();
+ resultData.log(getName());
+ for (WorkDefinitionSheet sheet : sheets) {
+ resultData.addRaw("Sheet: " + sheet.getName() + " ");
+ if (sheet.getName().endsWith("AIs_And_Teams")) {
+ resultData.log(" OK - AIs_And_Teams - No Artifact Needed");
+ continue;
+ }
+ Artifact workDefArt = null;
+ try {
+ workDefArt = ArtifactQuery.getArtifactFromTypeAndName(AtsArtifactTypes.WorkDefinition, sheet.getName(),
+ AtsClientService.get().getAtsBranch());
+ } catch (ArtifactDoesNotExist ex) {
+ // do nothing;
+ }
+ if (workDefArt == null) {
+ resultData.error(" No Artifact Found with name [" + sheet.getName() + "]");
+ continue;
+ }
+ String sheetText = AtsDslUtil.getString(sheet);
+ sheetText = sheetText.replaceAll("\r\n", "\n");
+ String artText = workDefArt.getSoleAttributeValueAsString(AtsAttributeTypes.DslSheet, "");
+ artText = artText.replaceAll("\r\n", "\n");
+ if (!sheetText.equals(artText)) {
+ resultData.error(" Different (see opened diff editor)");
+ CompareHandler compareHandler = new CompareHandler(
+ "Compare [" + sheet.getName() + "] Work Definition file/artifact",
new CompareItem("File contents", sheetText, System.currentTimeMillis(), true, "file_contents"),
new CompareItem("Artifact contents", artText, System.currentTimeMillis(), true, "artifact_contents"),
null);
- compareHandler.compare();
- } else {
- resultData.log(" - OK");
+ compareHandler.compare();
+ } else {
+ resultData.log(" - OK");
+ }
}
+ XResultDataUI.report(resultData, getName());
}
- XResultDataUI.report(resultData, getName());
}
}
diff --git a/plugins/org.eclipse.osee.ats/support/WorkDef_Task_Default.ats b/plugins/org.eclipse.osee.ats/support/WorkDef_Task_Default.ats
index aa0ec47f83..7dd17579b7 100644
--- a/plugins/org.eclipse.osee.ats/support/WorkDef_Task_Default.ats
+++ b/plugins/org.eclipse.osee.ats/support/WorkDef_Task_Default.ats
@@ -48,12 +48,10 @@ workDefinition "WorkDef_Task_Default" {
type Completed
ordinal 2
to "InWork" OverrideAttributeValidation
- color DARK_GREEN
}
state "Cancelled" {
type Cancelled
ordinal 3
- color DARK_GREEN
}
}
diff --git a/plugins/org.eclipse.osee.client.test.framework.p2/category.xml b/plugins/org.eclipse.osee.client.test.framework.p2/category.xml
index 5ef5132a70..b414aa6937 100644
--- a/plugins/org.eclipse.osee.client.test.framework.p2/category.xml
+++ b/plugins/org.eclipse.osee.client.test.framework.p2/category.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.eclipse.osee.client.test.framework.feature_0.24.3.qualifier.jar" id="org.eclipse.osee.client.test.framework.feature" version="0.24.3.qualifier">
+ <feature url="features/org.eclipse.osee.client.test.framework.feature_0.25.0.qualifier.jar" id="org.eclipse.osee.client.test.framework.feature" version="0.25.0.qualifier">
<category name="org.eclipse.osee.test.framework"/>
</feature>
- <feature url="features/org.eclipse.osee.client.test.framework.feature.source_0.24.3.qualifier.jar" id="org.eclipse.osee.client.test.framework.feature.source" version="0.24.3.qualifier">
+ <feature url="features/org.eclipse.osee.client.test.framework.feature.source_0.25.0.qualifier.jar" id="org.eclipse.osee.client.test.framework.feature.source" version="0.25.0.qualifier">
<category name="org.eclipse.osee.test.framework"/>
</feature>
<category-def name="org.eclipse.osee.test.framework" label="OSEE Test Framework - (Incubation)">
diff --git a/plugins/org.eclipse.osee.client.test.framework.p2/pom.xml b/plugins/org.eclipse.osee.client.test.framework.p2/pom.xml
index b23589b507..123601070a 100644
--- a/plugins/org.eclipse.osee.client.test.framework.p2/pom.xml
+++ b/plugins/org.eclipse.osee.client.test.framework.p2/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.eclipse.osee</groupId>
<artifactId>org.eclipse.osee.client.parent</artifactId>
- <version>0.24.3-SNAPSHOT</version>
+ <version>0.25.0-SNAPSHOT</version>
<relativePath>../../plugins/org.eclipse.osee.client.parent</relativePath>
</parent>

Back to the top