summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-09-12 09:33:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-09-12 09:33:22 +0000
commit275b555b0974b0d2cae263398df4067ff275836e (patch)
tree09dc33858343c2407c29137d7485d4c877eaf0de /app
parent7f4635022f7dab0fb755868a99a0db6a3e45ec81 (diff)
downloadredmine-275b555b0974b0d2cae263398df4067ff275836e.tar.gz
redmine-275b555b0974b0d2cae263398df4067ff275836e.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/models/mail_handler.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 599a473a6..7d868d5d2 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -121,6 +121,9 @@ class MailHandler < ActionMailer::Base
issue.status = status
end
issue.subject = email.subject.chomp.toutf8
+ if issue.subject.blank?
+ issue.subject = '(no subject)'
+ end
issue.description = plain_text_body
# custom fields
issue.custom_field_values = issue.available_custom_fields.inject({}) do |h, c|