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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
d97d35d3
Commit
d97d35d3
authored
Mar 26, 2019
by
Mark Fletcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug when reopening milestone from index page
parent
30479246
Changes
3
Hide 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 @
d97d35d3
...
...
@@ -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 @
d97d35d3
---
title
:
Fix bug when reopening milestone from index page
merge_request
:
author
:
type
:
fixed
spec/features/milestone_spec.rb
View file @
d97d35d3
...
...
@@ -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