Project

General

Profile

Actions

Defect #19576

closed

Ticket subject.strip in recent version not in an old one

Added by Shigeru Wakita about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

Hi,

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.


Related issues

Is duplicate of Redmine - Defect #16859: rdm-mailhandler: subject corruptionClosed

Actions
Actions

Also available in: Atom PDF