BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b2d5869e
Commit
b2d5869e
authored
Feb 28, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '23602-show-milestone-id-in-a-consistent-way' into 'master'
Show milestone ID in a consistent way Closes #23602 See merge request !8820
parents
4c4810b3
3daf142f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
6 deletions
+5
-6
milestones_helper.rb
app/helpers/milestones_helper.rb
+1
-1
show.html.haml
app/views/projects/milestones/show.html.haml
+2
-3
milestone_spec.rb
spec/features/milestone_spec.rb
+1
-1
milestones_helper_spec.rb
spec/helpers/milestones_helper_spec.rb
+1
-1
No files found.
app/helpers/milestones_helper.rb
View file @
b2d5869e
...
...
@@ -97,7 +97,7 @@ module MilestonesHelper
def
milestone_date_range
(
milestone
)
if
milestone
.
start_date
&&
milestone
.
due_date
"
#{
milestone
.
start_date
.
to_s
(
:medium
)
}
-
#{
milestone
.
due_date
.
to_s
(
:medium
)
}
"
"
#{
milestone
.
start_date
.
to_s
(
:medium
)
}
–
#{
milestone
.
due_date
.
to_s
(
:medium
)
}
"
elsif
milestone
.
due_date
if
milestone
.
due_date
.
past?
"expired on
#{
milestone
.
due_date
.
to_s
(
:medium
)
}
"
...
...
app/views/projects/milestones/show.html.haml
View file @
b2d5869e
...
...
@@ -19,10 +19,9 @@
Open
.header-text-content
%span
.identifier
Milestone ##{@milestone.iid}
%strong
Milestone %
#{
@milestone
.
iid
}
-
if
@milestone
.
due_date
||
@milestone
.
start_date
%span
.creator
·
=
milestone_date_range
(
@milestone
)
.milestone-buttons
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
...
...
spec/features/milestone_spec.rb
View file @
b2d5869e
...
...
@@ -24,7 +24,7 @@ feature 'Milestone', feature: true do
find
(
'input[name="commit"]'
).
click
expect
(
find
(
'.alert-success'
)).
to
have_content
(
'Assign some issues to this milestone.'
)
expect
(
page
).
to
have_content
(
'Nov 16, 2016
-
Dec 16, 2016'
)
expect
(
page
).
to
have_content
(
'Nov 16, 2016
–
Dec 16, 2016'
)
end
end
...
...
spec/helpers/milestones_helper_spec.rb
View file @
b2d5869e
...
...
@@ -17,7 +17,7 @@ describe MilestonesHelper do
it
{
expect
(
result_for
(
due_date:
yesterday
)).
to
eq
(
"expired on
#{
yesterday_formatted
}
"
)
}
it
{
expect
(
result_for
(
start_date:
tomorrow
)).
to
eq
(
"starts on
#{
tomorrow_formatted
}
"
)
}
it
{
expect
(
result_for
(
start_date:
yesterday
)).
to
eq
(
"started on
#{
yesterday_formatted
}
"
)
}
it
{
expect
(
result_for
(
start_date:
yesterday
,
due_date:
tomorrow
)).
to
eq
(
"
#{
yesterday_formatted
}
-
#{
tomorrow_formatted
}
"
)
}
it
{
expect
(
result_for
(
start_date:
yesterday
,
due_date:
tomorrow
)).
to
eq
(
"
#{
yesterday_formatted
}
–
#{
tomorrow_formatted
}
"
)
}
end
describe
'#milestone_counts'
do
...
...
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