Ticket subject.strip in recent version not in an old one
I finally upgraded Redmine from 1.3.1 to 2.6.3 and found one problem; this did not happen at an old version [1.3.1] but happens recent one [2.6.3].
RedmineReceivingEmails works fine as long as the subject is short. However, the problem is subject.strip works occasionally (not always), if the subject gets longer and/or contains both English and Japanese characters. (This might be similar one to #18170.)
I could avoid this editing app/models/mail_handler.rb using this methods , but doing this at every upgrade time is annoying.Followings are excerption of mail_handler.rb of each versions around issue.subject.
- Redmine 1.3.1 + Ruby 1.8.7 + Rails 3.2.8 [Problem NOT happened]
issue.subject = email.subject.to_s.chomp[0,255]
- Redmine 2.6.3 + Ruby 2.1.5 + Rails 3.2.21 [Problem happens]
issue.subject = cleaned_up_subject def cleaned_up_subject subject = email.subject.to_s subject.strip[0,255] end
NOTE: changing from strip to chomp could not solve the problem
I would like to clarify why this happens in resent version [2.6.1] but not in old one [1.3.1], and hope this will be fixed in up-coming version.
If I misunderstood anything, please tell me.
Thanks in advance.
#2 Updated by Shigeru Wakita over 6 years ago
I would like to create a new issue with a subject as shown as it is in the email, but it occasionally fails.
Examples of such cases. Subject of the issue are not same as in email and ends unexpectedly.
|Subject of the email sent to redmine||イベントを検知しました：[試験][A1111111B]||ABC Defghi Jklmnopqrstuv からのテスト・メッセージです。|
|Subject of the issue receiving email||イベントを検知しました：[試験][A111111||ABC Defghi Jklmnopqrstuv からのテスト・メッ|