Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-09-09 11:19:31 -0400
committerdonald.g.dunne2016-09-13 11:38:24 -0400
commite4d19e600ed19ec52cab851489d9664bd6a6b339 (patch)
treed6042bb5dd5eb5aac6ca497e5fa03c7f3cbd54ef
parenta8d3649c5c8a376c4aa06702ab4e0020348c781d (diff)
downloadorg.eclipse.osee-e4d19e600ed19ec52cab851489d9664bd6a6b339.tar.gz
org.eclipse.osee-e4d19e600ed19ec52cab851489d9664bd6a6b339.tar.xz
org.eclipse.osee-e4d19e600ed19ec52cab851489d9664bd6a6b339.zip
bug[ats_ATS303551]: Ensure defaults selected in ATS Search0.24.0.v201609131913_NRB
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsSearchWorkflowSearchItem.java42
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/ClearSearchAction.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java6
3 files changed, 34 insertions, 16 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsSearchWorkflowSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsSearchWorkflowSearchItem.java
index 45ce22c1e1..c6db1b0259 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsSearchWorkflowSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsSearchWorkflowSearchItem.java
@@ -74,6 +74,10 @@ public class AtsSearchWorkflowSearchItem extends WorldEditorParameterSearchItem
return true;
}
+ protected boolean showWorkPackageWidgets() {
+ return false;
+ }
+
protected void addWidgets() {
if (showWorkItemWidgets()) {
getWorkItemType().addWidget(14);
@@ -90,11 +94,13 @@ public class AtsSearchWorkflowSearchItem extends WorldEditorParameterSearchItem
getUser().addWidget();
getUserType().addWidget();
getColorTeam().addWidget(4);
- getStateName().addWidget();
- getProgram().addWidget(8);
- getInsertion().addWidget();
- getInsertionActivity().addWidget();
- getWorkPackage().addWidget();
+ if (showWorkPackageWidgets()) {
+ getStateName().addWidget();
+ getProgram().addWidget(8);
+ getInsertion().addWidget();
+ getInsertionActivity().addWidget();
+ getWorkPackage().addWidget();
+ }
}
@Override
@@ -122,7 +128,7 @@ public class AtsSearchWorkflowSearchItem extends WorldEditorParameterSearchItem
if (getUserType() != null) {
data.setUserType(getUserType().get());
}
- if (getWorkItemType() != null) {
+ if (showWorkItemWidgets() && getWorkItemType() != null) {
data.getWorkItemTypes().clear();
data.getWorkItemTypes().addAll(getWorkItemType().get());
}
@@ -140,16 +146,16 @@ public class AtsSearchWorkflowSearchItem extends WorldEditorParameterSearchItem
if (getStateName() != null && Strings.isValid(getStateName().get())) {
data.setState(getStateName().get());
}
- if (getProgram() != null && getProgram().get() != null) {
+ if (showWorkPackageWidgets() && getProgram() != null && getProgram().get() != null) {
data.setProgramUuid(getProgram().get().getUuid());
}
- if (getInsertion() != null && getInsertion().get() != null) {
+ if (showWorkPackageWidgets() && getInsertion() != null && getInsertion().get() != null) {
data.setInsertionUuid(getInsertion().get().getUuid());
}
- if (getInsertionActivity() != null && getInsertionActivity().get() != null) {
+ if (showWorkPackageWidgets() && getInsertionActivity() != null && getInsertionActivity().get() != null) {
data.setInsertionActivityUuid(getInsertionActivity().get().getUuid());
}
- if (getWorkPackage() != null && getWorkPackage().get() != null) {
+ if (showWorkPackageWidgets() && getWorkPackage() != null && getWorkPackage().get() != null) {
data.setWorkPackageUuid(getWorkPackage().get().getUuid());
}
if (getColorTeam() != null && Strings.isValid(getColorTeam().get())) {
@@ -175,17 +181,21 @@ public class AtsSearchWorkflowSearchItem extends WorldEditorParameterSearchItem
getStateType().set(data);
getUser().set(data);
getUserType().set(data);
- getWorkItemType().clearAll();
- getWorkItemType().set(data);
+ if (showWorkItemWidgets()) {
+ getWorkItemType().clearAll();
+ getWorkItemType().set(data);
+ }
getTeamDef().set(data);
getAi().set(data);
getVersion().set(data);
getStateName().set(data);
- getProgram().set(data);
- getInsertion().set(data);
- getInsertionActivity().set(data);
+ if (showWorkPackageWidgets()) {
+ getProgram().set(data);
+ getInsertion().set(data);
+ getInsertionActivity().set(data);
+ getWorkPackage().set(data);
+ }
getColorTeam().set(data);
- getWorkPackage().set(data);
getReviewType().set(data);
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/ClearSearchAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/ClearSearchAction.java
index f700c68d7e..b98ac8e585 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/ClearSearchAction.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/ClearSearchAction.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.ats.search;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.ats.api.query.AtsSearchData;
+import org.eclipse.osee.ats.api.workdef.StateType;
import org.eclipse.osee.ats.internal.AtsClientService;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -37,6 +38,7 @@ public final class ClearSearchAction extends Action {
public void run() {
AtsSearchData searchData = AtsClientService.get().getQueryService().createSearchData(searchItem.getNamespace(),
searchItem.getSearchName());
+ searchData.getStateTypes().add(StateType.Working);
searchItem.loadWidgets(searchData);
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java
index d6d39853bb..c302659ca5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java
@@ -118,6 +118,12 @@ public abstract class WorldEditorParameterSearchItem extends WorldSearchItem imp
return new Result("Actionable Item(s) and Team Definition(s) are not compatible selections.");
}
}
+ if (workItemType != null && workItemType.get().isEmpty()) {
+ return new Result("You must select a workflow type.");
+ }
+ if (teamDef.get().isEmpty() && ai.get().isEmpty()) {
+ return new Result("You must select either Actionable Item(s) or Team Definition(s).");
+ }
return Result.TrueResult;
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, ex);

Back to the top