Defect #5820 ยป feature-5820.patch
| app/models/mail_handler.rb | ||
|---|---|---|
|
issue.safe_attributes = {'custom_field_values' => custom_field_values_from_keywords(issue)}
|
||
|
issue.subject = cleaned_up_subject
|
||
|
if issue.subject.blank?
|
||
|
issue.subject = '(no subject)'
|
||
|
issue.subject = "(#{ll(Setting.default_language, :text_no_subject)})"
|
||
|
end
|
||
|
issue.description = cleaned_up_text_body
|
||
|
issue.start_date ||= User.current.today if Setting.default_issue_start_date_to_creation_date?
|
||
| config/locales/en.yml | ||
|---|---|---|
|
text_turning_multiple_off: "If you disable multiple values, multiple values will be removed in order to preserve only one value per item."
|
||
|
text_select_apply_tracker: "Select tracker"
|
||
|
text_avatar_server_config_html: The current avatar server is <a href="%{url}">%{url}</a>. You can configure it in config/configuration.yml.
|
||
|
text_no_subject: No subject
|
||
|
default_role_manager: Manager
|
||
| test/unit/mail_handler_test.rb | ||
|---|---|---|
|
end
|
||
|
def test_add_issue_with_no_subject_header
|
||
|
issue = submit_email(
|
||
|
'no_subject_header.eml',
|
||
|
:issue => {:project => 'ecookbook'}
|
||
|
)
|
||
|
assert_kind_of Issue, issue
|
||
|
assert_equal '(no subject)', issue.subject
|
||
|
with_settings :default_language => 'en' do
|
||
|
issue = submit_email(
|
||
|
'no_subject_header.eml',
|
||
|
:issue => {:project => 'ecookbook'}
|
||
|
)
|
||
|
assert_kind_of Issue, issue
|
||
|
assert_equal "(No subject)", issue.subject
|
||
|
end
|
||
|
end
|
||
|
def test_add_issue_with_mixed_japanese_subject
|
||