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
64a052f6
Commit
64a052f6
authored
Apr 13, 2021
by
Florie Guibert
Committed by
Simon Knox
Apr 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug - Swimlanes do not show all issues
parent
39a42292
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
4 deletions
+92
-4
ee/app/assets/javascripts/boards/components/epics_swimlanes.vue
.../assets/javascripts/boards/components/epics_swimlanes.vue
+1
-1
ee/app/assets/javascripts/boards/stores/actions.js
ee/app/assets/javascripts/boards/stores/actions.js
+5
-2
ee/spec/frontend/boards/stores/actions_spec.js
ee/spec/frontend/boards/stores/actions_spec.js
+86
-1
No files found.
ee/app/assets/javascripts/boards/components/epics_swimlanes.vue
View file @
64a052f6
...
...
@@ -111,7 +111,7 @@ export default {
handler
()
{
Promise
.
all
(
this
.
lists
.
map
((
list
)
=>
{
return
this
.
fetchItemsForList
({
listId
:
list
.
id
});
return
this
.
fetchItemsForList
({
listId
:
list
.
id
,
forSwimlanes
:
true
});
}),
)
.
then
(()
=>
this
.
doneLoadingSwimlanesItems
())
...
...
ee/app/assets/javascripts/boards/stores/actions.js
View file @
64a052f6
...
...
@@ -304,7 +304,7 @@ export default {
fetchItemsForList
:
(
{
state
,
commit
,
getters
},
{
listId
,
fetchNext
=
false
,
noEpicIssues
=
false
},
{
listId
,
fetchNext
=
false
,
noEpicIssues
=
false
,
forSwimlanes
=
false
},
)
=>
{
commit
(
types
.
REQUEST_ITEMS_FOR_LIST
,
{
listId
,
fetchNext
});
...
...
@@ -312,6 +312,9 @@ export default {
if
(
noEpicIssues
&&
epicId
!==
undefined
)
{
return
null
;
}
if
(
forSwimlanes
&&
epicId
===
undefined
&&
filterParams
.
epicWildcardId
===
undefined
)
{
filterParams
.
epicWildcardId
=
EpicFilterType
.
any
.
toUpperCase
();
}
const
variables
=
{
id
:
listId
,
...
...
@@ -319,7 +322,7 @@ export default {
?
{
...
filterParams
,
epicWildcardId
:
EpicFilterType
.
none
.
toUpperCase
()
}
:
{
...
filterParams
,
epicId
},
after
:
fetchNext
?
state
.
pageInfoByListId
[
listId
].
endCursor
:
undefined
,
first
:
20
,
first
:
forSwimlanes
?
undefined
:
20
,
};
if
(
getters
.
isEpicBoard
)
{
...
...
ee/spec/frontend/boards/stores/actions_spec.js
View file @
64a052f6
...
...
@@ -9,8 +9,9 @@ import * as types from 'ee/boards/stores/mutation_types';
import
mutations
from
'
ee/boards/stores/mutations
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
testAction
from
'
helpers/vuex_action_helper
'
;
import
{
formatBoardLists
}
from
'
~/boards/boards_util
'
;
import
{
formatBoardLists
,
formatListIssues
}
from
'
~/boards/boards_util
'
;
import
{
issuableTypes
}
from
'
~/boards/constants
'
;
import
listsIssuesQuery
from
'
~/boards/graphql/lists_issues.query.graphql
'
;
import
*
as
typesCE
from
'
~/boards/stores/mutation_types
'
;
import
*
as
commonUtils
from
'
~/lib/utils/common_utils
'
;
import
{
mergeUrlParams
,
removeParams
}
from
'
~/lib/utils/url_utility
'
;
...
...
@@ -19,6 +20,7 @@ import {
mockLists
,
mockIssue
,
mockIssue2
,
mockIssues
,
mockEpic
,
rawIssue
,
mockMilestones
,
...
...
@@ -322,6 +324,89 @@ describe('fetchEpicsSwimlanes', () => {
});
});
describe
(
'
fetchItemsForList
'
,
()
=>
{
const
listId
=
mockLists
[
0
].
id
;
const
state
=
{
fullPath
:
'
gitlab-org
'
,
boardId
:
'
1
'
,
filterParams
:
{},
boardType
:
'
group
'
,
};
const
mockIssuesNodes
=
mockIssues
.
map
((
issue
)
=>
({
node
:
issue
}));
const
pageInfo
=
{
endCursor
:
''
,
hasNextPage
:
false
,
};
const
queryResponse
=
{
data
:
{
group
:
{
board
:
{
lists
:
{
nodes
:
[
{
id
:
listId
,
issues
:
{
edges
:
mockIssuesNodes
,
pageInfo
,
},
},
],
},
},
},
},
};
const
formattedIssues
=
formatListIssues
(
queryResponse
.
data
.
group
.
board
.
lists
);
const
listPageInfo
=
{
[
listId
]:
pageInfo
,
};
it
(
'
add epicWildcardId with ANY as value when forSwimlanes is true
'
,
()
=>
{
jest
.
spyOn
(
gqlClient
,
'
query
'
).
mockResolvedValue
(
queryResponse
);
testAction
(
actions
.
fetchItemsForList
,
{
listId
,
forSwimlanes
:
true
},
state
,
[
{
type
:
types
.
REQUEST_ITEMS_FOR_LIST
,
payload
:
{
listId
,
fetchNext
:
false
},
},
{
type
:
types
.
RECEIVE_ITEMS_FOR_LIST_SUCCESS
,
payload
:
{
listItems
:
formattedIssues
,
listPageInfo
,
listId
,
noEpicIssues
:
false
},
},
],
[],
()
=>
{
expect
(
gqlClient
.
query
).
toHaveBeenCalledWith
({
query
:
listsIssuesQuery
,
variables
:
{
boardId
:
'
gid://gitlab/Board/1
'
,
filters
:
{
epicWildcardId
:
'
ANY
'
,
},
fullPath
:
'
gitlab-org
'
,
id
:
'
gid://gitlab/List/1
'
,
isGroup
:
true
,
isProject
:
false
,
},
context
:
{
isSingleRequest
:
true
,
},
});
},
);
});
});
describe
(
'
updateBoardEpicUserPreferences
'
,
()
=>
{
const
state
=
{
boardId
:
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