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
62ce457e
Commit
62ce457e
authored
Jan 24, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't try to show assignee in approved_merge_request_email if there's no assignee
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
50370d88
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
11 deletions
+27
-11
app/views/notify/approved_merge_request_email.html.haml
app/views/notify/approved_merge_request_email.html.haml
+13
-11
changelogs/unreleased-ee/1601-fix-approved_merge_request_email-when-no-assignee.yml
...601-fix-approved_merge_request_email-when-no-assignee.yml
+4
-0
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+10
-0
No files found.
app/views/notify/approved_merge_request_email.html.haml
View file @
62ce457e
...
...
@@ -121,17 +121,19 @@
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;"
}
%a
.muted
{
href:
user_url
(
@merge_request
.
author
),
style:
"color:#333333;text-decoration:none;"
}
=
@merge_request
.
author
.
name
%tr
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;border-top:1px solid #ededed;"
}
Assignee
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;"
}
%table
.img
{
border:
"0"
,
cellpadding:
"0"
,
cellspacing:
"0"
,
style:
"border-collapse:collapse;"
}
%tbody
%tr
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;padding-right:5px;"
}
%img
.avatar
{
height:
"24"
,
src:
avatar_icon
(
@merge_request
.
assignee
,
24
),
style:
"display:block;border-radius:12px;margin:-2px 0;"
,
width:
"24"
,
alt:
"Avatar"
}
/
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;"
}
%a
.muted
{
href:
user_url
(
@merge_request
.
assignee
),
style:
"color:#333333;text-decoration:none;"
}
=
@merge_request
.
assignee
.
name
-
if
@merge_request
.
assignee
%tr
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;border-top:1px solid #ededed;"
}
Assignee
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;color:#333333;font-weight:400;width:75%;padding-left:5px;border-top:1px solid #ededed;"
}
%table
.img
{
border:
"0"
,
cellpadding:
"0"
,
cellspacing:
"0"
,
style:
"border-collapse:collapse;"
}
%tbody
%tr
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;padding-right:5px;"
}
%img
.avatar
{
height:
"24"
,
src:
avatar_icon
(
@merge_request
.
assignee
,
24
),
style:
"display:block;border-radius:12px;margin:-2px 0;"
,
width:
"24"
,
alt:
"Avatar"
}
/
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;vertical-align:middle;"
}
%a
.muted
{
href:
user_url
(
@merge_request
.
assignee
),
style:
"color:#333333;text-decoration:none;"
}
=
@merge_request
.
assignee
.
name
%tr
.footer
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"
}
...
...
changelogs/unreleased-ee/1601-fix-approved_merge_request_email-when-no-assignee.yml
0 → 100644
View file @
62ce457e
---
title
:
Don't try to show assignee in approved_merge_request_email if there's no assignee
merge_request
:
author
:
spec/mailers/notify_spec.rb
View file @
62ce457e
...
...
@@ -403,6 +403,16 @@ describe Notify do
is_expected
.
to
have_body_text
/
#{
merge_request
.
assignee
.
name
}
/
is_expected
.
to
have_body_text
/
#{
last_approver
.
name
}
/
end
context
'when merge request has no assignee'
do
before
do
merge_request
.
update
(
assignee:
nil
)
end
it
'does not show the assignee'
do
is_expected
.
not_to
have_body_text
'Assignee'
end
end
end
describe
'that are unapproved'
do
...
...
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