Fix missing to on reassign MR text email to unassigned.

Factors out text MR and issue email.
This commit is contained in:
Ciro Santilli 2014-09-03 01:26:40 +02:00
parent 4102eb3b85
commit c586192813
3 changed files with 8 additions and 12 deletions

View file

@ -0,0 +1,6 @@
Reassigned <%= issuable.class.model_name.human.titleize %> <%= issuable.iid %>
<%= url_for([issuable.project, issuable, {only_path: false}]) %>
Assignee changed <%= "from #{@previous_assignee.name}" if @previous_assignee -%>
to <%= "#{issuable.assignee_id ? issuable.assignee_name : 'Unassigned'}" %>

View file

@ -1,5 +1 @@
Reassigned Issue <%= @issue.iid %>
<%= url_for(project_issue_url(@issue.project, @issue)) %>
Assignee changed <%= "from #{@previous_assignee.name}" if @previous_assignee %> to <%= "#{@issue.assignee_id ? @issue.assignee_name : 'Unassigned'}" %>
<%= render 'reassigned_issuable_email', issuable: @issue %>

View file

@ -1,7 +1 @@
Reassigned Merge Request #<%= @merge_request.iid %>
<%= url_for(project_merge_request_url(@merge_request.target_project, @merge_request)) %>
Assignee changed <%= "from #{@previous_assignee.name}" if @previous_assignee %> to <%= @merge_request.assignee_name %>
<%= render 'reassigned_issuable_email', issuable: @merge_request %>