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
4b7cf4a5
Commit
4b7cf4a5
authored
Jul 18, 2019
by
Eugenia Grieff
Committed by
Bob Van Landuyt
Jul 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE port for milestones should not be set on epics issue promotion
parent
0b859d2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+7
-0
app/services/issuable/clone/attributes_rewriter.rb
app/services/issuable/clone/attributes_rewriter.rb
+2
-0
spec/models/concerns/issuable_spec.rb
spec/models/concerns/issuable_spec.rb
+21
-0
No files found.
app/models/concerns/issuable.rb
View file @
4b7cf4a5
...
...
@@ -427,4 +427,11 @@ module Issuable
def
wipless_title_changed
(
old_title
)
old_title
!=
title
end
##
# Overridden on EE module
#
def
supports_milestone?
respond_to?
(
:milestone_id
)
end
end
app/services/issuable/clone/attributes_rewriter.rb
View file @
4b7cf4a5
...
...
@@ -17,6 +17,8 @@ module Issuable
private
def
cloneable_milestone
return
unless
new_entity
.
supports_milestone?
title
=
original_entity
.
milestone
&
.
title
return
unless
title
...
...
spec/models/concerns/issuable_spec.rb
View file @
4b7cf4a5
...
...
@@ -774,4 +774,25 @@ describe Issuable do
end
end
end
describe
'#supports_milestone?'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
group:
group
)
}
context
"for issues"
do
let
(
:issue
)
{
build
(
:issue
,
project:
project
)
}
it
'returns true'
do
expect
(
issue
.
supports_milestone?
).
to
be_truthy
end
end
context
"for merge requests"
do
let
(
:merge_request
)
{
build
(
:merge_request
,
target_project:
project
,
source_project:
project
)
}
it
'returns true'
do
expect
(
merge_request
.
supports_milestone?
).
to
be_truthy
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