Module: Emails::Issues

Included in:
Notify
Defined in:
app/mailers/emails/issues.rb

Instance Method Summary collapse

Instance Method Details

#closed_issue_email(recipient_id, issue_id, updated_by_user_id) ⇒ Object


16
17
18
19
20
21
# File 'app/mailers/emails/issues.rb', line 16

def closed_issue_email(recipient_id, issue_id, updated_by_user_id)
  setup_issue_mail(issue_id, recipient_id)

  @updated_by = User.find(updated_by_user_id)
  mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id))
end

#issue_moved_email(recipient, issue, new_issue, updated_by_user) ⇒ Object


39
40
41
42
43
44
45
# File 'app/mailers/emails/issues.rb', line 39

def issue_moved_email(recipient, issue, new_issue, updated_by_user)
  setup_issue_mail(issue.id, recipient.id)

  @new_issue = new_issue
  @new_project = new_issue.project
  mail_answer_thread(issue, issue_thread_options(updated_by_user.id, recipient.id))
end

#issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id) ⇒ Object


31
32
33
34
35
36
37
# File 'app/mailers/emails/issues.rb', line 31

def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id)
  setup_issue_mail(issue_id, recipient_id)

  @issue_status = status
  @updated_by = User.find(updated_by_user_id)
  mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id))
end

#new_issue_email(recipient_id, issue_id) ⇒ Object


3
4
5
6
7
# File 'app/mailers/emails/issues.rb', line 3

def new_issue_email(recipient_id, issue_id)
  setup_issue_mail(issue_id, recipient_id)

  mail_new_thread(@issue, issue_thread_options(@issue.author_id, recipient_id))
end

#reassigned_issue_email(recipient_id, issue_id, previous_assignee_id, updated_by_user_id) ⇒ Object


9
10
11
12
13
14
# File 'app/mailers/emails/issues.rb', line 9

def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id, updated_by_user_id)
  setup_issue_mail(issue_id, recipient_id)

  @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id
  mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id))
end

#relabeled_issue_email(recipient_id, issue_id, label_names, updated_by_user_id) ⇒ Object


23
24
25
26
27
28
29
# File 'app/mailers/emails/issues.rb', line 23

def relabeled_issue_email(recipient_id, issue_id, label_names, updated_by_user_id)
  setup_issue_mail(issue_id, recipient_id)

  @label_names = label_names
  @labels_url = namespace_project_labels_url(@project.namespace, @project)
  mail_answer_thread(@issue, issue_thread_options(updated_by_user_id, recipient_id))
end