mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 15:31:12 +00:00
Start date and due date in email notifications (#13307).
Patch by Senya Senya. git-svn-id: http://svn.redmine.org/redmine/trunk@17840 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a3e6ae9b35
commit
7ca65bedc0
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user