Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-01-10 16:16:28 -0500
committerdonald.g.dunne2017-01-10 16:24:01 -0500
commit9fcf956d4329b950cff19d8ba9f7d5b70b53e4cb (patch)
treea99e0c85139b31703881490a610eb4c7f0bca5b5
parenta1d6a324ec7426b9294c89a10807c4a566dfb061 (diff)
downloadorg.eclipse.osee-9fcf956d4329b950cff19d8ba9f7d5b70b53e4cb.tar.gz
org.eclipse.osee-9fcf956d4329b950cff19d8ba9f7d5b70b53e4cb.tar.xz
org.eclipse.osee-9fcf956d4329b950cff19d8ba9f7d5b70b53e4cb.zip
bug[ats_ATS332227]: Quick Search by id and include deleted not working
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java16
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java3
2 files changed, 7 insertions, 12 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java
index edb0858cf8..e21e9a0b86 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java
@@ -10,14 +10,12 @@
*******************************************************************************/
package org.eclipse.osee.framework.ui.skynet.search;
-import static org.eclipse.osee.framework.core.enums.DeletionFlag.INCLUDE_DELETED;
import com.google.common.collect.Iterables;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
@@ -29,9 +27,9 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.QueryBuilderArtifa
final class IdArtifactSearch extends AbstractLegacyArtifactSearchQuery {
private final String searchString;
private final BranchId branchToSearch;
- private final DeletionFlag allowDeleted;
+ private final boolean allowDeleted;
- IdArtifactSearch(String searchString, BranchId branchToSearch, DeletionFlag allowDeleted) {
+ IdArtifactSearch(String searchString, BranchId branchToSearch, boolean allowDeleted) {
super();
this.searchString = searchString;
this.branchToSearch = branchToSearch;
@@ -52,23 +50,21 @@ final class IdArtifactSearch extends AbstractLegacyArtifactSearchQuery {
List<Artifact> toReturn = new LinkedList<>();
+ QueryBuilderArtifact query = ArtifactQuery.createQueryBuilder(branchToSearch);
if (!artIds.isEmpty()) {
- QueryBuilderArtifact query = ArtifactQuery.createQueryBuilder(branchToSearch);
query.andLocalIds(artIds);
- Iterables.addAll(toReturn, query.getResults());
}
-
if (!guids.isEmpty()) {
- QueryBuilderArtifact query = ArtifactQuery.createQueryBuilder(branchToSearch);
query.andGuids(guids);
- Iterables.addAll(toReturn, query.getResults());
}
+ query.includeDeleted(allowDeleted);
+ Iterables.addAll(toReturn, query.getResults());
return toReturn;
}
@Override
public String getCriteriaLabel() {
- return String.format("%s%s", searchString, allowDeleted == INCLUDE_DELETED ? " - Options:[Include Deleted]" : "");
+ return String.format("%s%s", searchString, allowDeleted ? " - Options:[Include Deleted]" : "");
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
index 11843c3353..0b8a12b790 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
@@ -316,10 +316,9 @@ public class QuickSearchView extends GenericViewPart {
}
if (invalids.isEmpty()) {
- DeletionFlag allowDeleted = isIncludeDeletedEnabled() ? INCLUDE_DELETED : EXCLUDE_DELETED;
NewSearchUI.activateSearchResultView();
- ISearchQuery query = new IdArtifactSearch(searchString, branch, allowDeleted);
+ ISearchQuery query = new IdArtifactSearch(searchString, branch, isIncludeDeletedEnabled());
NewSearchUI.runQueryInBackground(query);
} else {
String message =

Back to the top