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
416c0477
Commit
416c0477
authored
Feb 16, 2022
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix negated iteration filter for boards
parent
a97ed09f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
59 additions
and
29 deletions
+59
-29
app/assets/javascripts/boards/components/board_filtered_search.vue
...s/javascripts/boards/components/board_filtered_search.vue
+3
-3
app/assets/javascripts/boards/graphql.js
app/assets/javascripts/boards/graphql.js
+1
-0
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+8
-2
app/assets/javascripts/boards/mount_filtered_search_issue_boards.js
.../javascripts/boards/mount_filtered_search_issue_boards.js
+9
-1
ee/app/assets/javascripts/boards/boards_util.js
ee/app/assets/javascripts/boards/boards_util.js
+6
-1
ee/app/assets/javascripts/boards/components/issue_board_filtered_search.vue
...scripts/boards/components/issue_board_filtered_search.vue
+29
-20
ee/spec/features/boards/user_visits_board_spec.rb
ee/spec/features/boards/user_visits_board_spec.rb
+0
-1
ee/spec/frontend/boards/components/issue_board_filtered_search_spec.js
...end/boards/components/issue_board_filtered_search_spec.js
+2
-0
ee/spec/frontend/boards/stores/actions_spec.js
ee/spec/frontend/boards/stores/actions_spec.js
+1
-1
No files found.
app/assets/javascripts/boards/components/board_filtered_search.vue
View file @
416c0477
...
...
@@ -151,10 +151,10 @@ export default {
});
}
if
(
this
.
filterParams
[
'
not[iteration
_i
d]
'
])
{
if
(
this
.
filterParams
[
'
not[iteration
I
d]
'
])
{
filteredSearchValue
.
push
({
type
:
'
iteration
_id
'
,
value
:
{
data
:
this
.
filterParams
[
'
not[iteration
_i
d]
'
],
operator
:
'
!=
'
},
type
:
'
iteration
'
,
value
:
{
data
:
this
.
filterParams
[
'
not[iteration
I
d]
'
],
operator
:
'
!=
'
},
});
}
...
...
app/assets/javascripts/boards/graphql.js
View file @
416c0477
...
...
@@ -10,5 +10,6 @@ export const gqlClient = createDefaultClient(
return
object
.
__typename
===
'
BoardList
'
?
object
.
iid
:
defaultDataIdFromObject
(
object
);
},
},
batchMax
:
2
,
},
);
app/assets/javascripts/boards/index.js
View file @
416c0477
...
...
@@ -97,8 +97,14 @@ export default () => {
}
});
const
{
releasesFetchPath
}
=
$boardApp
.
dataset
;
initBoardsFilteredSearch
(
apolloProvider
,
isLoggedIn
(),
releasesFetchPath
);
const
{
releasesFetchPath
,
epicFeatureAvailable
,
iterationFeatureAvailable
}
=
$boardApp
.
dataset
;
initBoardsFilteredSearch
(
apolloProvider
,
isLoggedIn
(),
releasesFetchPath
,
parseBoolean
(
epicFeatureAvailable
),
parseBoolean
(
iterationFeatureAvailable
),
);
mountBoardApp
(
$boardApp
);
...
...
app/assets/javascripts/boards/mount_filtered_search_issue_boards.js
View file @
416c0477
...
...
@@ -4,7 +4,13 @@ import store from '~/boards/stores';
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
queryToObject
}
from
'
~/lib/utils/url_utility
'
;
export
default
(
apolloProvider
,
isSignedIn
,
releasesFetchPath
)
=>
{
export
default
(
apolloProvider
,
isSignedIn
,
releasesFetchPath
,
epicFeatureAvailable
,
iterationFeatureAvailable
,
)
=>
{
const
el
=
document
.
getElementById
(
'
js-issue-board-filtered-search
'
);
const
rawFilterParams
=
queryToObject
(
window
.
location
.
search
,
{
gatherArrays
:
true
});
...
...
@@ -23,6 +29,8 @@ export default (apolloProvider, isSignedIn, releasesFetchPath) => {
initialFilterParams
,
isSignedIn
,
releasesFetchPath
,
epicFeatureAvailable
,
iterationFeatureAvailable
,
},
store
,
// TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/324094
apolloProvider
,
...
...
ee/app/assets/javascripts/boards/boards_util.js
View file @
416c0477
...
...
@@ -2,7 +2,7 @@ import {
FiltersInfo
as
FiltersInfoCE
,
formatIssueInput
as
formatIssueInputCe
,
}
from
'
~/boards/boards_util
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
getIdFromGraphQLId
,
isGid
}
from
'
~/graphql_shared/utils
'
;
import
{
objectToQuery
,
queryToObject
}
from
'
~/lib/utils/url_utility
'
;
import
{
EPIC_LANE_BASE_HEIGHT
,
...
...
@@ -43,6 +43,10 @@ function fullIterationId(id) {
return
null
;
}
if
(
isGid
(
id
))
{
return
id
;
}
if
(
id
===
IterationIDs
.
CURRENT
)
{
return
'
CURRENT
'
;
}
...
...
@@ -232,6 +236,7 @@ export const FiltersInfo = {
},
iterationId
:
{
negatedSupport
:
true
,
transform
:
(
iterationId
)
=>
fullIterationId
(
iterationId
),
remap
:
(
k
,
v
)
=>
{
return
v
.
endsWith
(
IterationFilterType
.
any
)
||
v
.
endsWith
(
IterationFilterType
.
none
)
||
...
...
ee/app/assets/javascripts/boards/components/issue_board_filtered_search.vue
View file @
416c0477
...
...
@@ -22,6 +22,7 @@ export default {
weight
:
__
(
'
Weight
'
),
},
mixins
:
[
glFeatureFlagMixin
()],
inject
:
[
'
epicFeatureAvailable
'
,
'
iterationFeatureAvailable
'
],
computed
:
{
isGroupBoard
()
{
return
this
.
boardType
===
BoardType
.
group
;
...
...
@@ -36,26 +37,34 @@ export default {
const
tokens
=
[
...
this
.
tokensCE
,
{
type
:
'
epic
'
,
title
:
epic
,
icon
:
'
epic
'
,
token
:
EpicToken
,
unique
:
true
,
symbol
:
'
&
'
,
idProperty
:
'
id
'
,
useIdValue
:
true
,
fullPath
:
this
.
epicsGroupPath
,
},
{
icon
:
'
iteration
'
,
title
:
iteration
,
type
:
'
iteration
'
,
operators
:
OPERATOR_IS_AND_IS_NOT
,
token
:
IterationToken
,
unique
:
true
,
fetchIterations
:
this
.
fetchIterations
,
},
...(
this
.
epicFeatureAvailable
?
[
{
type
:
'
epic
'
,
title
:
epic
,
icon
:
'
epic
'
,
token
:
EpicToken
,
unique
:
true
,
symbol
:
'
&
'
,
idProperty
:
'
id
'
,
useIdValue
:
true
,
fullPath
:
this
.
epicsGroupPath
,
},
]
:
[]),
...(
this
.
iterationFeatureAvailable
?
[
{
icon
:
'
iteration
'
,
title
:
iteration
,
type
:
'
iteration
'
,
operators
:
OPERATOR_IS_AND_IS_NOT
,
token
:
IterationToken
,
unique
:
true
,
fetchIterations
:
this
.
fetchIterations
,
},
]
:
[]),
{
type
:
'
weight
'
,
title
:
weight
,
...
...
ee/spec/features/boards/user_visits_board_spec.rb
View file @
416c0477
...
...
@@ -32,7 +32,6 @@ RSpec.describe 'User visits issue boards', :js do
shared_examples
"visiting board path"
do
before
do
stub_const
(
'GitlabSchema::DEFAULT_MAX_COMPLEXITY'
,
300
)
visit
board_path
wait_for_requests
...
...
ee/spec/frontend/boards/components/issue_board_filtered_search_spec.js
View file @
416c0477
...
...
@@ -16,6 +16,8 @@ describe('IssueBoardFilter', () => {
provide
:
{
isSignedIn
:
true
,
releasesFetchPath
:
'
/releases
'
,
epicFeatureAvailable
:
true
,
iterationFeatureAvailable
:
true
,
},
});
};
...
...
ee/spec/frontend/boards/stores/actions_spec.js
View file @
416c0477
...
...
@@ -70,7 +70,7 @@ describe('setFilters', () => {
filterVariables
:
{
weight
:
3
,
not
:
{
iterationId
:
'
1
'
,
iterationId
:
'
gid://gitlab/Iteration/
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