Defect #5820 ยป feature-5820.patch
app/models/mail_handler.rb | ||
---|---|---|
199 | 199 |
issue.safe_attributes = {'custom_field_values' => custom_field_values_from_keywords(issue)} |
200 | 200 |
issue.subject = cleaned_up_subject |
201 | 201 |
if issue.subject.blank? |
202 |
issue.subject = '(no subject)'
|
|
202 |
issue.subject = "(#{ll(Setting.default_language, :text_no_subject)})"
|
|
203 | 203 |
end |
204 | 204 |
issue.description = cleaned_up_text_body |
205 | 205 |
issue.start_date ||= User.current.today if Setting.default_issue_start_date_to_creation_date? |
config/locales/en.yml | ||
---|---|---|
1218 | 1218 |
text_turning_multiple_off: "If you disable multiple values, multiple values will be removed in order to preserve only one value per item." |
1219 | 1219 |
text_select_apply_tracker: "Select tracker" |
1220 | 1220 |
text_avatar_server_config_html: The current avatar server is <a href="%{url}">%{url}</a>. You can configure it in config/configuration.yml. |
1221 |
text_no_subject: No subject |
|
1221 | 1222 | |
1222 | 1223 | |
1223 | 1224 |
default_role_manager: Manager |
test/unit/mail_handler_test.rb | ||
---|---|---|
738 | 738 |
end |
739 | 739 | |
740 | 740 |
def test_add_issue_with_no_subject_header |
741 |
issue = submit_email( |
|
742 |
'no_subject_header.eml', |
|
743 |
:issue => {:project => 'ecookbook'} |
|
744 |
) |
|
745 |
assert_kind_of Issue, issue |
|
746 |
assert_equal '(no subject)', issue.subject |
|
741 |
with_settings :default_language => 'en' do |
|
742 |
issue = submit_email( |
|
743 |
'no_subject_header.eml', |
|
744 |
:issue => {:project => 'ecookbook'} |
|
745 |
) |
|
746 |
assert_kind_of Issue, issue |
|
747 |
assert_equal "(No subject)", issue.subject |
|
748 |
end |
|
747 | 749 |
end |
748 | 750 | |
749 | 751 |
def test_add_issue_with_mixed_japanese_subject |