Commit 06883004 authored by maeda's avatar maeda

Start date and due date in email notifications (#13307).

Patch by  Senya Senya.


git-svn-id: https://svn.redmine.org/redmine/trunk@17840 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent d35222cc
......@@ -321,8 +321,8 @@ module IssuesHelper
def email_issue_attributes(issue, user, html)
items = []
%w(author status priority assigned_to category fixed_version).each do |attribute|
unless issue.disabled_core_fields.include?(attribute+"_id")
%w(author status priority assigned_to category fixed_version start_date due_date).each do |attribute|
if issue.disabled_core_fields.grep(/^#{attribute}(_id)?$/).empty?
if html
items << content_tag('strong', "#{l("field_#{attribute}")}: ") + (issue.send attribute)
else
......
......@@ -378,12 +378,14 @@ class MailerTest < ActiveSupport::TestCase
def test_issue_add_should_not_include_disabled_fields
issue = Issue.find(2)
tracker = issue.tracker
tracker.core_fields -= ['fixed_version_id']
tracker.core_fields -= ['fixed_version_id', 'start_date']
tracker.save!
assert Mailer.deliver_issue_add(issue)
assert_mail_body_no_match 'Target version', last_email
assert_mail_body_no_match 'Start date', last_email
assert_select_email do
assert_select 'li', :text => /Target version/, :count => 0
assert_select 'li', :text => /Start date/, :count => 0
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment