Skip to content

Commit

Permalink
Fix missing to on reassign MR text email to unassigned.
Browse files Browse the repository at this point in the history
Factors out text MR and issue email.
  • Loading branch information
cirosantilli committed Sep 2, 2014
1 parent 4102eb3 commit c586192
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
6 changes: 6 additions & 0 deletions app/views/notify/_reassigned_issuable_email.text.erb
Original file line number Diff line number Diff line change
@@ -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'}" %>
6 changes: 1 addition & 5 deletions app/views/notify/reassigned_issue_email.text.erb
Original file line number Diff line number Diff line change
@@ -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 %>
8 changes: 1 addition & 7 deletions app/views/notify/reassigned_merge_request_email.text.erb
Original file line number Diff line number Diff line change
@@ -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 %>

0 comments on commit c586192

Please sign in to comment.