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
b8587050
Commit
b8587050
authored
Apr 27, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make build happy
parent
b263c117
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/system_note_metadata.rb
app/models/system_note_metadata.rb
+1
-1
app/services/system_note_service.rb
app/services/system_note_service.rb
+1
-1
spec/models/related_issue_spec.rb
spec/models/related_issue_spec.rb
+2
-2
No files found.
app/models/system_note_metadata.rb
View file @
b8587050
...
...
@@ -2,7 +2,7 @@ class SystemNoteMetadata < ActiveRecord::Base
ICON_TYPES
=
%w[
commit description merge confidential visible label assignee cross_reference
title time_tracking branch milestone discussion task moved opened closed merged
outdated approved unapproved relate
outdated approved unapproved relate
unrelate
]
.
freeze
validates
:note
,
presence:
true
...
...
app/services/system_note_service.rb
View file @
b8587050
...
...
@@ -581,7 +581,7 @@ module SystemNoteService
def
unrelate_issue
(
noteable
,
noteable_ref
,
user
)
body
=
"removed the relation with
#{
noteable_ref
.
to_reference
(
noteable
.
project
)
}
"
create_note
(
NoteSummary
.
new
(
noteable
,
noteable
.
project
,
user
,
body
,
action:
'relate'
))
create_note
(
NoteSummary
.
new
(
noteable
,
noteable
.
project
,
user
,
body
,
action:
'
un
relate'
))
end
# Called when the merge request is approved by user
...
...
spec/models/related_issue_spec.rb
View file @
b8587050
...
...
@@ -7,10 +7,10 @@ describe RelatedIssue do
end
describe
"Validation"
do
subject
{
build
:related_issue
}
subject
{
create
:related_issue
}
it
{
is_expected
.
to
validate_presence_of
(
:issue
)
}
it
{
is_expected
.
to
validate_presence_of
(
:related_issue
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:issue
_id
).
scoped_to
(
:related_issue_id
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:issue
).
scoped_to
(
:related_issue_id
)
}
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