gitlab-org--gitlab-foss/app/mailers/emails/issues.rb
Drew Blessing 57ad81a9c5 Fix minor errors/annoyances in email templates
There was some funny syntax in merge request email templates. There was a ! before
the merge request number when there probably should be a #. This may be some carry over
from markdown but should not be in email templates.  There were also some capitalization
discrepancies among the subject lines. For those OCD people out there I standardized the
capitalization. :)
2013-11-08 10:20:15 -06:00

33 lines
1.2 KiB
Ruby

module Emails
module Issues
def new_issue_email(recipient_id, issue_id)
@issue = Issue.find(issue_id)
@project = @issue.project
mail(to: recipient(recipient_id), subject: subject("New issue ##{@issue.iid}", @issue.title))
end
def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
@issue = Issue.find(issue_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.iid}", @issue.title))
end
def closed_issue_email(recipient_id, issue_id, updated_by_user_id)
@issue = Issue.find issue_id
@project = @issue.project
@updated_by = User.find updated_by_user_id
mail(to: recipient(recipient_id),
subject: subject("Closed issue ##{@issue.iid}", @issue.title))
end
def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id)
@issue = Issue.find issue_id
@issue_status = status
@project = @issue.project
@updated_by = User.find updated_by_user_id
mail(to: recipient(recipient_id),
subject: subject("Changed issue ##{@issue.iid}", @issue.title))
end
end
end