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
a080a18d
Commit
a080a18d
authored
Jan 20, 2022
by
Scott Stern
Committed by
Brandon Labuschagne
Jan 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sort for milestones in filtered search
parent
9f4a28ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
app/assets/javascripts/boards/graphql/group_board_milestones.query.graphql
...ripts/boards/graphql/group_board_milestones.query.graphql
+6
-1
app/assets/javascripts/boards/graphql/project_board_milestones.query.graphql
...pts/boards/graphql/project_board_milestones.query.graphql
+6
-1
spec/features/boards/board_filters_spec.rb
spec/features/boards/board_filters_spec.rb
+7
-4
No files found.
app/assets/javascripts/boards/graphql/group_board_milestones.query.graphql
View file @
a080a18d
query
GroupBoardMilestones
(
$fullPath
:
ID
!,
$searchTerm
:
String
,
$state
:
MilestoneStateEnum
)
{
group
(
fullPath
:
$fullPath
)
{
id
milestones
(
includeAncestors
:
true
,
searchTitle
:
$searchTerm
,
state
:
$state
)
{
milestones
(
includeAncestors
:
true
searchTitle
:
$searchTerm
state
:
$state
sort
:
EXPIRED_LAST_DUE_DATE_ASC
)
{
nodes
{
id
title
...
...
app/assets/javascripts/boards/graphql/project_board_milestones.query.graphql
View file @
a080a18d
query
ProjectBoardMilestones
(
$fullPath
:
ID
!,
$searchTerm
:
String
,
$state
:
MilestoneStateEnum
)
{
project
(
fullPath
:
$fullPath
)
{
id
milestones
(
searchTitle
:
$searchTerm
,
includeAncestors
:
true
,
state
:
$state
)
{
milestones
(
searchTitle
:
$searchTerm
includeAncestors
:
true
state
:
$state
sort
:
EXPIRED_LAST_DUE_DATE_ASC
)
{
nodes
{
id
title
...
...
spec/features/boards/board_filters_spec.rb
View file @
a080a18d
...
...
@@ -7,8 +7,8 @@ RSpec.describe 'Issue board filters', :js do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:board
)
{
create
(
:board
,
project:
project
)
}
let_it_be
(
:project_label
)
{
create
(
:label
,
project:
project
,
title:
'Label'
)
}
let_it_be
(
:milestone_1
)
{
create
(
:milestone
,
project:
project
)
}
let_it_be
(
:milestone_2
)
{
create
(
:milestone
,
project:
project
)
}
let_it_be
(
:milestone_1
)
{
create
(
:milestone
,
project:
project
,
due_date:
3
.
days
.
from_now
)
}
let_it_be
(
:milestone_2
)
{
create
(
:milestone
,
project:
project
,
due_date:
Date
.
tomorrow
)
}
let_it_be
(
:release
)
{
create
(
:release
,
tag:
'v1.0'
,
project:
project
,
milestones:
[
milestone_1
])
}
let_it_be
(
:release_2
)
{
create
(
:release
,
tag:
'v2.0'
,
project:
project
,
milestones:
[
milestone_2
])
}
let_it_be
(
:issue_1
)
{
create
(
:issue
,
project:
project
,
milestone:
milestone_1
,
author:
user
)
}
...
...
@@ -134,8 +134,11 @@ RSpec.describe 'Issue board filters', :js do
expect
(
filter_dropdown
).
to
have_content
(
'Any'
)
expect
(
filter_dropdown
).
to
have_content
(
'Started'
)
expect
(
filter_dropdown
).
to
have_content
(
'Upcoming'
)
expect
(
filter_dropdown
).
to
have_content
(
milestone_1
.
title
)
expect
(
filter_dropdown
).
to
have_content
(
milestone_2
.
title
)
dropdown_nodes
=
page
.
find_all
(
'.gl-filtered-search-suggestion-list > .gl-filtered-search-suggestion'
)
expect
(
dropdown_nodes
[
4
]).
to
have_content
(
milestone_2
.
title
)
expect
(
dropdown_nodes
.
last
).
to
have_content
(
milestone_1
.
title
)
click_on
milestone_1
.
title
filter_submit
.
click
...
...
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