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
c0b845c1
Commit
c0b845c1
authored
Mar 26, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
79dbe418
81fe9e9b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
app/views/shared/milestones/_milestone.html.haml
app/views/shared/milestones/_milestone.html.haml
+1
-1
changelogs/unreleased/49910-reopening-a-closed-milestone-from-the-closed-milestones-page-fails2.yml
...osed-milestone-from-the-closed-milestones-page-fails2.yml
+5
-0
spec/features/milestone_spec.rb
spec/features/milestone_spec.rb
+28
-0
No files found.
app/views/shared/milestones/_milestone.html.haml
View file @
c0b845c1
...
...
@@ -52,7 +52,7 @@
=
link_to
'Close Milestone'
,
project_milestone_path
(
@project
,
milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
remote:
true
,
class:
"btn btn-sm btn-close btn-grouped"
-
unless
milestone
.
active?
=
link_to
'Reopen Milestone'
,
project_milestone_path
(
@project
,
milestone
,
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-grouped btn-reopen"
=
link_to
'Reopen Milestone'
,
project_milestone_path
(
@project
,
milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-grouped btn-reopen"
-
if
@group
-
if
can?
(
current_user
,
:admin_milestone
,
@group
)
-
if
milestone
.
closed?
...
...
changelogs/unreleased/49910-reopening-a-closed-milestone-from-the-closed-milestones-page-fails2.yml
0 → 100644
View file @
c0b845c1
---
title
:
Fix bug when reopening milestone from index page
merge_request
:
author
:
type
:
fixed
spec/features/milestone_spec.rb
View file @
c0b845c1
...
...
@@ -122,4 +122,32 @@ describe 'Milestone' do
expect
(
page
).
to
have_selector
(
'.popover'
)
end
end
describe
'reopen closed milestones'
do
before
do
create
(
:milestone
,
:closed
,
project:
project
)
end
describe
'group milestones page'
do
it
'reopens the milestone'
do
visit
group_milestones_path
(
group
,
{
state:
'closed'
})
click_link
'Reopen Milestone'
expect
(
page
).
not_to
have_selector
(
'.status-box-closed'
)
expect
(
page
).
to
have_selector
(
'.status-box-open'
)
end
end
describe
'project milestones page'
do
it
'reopens the milestone'
do
visit
project_milestones_path
(
project
,
{
state:
'closed'
})
click_link
'Reopen Milestone'
expect
(
page
).
not_to
have_selector
(
'.status-box-closed'
)
expect
(
page
).
to
have_selector
(
'.status-box-open'
)
end
end
end
end
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