Project

General

Profile

Actions

Defect #5698

closed

redmine:email:receive_imap fails silently for mails with subject longer than 255 characters

Added by Alexander Malfait almost 14 years ago. Updated over 13 years ago.

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

100%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The automatic issue creation from mailbox silently ignores emails which have a subject longer than 255 characters - the model validation for Issue fails, and the mail is ignored.

We ran into this problem while automatically importing exceptions from client sites into Redmine via e-mail (exception messages would sometimes amount to more than 255 characters).

It would be better to just chop the subject off at 255 characters and create the issue like that. Can be modified this way:

in app/models/mail_handler.rb at line 137:
issue.subject = email.subject.chomp[0..254]


Files

5698.diff (3.94 KB) 5698.diff Jan from Planio www.plan.io, 2010-06-20 16:01
Actions #1

Updated by Eric Davis over 13 years ago

  • Category set to Email receiving
Actions #2

Updated by Jan from Planio www.plan.io over 13 years ago

here's a patch with tests. mails with subject lines that are longer than 255 chars will get chopped off.

Actions #3

Updated by Jan from Planio www.plan.io over 13 years ago

  • % Done changed from 0 to 90

somebody should look over it and then commit...

Actions #4

Updated by Eric Davis over 13 years ago

  • Status changed from New to Closed
  • Assignee set to Eric Davis
  • Target version set to 1.0.0 (RC)
  • % Done changed from 90 to 100
  • Resolution set to Fixed

Committed in r3801, thank you for the bug report and patch.

Actions

Also available in: Atom PDF