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
ac3e5a58
Commit
ac3e5a58
authored
Aug 24, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace `is_project_milestone?` with `project_milestone?`
parent
87467127
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
8 deletions
+8
-8
app/helpers/milestones_routing_helper.rb
app/helpers/milestones_routing_helper.rb
+2
-2
app/models/concerns/milestoneish.rb
app/models/concerns/milestoneish.rb
+1
-1
app/models/milestone.rb
app/models/milestone.rb
+1
-1
app/services/milestones/close_service.rb
app/services/milestones/close_service.rb
+1
-1
app/services/milestones/create_service.rb
app/services/milestones/create_service.rb
+1
-1
app/services/milestones/destroy_service.rb
app/services/milestones/destroy_service.rb
+1
-1
app/services/milestones/reopen_service.rb
app/services/milestones/reopen_service.rb
+1
-1
No files found.
app/helpers/milestones_routing_helper.rb
View file @
ac3e5a58
...
...
@@ -2,7 +2,7 @@ module MilestonesRoutingHelper
def
milestone_path
(
milestone
,
*
args
)
if
milestone
.
is_group_milestone?
group_milestone_path
(
milestone
.
group
,
milestone
,
*
args
)
elsif
milestone
.
is_
project_milestone?
elsif
milestone
.
project_milestone?
project_milestone_path
(
milestone
.
project
,
milestone
,
*
args
)
end
end
...
...
@@ -10,7 +10,7 @@ module MilestonesRoutingHelper
def
milestone_url
(
milestone
,
*
args
)
if
milestone
.
is_group_milestone?
group_milestone_url
(
milestone
.
group
,
milestone
,
*
args
)
elsif
milestone
.
is_
project_milestone?
elsif
milestone
.
project_milestone?
project_milestone_url
(
milestone
.
project
,
milestone
,
*
args
)
end
end
...
...
app/models/concerns/milestoneish.rb
View file @
ac3e5a58
...
...
@@ -74,7 +74,7 @@ module Milestoneish
false
end
def
is_
project_milestone?
def
project_milestone?
false
end
...
...
app/models/milestone.rb
View file @
ac3e5a58
...
...
@@ -211,7 +211,7 @@ class Milestone < ActiveRecord::Base
group_id
.
present?
end
def
is_
project_milestone?
def
project_milestone?
project_id
.
present?
end
...
...
app/services/milestones/close_service.rb
View file @
ac3e5a58
module
Milestones
class
CloseService
<
Milestones
::
BaseService
def
execute
(
milestone
)
if
milestone
.
close
&&
milestone
.
is_
project_milestone?
if
milestone
.
close
&&
milestone
.
project_milestone?
event_service
.
close_milestone
(
milestone
,
current_user
)
end
...
...
app/services/milestones/create_service.rb
View file @
ac3e5a58
...
...
@@ -3,7 +3,7 @@ module Milestones
def
execute
milestone
=
parent
.
milestones
.
new
(
params
)
if
milestone
.
save
&&
milestone
.
is_
project_milestone?
if
milestone
.
save
&&
milestone
.
project_milestone?
event_service
.
open_milestone
(
milestone
,
current_user
)
end
...
...
app/services/milestones/destroy_service.rb
View file @
ac3e5a58
module
Milestones
class
DestroyService
<
Milestones
::
BaseService
def
execute
(
milestone
)
return
unless
milestone
.
is_
project_milestone?
return
unless
milestone
.
project_milestone?
Milestone
.
transaction
do
update_params
=
{
milestone:
nil
}
...
...
app/services/milestones/reopen_service.rb
View file @
ac3e5a58
module
Milestones
class
ReopenService
<
Milestones
::
BaseService
def
execute
(
milestone
)
if
milestone
.
activate
&&
milestone
.
is_
project_milestone?
if
milestone
.
activate
&&
milestone
.
project_milestone?
event_service
.
reopen_milestone
(
milestone
,
current_user
)
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