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
93f0e5d8
Commit
93f0e5d8
authored
Nov 30, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show closed epics in roadmap
parent
cd753a8c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
ee/app/assets/javascripts/roadmap/utils/roadmap_utils.js
ee/app/assets/javascripts/roadmap/utils/roadmap_utils.js
+3
-1
ee/app/views/groups/roadmap/show.html.haml
ee/app/views/groups/roadmap/show.html.haml
+1
-1
ee/spec/features/groups/group_roadmap_spec.rb
ee/spec/features/groups/group_roadmap_spec.rb
+2
-1
ee/spec/javascripts/roadmap/utils/roadmap_utils_spec.js
ee/spec/javascripts/roadmap/utils/roadmap_utils_spec.js
+16
-0
No files found.
ee/app/assets/javascripts/roadmap/utils/roadmap_utils.js
View file @
93f0e5d8
...
...
@@ -213,7 +213,9 @@ export const getEpicsPathForPreset = ({
const
startDate
=
`
${
start
.
getFullYear
()}
-
${
start
.
getMonth
()
+
1
}
-
${
start
.
getDate
()}
`
;
const
endDate
=
`
${
end
.
getFullYear
()}
-
${
end
.
getMonth
()
+
1
}
-
${
end
.
getDate
()}
`
;
epicsPath
+=
`?start_date=
${
startDate
}
&end_date=
${
endDate
}
`
;
epicsPath
+=
epicsPath
.
indexOf
(
'
?
'
)
>
-
1
?
'
&
'
:
'
?
'
;
epicsPath
+=
`start_date=
${
startDate
}
&end_date=
${
endDate
}
`
;
if
(
filterQueryString
)
{
epicsPath
+=
`&
${
filterQueryString
}
`
;
...
...
ee/app/views/groups/roadmap/show.html.haml
View file @
93f0e5d8
...
...
@@ -9,6 +9,6 @@
-
if
@epics_count
!=
0
=
render
'shared/epic/search_bar'
,
type: :epics
,
show_roadmap_presets:
true
#js-roadmap
{
data:
{
epics_path:
group_epics_path
(
@group
,
format: :json
),
group_id:
@group
.
id
,
empty_state_illustration:
image_path
(
'illustrations/epics/roadmap.svg'
),
has_filters_applied:
"#{has_filters_applied}"
,
new_epic_endpoint:
group_epics_path
(
@group
),
preset_type:
roadmap_layout
}
}
#js-roadmap
{
data:
{
epics_path:
group_epics_path
(
@group
,
state:
'all'
,
format: :json
),
group_id:
@group
.
id
,
empty_state_illustration:
image_path
(
'illustrations/epics/roadmap.svg'
),
has_filters_applied:
"#{has_filters_applied}"
,
new_epic_endpoint:
group_epics_path
(
@group
),
preset_type:
roadmap_layout
}
}
-
else
=
render
'shared/empty_states/roadmap'
ee/spec/features/groups/group_roadmap_spec.rb
View file @
93f0e5d8
...
...
@@ -27,6 +27,7 @@ describe 'group epic roadmap', :js do
context
'when epics exist for the group'
do
let!
(
:epic_with_bug
)
{
create
(
:labeled_epic
,
group:
group
,
start_date:
10
.
days
.
ago
,
end_date:
1
.
day
.
ago
,
labels:
[
bug_label
])
}
let!
(
:epic_with_critical
)
{
create
(
:labeled_epic
,
group:
group
,
start_date:
20
.
days
.
ago
,
end_date:
2
.
days
.
ago
,
labels:
[
critical_label
])
}
let!
(
:closed_epic
)
{
create
(
:epic
,
:closed
,
group:
group
,
start_date:
20
.
days
.
ago
,
end_date:
2
.
days
.
ago
)
}
before
do
visit
group_roadmap_path
(
group
)
...
...
@@ -70,7 +71,7 @@ describe 'group epic roadmap', :js do
it
'renders all group epics within roadmap'
do
page
.
within
(
'.roadmap-container .epics-list-section'
)
do
expect
(
page
).
to
have_selector
(
'.epics-list-item .epic-title'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'.epics-list-item .epic-title'
,
count:
3
)
end
end
end
...
...
ee/spec/javascripts/roadmap/utils/roadmap_utils_spec.js
View file @
93f0e5d8
...
...
@@ -187,4 +187,20 @@ describe('getEpicsPathForPreset', () => {
`
${
basePath
}
?start_date=2017-12-1&end_date=2018-6-30&scope=all&utf8=✓&state=opened&label_name[]=Bug`
,
);
});
it
(
'
returns epics path string when basePath already contains a query param
'
,
()
=>
{
const
basePathWithQuery
=
`
${
basePath
}
?state=all`
;
const
timeframeMonths
=
getTimeframeForMonthsView
(
new
Date
(
2018
,
0
,
1
));
const
epicsPath
=
getEpicsPathForPreset
({
basePath
:
basePathWithQuery
,
filterQueryString
,
timeframe
:
timeframeMonths
,
presetType
:
PRESET_TYPES
.
MONTHS
,
});
expect
(
epicsPath
).
toBe
(
`
${
basePathWithQuery
}
&start_date=2017-12-1&end_date=2018-6-30&scope=all&utf8=✓&state=opened&label_name[]=Bug`
,
);
});
});
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