Strange formatting problem when creating issue from email
Added by Steve F. about 11 years ago
Hi, I have the strange issue, and search yield no results:
I am using "create an issue from email" method.
when my email message (currently exchange 2010) contains bullet items such:
- Bullet1
- Bullet2
- NumberBullet1
- NumberBullet2
when issue created it looks like that in redmine:
<![if !supportLists]>· <![endif]>Bullet1 <![if !supportLists]>· <![endif]>Bullet2 <![if !supportLists]>1. <![endif]>NumberBullet1 <![if !supportLists]>2. <![endif]>NumberBullet2
It worked fine with redmine 1.x and Exchange 2003. In both Exchange versions, message was formatted as HTML.
Upgrade from RM 2.2.0 to 2.3.2 did not correct the issue.
Thanks.
Replies (6)
RE: Strange formatting problem when creating issue from email
-
Added by Maicon Zucco almost 10 years ago
I have the same problem with Redmine 2.5.2 and Exchange 2010.
When used the Exchange 2003 the problem did not occur.
RE: Strange formatting problem when creating issue from email
-
Added by Stanislas Dourdin over 9 years ago
Hello,
I have the same problem and I solved it by using two regexp in cleanup_body
in app/models/mail_handler.rb
.
Why two regex ? One for replacing supportLists '-', '*', etc. by '* ' and one for replacing supportLists '1.' by '#'.
I attached the patch to my note.
I am pretty new to Ruby so maybe there is a better way to achieve it, but it works.
body = body.gsub(/<!\[if !supportLists\]>[^0-9<]+<!\[endif\]>/,'* ') body = body.gsub(/<!\[if !supportLists\]>[0-9].+[^<]<!\[endif\]>/,'# ')
Hope it will help
patch_supportLists (552 Bytes) patch_supportLists |
RE: Strange formatting problem when creating issue from email
-
Added by Maicon Zucco over 9 years ago
Thanks Stanislas!
The solution works! This is that matter.
RE: Strange formatting problem when creating issue from email
-
Added by Stanislas Dourdin over 9 years ago
You are welcome. I am wondering if it should not be officially added to Redmine as it is not an isolated case.
RE: Strange formatting problem when creating issue from email
-
Added by Maicon Zucco over 9 years ago
I think so.
Because most of my users are migrating to updated versions of Outlook.
Thanks.
RE: Strange formatting problem when creating issue from email
-
Added by Stanislas Dourdin over 9 years ago
I am not confident enough to submit my patch because I know it could be better as I am a Ruby noob.
But maybe it would be worth.