From 38f540a7019d194fb02ddcd6b4d8bcebef1423f9 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 10 Oct 2007 19:43:54 +0000 Subject: [PATCH] Added custom fields in issue related mail notifications. git-svn-id: http://redmine.rubyforge.org/svn/trunk@822 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mailer.rb | 1 + app/models/version.rb | 2 ++ app/views/mailer/_issue_text_html.rhtml | 12 +++++++++--- app/views/mailer/_issue_text_plain.rhtml | 11 ++++++++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 925d46ea7..5f655db85 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -18,6 +18,7 @@ class Mailer < ActionMailer::Base helper ApplicationHelper helper IssuesHelper + helper CustomFieldsHelper def account_information(user, password) set_language_if_valid user.language diff --git a/app/models/version.rb b/app/models/version.rb index bc58e0de4..36da55098 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -59,6 +59,8 @@ class Version < ActiveRecord::Base @wiki_page end + def to_s; name end + # Versions are sorted by effective_date # Those with no effective_date are at the end, sorted by name def <=>(version) diff --git a/app/views/mailer/_issue_text_html.rhtml b/app/views/mailer/_issue_text_html.rhtml index 33527a145..80885ebab 100644 --- a/app/views/mailer/_issue_text_html.rhtml +++ b/app/views/mailer/_issue_text_html.rhtml @@ -2,9 +2,15 @@ <%= issue.subject %> <%= textilizable(issue.description) %> diff --git a/app/views/mailer/_issue_text_plain.rhtml b/app/views/mailer/_issue_text_plain.rhtml index 6c23fcd14..5e211f9af 100644 --- a/app/views/mailer/_issue_text_plain.rhtml +++ b/app/views/mailer/_issue_text_plain.rhtml @@ -1,8 +1,13 @@ <%= "#{issue.tracker.name} ##{issue.id}: #{issue.subject}" %> <%= url_for :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %> -<%=l(:field_author)%>: <%= issue.author.name %> -<%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %> -<%=l(:field_status)%>: <%= issue.status.name %> +<%=l(:field_author)%>: <%= issue.author %> +<%=l(:field_status)%>: <%= issue.status %> +<%=l(:field_priority)%>: <%= issue.priority %> +<%=l(:field_assigned_to)%>: <%= issue.assigned_to %> +<%=l(:field_category)%>: <%= issue.category %> +<%=l(:field_fixed_version)%>: <%= issue.fixed_version %> +<% issue.custom_values.each do |c| %><%= c.custom_field.name %>: <%= show_value(c) %> +<% end %> <%= issue.description %> -- 2.39.5