@@ -155,9 +155,10 class MailHandler < ActionMailer::Base | |||
|
155 | 155 | # ignore CLI-supplied defaults for new issues |
|
156 | 156 | @@handler_options[:issue].clear |
|
157 | 157 | |
|
158 |
journal = issue.init_journal(user |
|
|
158 | journal = issue.init_journal(user) | |
|
159 | 159 | issue.safe_attributes = issue_attributes_from_keywords(issue) |
|
160 | 160 | issue.safe_attributes = {'custom_field_values' => custom_field_values_from_keywords(issue)} |
|
161 | journal.notes = cleaned_up_text_body | |
|
161 | 162 | add_attachments(issue) |
|
162 | 163 | issue.save! |
|
163 | 164 | logger.info "MailHandler: issue ##{issue.id} updated by #{user}" if logger && logger.info |
@@ -70,6 +70,7 class MailHandlerTest < ActiveSupport::TestCase | |||
|
70 | 70 | # keywords should be removed from the email body |
|
71 | 71 | assert !issue.description.match(/^Project:/i) |
|
72 | 72 | assert !issue.description.match(/^Status:/i) |
|
73 | assert !issue.description.match(/^Start Date:/i) | |
|
73 | 74 | # Email notification should be sent |
|
74 | 75 | mail = ActionMailer::Base.deliveries.last |
|
75 | 76 | assert_not_nil mail |
@@ -318,6 +319,9 class MailHandlerTest < ActiveSupport::TestCase | |||
|
318 | 319 | assert_equal '2010-12-31', issue.due_date.to_s |
|
319 | 320 | assert_equal User.find_by_login('jsmith'), issue.assigned_to |
|
320 | 321 | assert_equal "52.6", issue.custom_value_for(CustomField.find_by_name('Float field')).value |
|
322 | # keywords should be removed from the email body | |
|
323 | assert !journal.notes.match(/^Status:/i) | |
|
324 | assert !journal.notes.match(/^Start Date:/i) | |
|
321 | 325 | end |
|
322 | 326 | |
|
323 | 327 | def test_add_issue_note_should_send_email_notification |
General Comments 0
You need to be logged in to leave comments.
Login now