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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
f49fb5dc
Commit
f49fb5dc
authored
Jul 01, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error when reassign issue/merge_request from non-assigned. Fixes #3201
parent
ef9298fe
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
10 deletions
+12
-10
app/mailers/emails/issues.rb
app/mailers/emails/issues.rb
+1
-1
app/mailers/emails/merge_requests.rb
app/mailers/emails/merge_requests.rb
+1
-1
app/views/notify/reassigned_issue_email.html.haml
app/views/notify/reassigned_issue_email.html.haml
+4
-2
app/views/notify/reassigned_issue_email.text.erb
app/views/notify/reassigned_issue_email.text.erb
+1
-3
app/views/notify/reassigned_merge_request_email.html.haml
app/views/notify/reassigned_merge_request_email.html.haml
+4
-2
app/views/notify/reassigned_merge_request_email.text.erb
app/views/notify/reassigned_merge_request_email.text.erb
+1
-1
No files found.
app/mailers/emails/issues.rb
View file @
f49fb5dc
...
...
@@ -8,7 +8,7 @@ module Emails
def
reassigned_issue_email
(
recipient_id
,
issue_id
,
previous_assignee_id
)
@issue
=
Issue
.
find
(
issue_id
)
@previous_assignee
||=
User
.
find
(
previous_assignee_id
)
@previous_assignee
=
User
.
find_by_id
(
previous_assignee_id
)
if
previous_assignee_id
@project
=
@issue
.
project
mail
(
to:
recipient
(
recipient_id
),
subject:
subject
(
"changed issue #
#{
@issue
.
id
}
"
,
@issue
.
title
))
end
...
...
app/mailers/emails/merge_requests.rb
View file @
f49fb5dc
...
...
@@ -8,7 +8,7 @@ module Emails
def
reassigned_merge_request_email
(
recipient_id
,
merge_request_id
,
previous_assignee_id
)
@merge_request
=
MergeRequest
.
find
(
merge_request_id
)
@previous_assignee
||=
User
.
find
(
previous_assignee_id
)
@previous_assignee
=
User
.
find_by_id
(
previous_assignee_id
)
if
previous_assignee_id
@project
=
@merge_request
.
project
mail
(
to:
recipient
(
recipient_id
),
subject:
subject
(
"changed merge request !
#{
@merge_request
.
id
}
"
,
@merge_request
.
title
))
end
...
...
app/views/notify/reassigned_issue_email.html.haml
View file @
f49fb5dc
...
...
@@ -2,7 +2,9 @@
=
"Reassigned Issue #
#{
@issue
.
id
}
"
=
link_to_gfm
truncate
(
@issue
.
title
,
length:
30
),
project_issue_url
(
@issue
.
project
,
@issue
)
%p
Assignee changed from
Assignee changed
-
if
@previous_assignee
from
%strong
#{
@previous_assignee
.
name
}
to
%strong
#{
@issue
.
assignee_name
}
...
...
app/views/notify/reassigned_issue_email.text.erb
View file @
f49fb5dc
...
...
@@ -2,6 +2,4 @@ Reassigned Issue <%= @issue.id %>
<%=
url_for
(
project_issue_url
(
@issue
.
project
,
@issue
))
%>
Assignee changed from
<%=
@previous_assignee
.
name
%>
to
<%=
@issue
.
assignee_name
%>
Assignee changed
<%=
"from
#{
@previous_assignee
.
name
}
"
if
@previous_assignee
%>
to
<%=
@issue
.
assignee_name
%>
app/views/notify/reassigned_merge_request_email.html.haml
View file @
f49fb5dc
...
...
@@ -2,7 +2,9 @@
=
"Reassigned Merge Request !
#{
@merge_request
.
id
}
"
=
link_to_gfm
truncate
(
@merge_request
.
title
,
length:
30
),
project_merge_request_url
(
@merge_request
.
project
,
@merge_request
)
%p
Assignee changed from
Assignee changed
-
if
@previous_assignee
from
%strong
#{
@previous_assignee
.
name
}
to
%strong
#{
@merge_request
.
assignee_name
}
app/views/notify/reassigned_merge_request_email.text.erb
View file @
f49fb5dc
...
...
@@ -3,5 +3,5 @@ Reassigned Merge Request <%= @merge_request.id %>
<%=
url_for
(
project_merge_request_url
(
@merge_request
.
project
,
@merge_request
))
%>
Assignee changed
from
<%=
@previous_assignee
.
nam
e
%>
to
<%=
@merge_request
.
assignee_name
%>
Assignee changed
<%=
"from
#{
@previous_assignee
.
name
}
"
if
@previous_assigne
e
%>
to
<%=
@merge_request
.
assignee_name
%>
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