Commit 2c63e7c8 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'cngo-search-active-milestones' into 'master'

Search only active milestones on issues list refactor

See merge request gitlab-org/gitlab!80538
parents 57fb1e02 7e9a8e8c
...@@ -8,6 +8,7 @@ query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = fa ...@@ -8,6 +8,7 @@ query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = fa
includeAncestors: true includeAncestors: true
includeDescendants: true includeDescendants: true
sort: EXPIRED_LAST_DUE_DATE_ASC sort: EXPIRED_LAST_DUE_DATE_ASC
state: active
) { ) {
nodes { nodes {
...Milestone ...Milestone
...@@ -16,7 +17,12 @@ query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = fa ...@@ -16,7 +17,12 @@ query searchMilestones($fullPath: ID!, $search: String, $isProject: Boolean = fa
} }
project(fullPath: $fullPath) @include(if: $isProject) { project(fullPath: $fullPath) @include(if: $isProject) {
id id
milestones(searchTitle: $search, includeAncestors: true, sort: EXPIRED_LAST_DUE_DATE_ASC) { milestones(
searchTitle: $search
includeAncestors: true
sort: EXPIRED_LAST_DUE_DATE_ASC
state: active
) {
nodes { nodes {
...Milestone ...Milestone
} }
......
...@@ -15,6 +15,7 @@ const VueDraggable = () => import('vuedraggable'); ...@@ -15,6 +15,7 @@ const VueDraggable = () => import('vuedraggable');
export default { export default {
vueDraggableAttributes: { vueDraggableAttributes: {
animation: 200, animation: 200,
forceFallback: true,
ghostClass: 'gl-visibility-hidden', ghostClass: 'gl-visibility-hidden',
tag: 'ul', tag: 'ul',
}, },
......
...@@ -4,7 +4,7 @@ import createFlash from '~/flash'; ...@@ -4,7 +4,7 @@ import createFlash from '~/flash';
import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import { __ } from '~/locale'; import { __ } from '~/locale';
import BaseToken from '~/vue_shared/components/filtered_search_bar/tokens/base_token.vue'; import BaseToken from '~/vue_shared/components/filtered_search_bar/tokens/base_token.vue';
import { DEFAULT_NONE_ANY, FILTER_NONE_ANY, OPERATOR_IS_NOT } from '../constants'; import { DEFAULT_NONE_ANY } from '../constants';
import searchEpicsQuery from '../queries/search_epics.query.graphql'; import searchEpicsQuery from '../queries/search_epics.query.graphql';
export default { export default {
...@@ -48,14 +48,6 @@ export default { ...@@ -48,14 +48,6 @@ export default {
defaultEpics() { defaultEpics() {
return this.config.defaultEpics || DEFAULT_NONE_ANY; return this.config.defaultEpics || DEFAULT_NONE_ANY;
}, },
availableDefaultEpics() {
if (this.value.operator === OPERATOR_IS_NOT) {
return this.defaultEpics.filter(
(suggestion) => !FILTER_NONE_ANY.includes(suggestion.value),
);
}
return this.defaultEpics;
},
}, },
methods: { methods: {
fetchEpics(search = '') { fetchEpics(search = '') {
...@@ -106,7 +98,7 @@ export default { ...@@ -106,7 +98,7 @@ export default {
:suggestions-loading="loading" :suggestions-loading="loading"
:suggestions="epics" :suggestions="epics"
:get-active-token-value="getActiveEpic" :get-active-token-value="getActiveEpic"
:default-suggestions="availableDefaultEpics" :default-suggestions="defaultEpics"
search-by="title" search-by="title"
@fetch-suggestions="fetchEpicsBySearchTerm" @fetch-suggestions="fetchEpicsBySearchTerm"
v-on="$listeners" v-on="$listeners"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment