Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2b9484ef
Commit
2b9484ef
authored
Dec 15, 2021
by
Scott Stern
Committed by
Kushal Pandya
Dec 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix iteration token value on load
parent
c827d97b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
55 deletions
+34
-55
ee/app/assets/javascripts/boards/boards_util.js
ee/app/assets/javascripts/boards/boards_util.js
+11
-7
ee/app/assets/javascripts/boards/graphql/group_board_iterations.query.graphql
...ripts/boards/graphql/group_board_iterations.query.graphql
+0
-12
ee/app/assets/javascripts/boards/graphql/project_board_iterations.query.graphql
...pts/boards/graphql/project_board_iterations.query.graphql
+0
-12
ee/app/assets/javascripts/boards/stores/actions.js
ee/app/assets/javascripts/boards/stores/actions.js
+15
-20
ee/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue
...components/filtered_search_bar/tokens/iteration_token.vue
+6
-2
ee/spec/frontend/boards/stores/actions_spec.js
ee/spec/frontend/boards/stores/actions_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/boards/boards_util.js
View file @
2b9484ef
...
...
@@ -232,20 +232,24 @@ export const FiltersInfo = {
},
iterationId
:
{
negatedSupport
:
true
,
remap
:
(
k
,
v
)
=>
// iteration_id should be renamed to iterationWildcardId when CURRENT is the value
v
===
IterationFilterType
.
any
||
v
===
IterationFilterType
.
none
||
v
===
IterationFilterType
.
current
remap
:
(
k
,
v
)
=>
{
return
v
.
endsWith
(
IterationFilterType
.
any
)
||
v
.
endsWith
(
IterationFilterType
.
none
)
||
v
.
endsWith
(
IterationFilterType
.
current
)
?
'
iterationWildcardId
'
:
k
,
:
k
;
},
},
iterationTitle
:
{
negatedSupport
:
true
,
},
iterationWildcardId
:
{
negatedSupport
:
true
,
transform
:
(
val
)
=>
val
.
toUpperCase
(),
transform
:
(
val
)
=>
{
// Gets the wildcard value out of the gid.
const
valList
=
val
.
split
(
'
/
'
);
return
valList
[
valList
.
length
-
1
].
toUpperCase
();
},
},
weight
:
{
negatedSupport
:
true
,
...
...
ee/app/assets/javascripts/boards/graphql/group_board_iterations.query.graphql
deleted
100644 → 0
View file @
c827d97b
#import "../../sidebar/queries/iteration.fragment.graphql"
query
GroupBoardIterations
(
$fullPath
:
ID
!,
$title
:
String
)
{
group
(
fullPath
:
$fullPath
)
{
id
iterations
(
includeAncestors
:
true
,
title
:
$title
)
{
nodes
{
...
IterationFragment
}
}
}
}
ee/app/assets/javascripts/boards/graphql/project_board_iterations.query.graphql
deleted
100644 → 0
View file @
c827d97b
#import "../../sidebar/queries/iteration.fragment.graphql"
query
ProjectBoardIterations
(
$fullPath
:
ID
!,
$title
:
String
)
{
project
(
fullPath
:
$fullPath
)
{
id
iterations
(
includeAncestors
:
true
,
title
:
$title
)
{
nodes
{
...
IterationFragment
}
}
}
}
ee/app/assets/javascripts/boards/stores/actions.js
View file @
2b9484ef
...
...
@@ -12,12 +12,11 @@ import listsIssuesQuery from '~/boards/graphql/lists_issues.query.graphql';
import
projectBoardMembersQuery
from
'
~/boards/graphql/project_board_members.query.graphql
'
;
import
actionsCE
from
'
~/boards/stores/actions
'
;
import
*
as
typesCE
from
'
~/boards/stores/mutation_types
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
getIdFromGraphQLId
,
convertToGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
historyPushState
,
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
mergeUrlParams
,
removeParams
,
queryToObject
}
from
'
~/lib/utils/url_utility
'
;
import
{
s__
}
from
'
~/locale
'
;
import
groupBoardIterationsQuery
from
'
ee/boards/graphql/group_board_iterations.query.graphql
'
;
import
projectBoardIterationsQuery
from
'
ee/boards/graphql/project_board_iterations.query.graphql
'
;
import
searchIterationQuery
from
'
ee/issues_list/queries/search_iterations.query.graphql
'
;
import
{
fullEpicBoardId
,
formatEpic
,
...
...
@@ -137,14 +136,21 @@ export default {
},
setFilters
:
({
commit
,
dispatch
,
state
:
{
issuableType
}
},
filters
)
=>
{
const
filtersCopy
=
{
...
filters
};
if
(
filters
.
groupBy
===
GroupByParamType
.
epic
)
{
dispatch
(
'
setEpicSwimlanes
'
);
}
if
(
filters
?.
iterationId
)
{
// eslint-disable-next-line @gitlab/require-i18n-strings
filtersCopy
.
iterationId
=
convertToGraphQLId
(
'
Iteration
'
,
filters
.
iterationId
);
}
commit
(
types
.
SET_FILTERS
,
filterVariables
({
filters
,
filters
:
filtersCopy
,
issuableType
,
filterInfo
:
FiltersInfo
,
filterFields
:
FilterFields
,
...
...
@@ -157,27 +163,16 @@ export default {
const
{
fullPath
,
boardType
}
=
state
;
const
variables
=
{
fullPath
,
title
,
};
const
id
=
Number
(
title
);
let
variables
=
{
fullPath
,
search
:
title
,
isProject
:
boardType
===
BoardType
.
project
};
let
query
;
if
(
boardType
===
BoardType
.
project
)
{
query
=
projectBoardIterationsQuery
;
}
if
(
boardType
===
BoardType
.
group
)
{
query
=
groupBoardIterationsQuery
;
}
if
(
!
query
)
{
// eslint-disable-next-line @gitlab/require-i18n-strings
throw
new
Error
(
'
Unknown board type
'
);
if
(
!
Number
.
isNaN
(
id
)
&&
title
!==
''
)
{
variables
=
{
fullPath
,
id
,
isProject
:
boardType
===
BoardType
.
project
};
}
return
gqlClient
.
query
({
query
,
query
:
searchIterationQuery
,
variables
,
})
.
then
(({
data
})
=>
{
...
...
ee/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue
View file @
2b9484ef
...
...
@@ -2,6 +2,7 @@
import
{
GlDropdownDivider
,
GlDropdownSectionHeader
,
GlFilteredSearchSuggestion
}
from
'
@gitlab/ui
'
;
import
{
groupByIterationCadences
}
from
'
ee/iterations/utils
'
;
import
createFlash
from
'
~/flash
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
__
}
from
'
~/locale
'
;
import
BaseToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/base_token.vue
'
;
import
glFeatureFlagMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
...
...
@@ -42,7 +43,7 @@ export default {
},
methods
:
{
getActiveIteration
(
iterations
,
data
)
{
return
iterations
.
find
((
iteration
)
=>
iteration
.
id
===
data
);
return
iterations
.
find
((
iteration
)
=>
this
.
getId
(
iteration
)
===
data
);
},
groupIterationsByCadence
(
iterations
)
{
return
groupByIterationCadences
(
iterations
);
...
...
@@ -61,6 +62,9 @@ export default {
this
.
loading
=
false
;
});
},
getId
(
iteration
)
{
return
getIdFromGraphQLId
(
iteration
.
id
).
toString
();
},
},
};
</
script
>
...
...
@@ -93,7 +97,7 @@ export default {
<gl-filtered-search-suggestion
v-for=
"iteration in cadence.iterations"
:key=
"iteration.id"
:value=
"
iteration.id
"
:value=
"
getId(iteration)
"
>
{{
iteration
.
title
}}
<div
v-if=
"glFeatures.iterationCadences"
class=
"gl-text-gray-400"
>
...
...
ee/spec/frontend/boards/stores/actions_spec.js
View file @
2b9484ef
...
...
@@ -66,11 +66,11 @@ describe('setFilters', () => {
[
'
with correct EE filters as payload
'
,
{
filters
:
{
weight
:
3
,
'
not[iterationId]
'
:
1
},
filters
:
{
weight
:
3
,
'
not[iterationId]
'
:
'
1
'
},
filterVariables
:
{
weight
:
3
,
not
:
{
iterationId
:
1
,
iterationId
:
'
1
'
,
},
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment