Fixed new mr/issue emails
This commit is contained in:
parent
ecf3b2e471
commit
2f585840db
4 changed files with 12 additions and 7 deletions
|
@ -1,9 +1,9 @@
|
||||||
module Emails
|
module Emails
|
||||||
module Issues
|
module Issues
|
||||||
def new_issue_email(issue_id)
|
def new_issue_email(recipient_id, issue_id)
|
||||||
@issue = Issue.find(issue_id)
|
@issue = Issue.find(issue_id)
|
||||||
@project = @issue.project
|
@project = @issue.project
|
||||||
mail(to: @issue.assignee_email, subject: subject("new issue ##{@issue.id}", @issue.title))
|
mail(to: recipient(recipient_id), subject: subject("new issue ##{@issue.id}", @issue.title))
|
||||||
end
|
end
|
||||||
|
|
||||||
def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
|
def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
module Emails
|
module Emails
|
||||||
module MergeRequests
|
module MergeRequests
|
||||||
def new_merge_request_email(merge_request_id)
|
def new_merge_request_email(recipient_id, merge_request_id)
|
||||||
@merge_request = MergeRequest.find(merge_request_id)
|
@merge_request = MergeRequest.find(merge_request_id)
|
||||||
@project = @merge_request.project
|
@project = @merge_request.project
|
||||||
mail(to: @merge_request.assignee_email, subject: subject("new merge request !#{@merge_request.id}", @merge_request.title))
|
mail(to: recipient(recipient_id), subject: subject("new merge request !#{@merge_request.id}", @merge_request.title))
|
||||||
end
|
end
|
||||||
|
|
||||||
def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
|
def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
%p
|
%p
|
||||||
New Issue was created and assigned to you.
|
New Issue was created.
|
||||||
%p
|
%p
|
||||||
= "Issue ##{@issue.id}"
|
= "Issue ##{@issue.id}"
|
||||||
= link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
|
= link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
|
||||||
|
%p
|
||||||
|
Author: #{@issue.author_name}
|
||||||
|
%p
|
||||||
|
Assignee: #{@issue.assignee_name}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
New Issue was created and assigned to you.
|
New Issue was created.
|
||||||
|
|
||||||
|
|
||||||
Issue <%= @issue.id %>: <%= url_for(project_issue_url(@issue.project, @issue)) %>
|
Issue <%= @issue.id %>: <%= url_for(project_issue_url(@issue.project, @issue)) %>
|
||||||
|
Author: <%= @issue.author_name %>
|
||||||
|
Asignee: <%= @issue.assignee_name %>
|
||||||
|
|
Loading…
Reference in a new issue