I am having difficulties with whitespace in new jira issues and comments coming from MS exchange 2007. For each new line i have two new lines in jira description field. MIME format for my pop mailbox is HtmlAndTextAlternative and i do not want to set it to text since users are inserting screenshots of bugs in email body..
Now, i cannot tell my users to start using plain text instead of html, so i would like to use regexp to remove that white space... Can you please advise how to do this? I already tried with ccc-ezgooeymh and emailhandler plugins but damn thing is immune to those... What should be regex syntax for default jira email handler?
Thank you in advance, kind regards.
The default mail handler converts HTML to text in a best effort way, retaining formatting from HTML to plain text (even wiki markup) is quite tricky. The Whitespace can come from extraneous </p> tags that are converted to newlines which is I think what you are seeing.
When email clients send mail, they can send a text/plain multipart/alternative component which is the same 'text' entered but in plain text not HTML. Windohs Exchange adminstrators can set a policy to default people to _not_ include this (in their eyes this could be seen as redundant duplicated information adding to network loading). If you are in this boat, then you are in a HTML -> Text conversion scenario with no way out.
JEMH has a few extra tweaks in the HTML -> Text conversion route (different parsers that can result in a cleaner output in some cases), have you tried that?
If there is a partcicular email that is causing difficulty, I would be happy to review to see how I can deal with it. Mails directed to firstname.lastname@example.org can be picked up for testing. If it doesnt support this content fixup, Im pretty sure I can add it.
What JIRA version are you targetting?
JEMH already has a feature for doing exactly that with the Subject, I've just added the same thing for the Body, you can test it out in 1.3.2 that I'll release later today.
And finally, I notice that JIRA 5.2.5 at least seems to compress additional whitespace in issue descriptions down when you view them, not so sure about notifications.
I have sent test email, could you please check. I am using jira 4.2.4 and unfortunately i can not upgrade. I did not try with jemh, i was checking only free solutions. Sorry, i think your product is great, but i just don’t have any budget for jira.
Looking forward for handler results.
Thanks, kind regards.
Ah ok, so that email contains text/html and text/plain. No it looked fine, as JEMH prefers text/plain, just as JIRA does (the text/plain component is what I would call 'clean').
Whilst your testcase contains both parts, other users may not necesarily configure their clients to send both. If they only send HTML you have no choice, and must 'deal with it' (or not). As the content is provided by the remote client, Im not sure any MIME settings on your POP will help.
The JEMH features I mentioned earlier deal with the HTML only scenario, which is probably what you are faced with.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs