Email handler: set a default issue subject if the email subject is blank (#3850).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2873 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-09-12 09:33:22 +00:00
parent 7f4635022f
commit 275b555b09
1 changed files with 3 additions and 0 deletions

View File

@ -121,6 +121,9 @@ class MailHandler < ActionMailer::Base
issue.status = status issue.status = status
end end
issue.subject = email.subject.chomp.toutf8 issue.subject = email.subject.chomp.toutf8
if issue.subject.blank?
issue.subject = '(no subject)'
end
issue.description = plain_text_body issue.description = plain_text_body
# custom fields # custom fields
issue.custom_field_values = issue.available_custom_fields.inject({}) do |h, c| issue.custom_field_values = issue.available_custom_fields.inject({}) do |h, c|