JIRA - Comments from Email

Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 14, 2012

Hi,

I was wondering is there any very good solution to cut the junk that is added to the comment when replying to tickets using email.. "Very Good" means in this case a situation that JIRA will cut old messeges that was send from different and often used platforms like Outlook, Web Oulook, Android, IPad and so one..

Currently we are using Regex Comment Handler with a property set to cut on /From */ ..It is working pretty well on Outlook, but when using mobile phones it is starting to include the junk..

Problem is also with the languages.. We are working in a global company and when we recive the mail on a mobile phone when using Reply then "From: " is sometimes changed to current language that the employee is using.. JIRA is then not able to cut on "From: " correcly..

We tried the following solution ..

http://confluence.atlassian.com/display/JIRAKB/How+to+Strip+the+Old+Reply+Data+from+Email+When+Using+Outlook

But it is not working for us.. It was even worse then when we used /From: */ regex..It should fix the Outlook but after we did this then Outlook replays were not cut correctly ;)

How you handle the cut functionality? Is is working for you when you are using your mobile device to reply to the comments? Do you have any suggestions or recommendations?

Thank you very much for your help!

-Mirek

8 answers

1 accepted

7 votes
Answer accepted
Chris Marts February 28, 2013

We use a longer variation of that:

/From: *|___.*|On .*wrote:|----Orig.*|On .*(JIRA).*/

I've found this gets most mail clients (including Outlook PC/Mac, Outlook Web Access, iPhone, others...)

We're an OnDemand customer so every morning we have to check to make sure the default mail handler hasn't reverted back to the standard Studio Email Handler and if so, re-edit it with the above settings. There doesn't seem to be a way to define our own handler without the default one getting in the way.

Paul Regan August 4, 2013

Thanks guys, been looking for an answer to this for ages. Atlassian should add this to the documentation ... sending you many vBeer tokens

Like Jason M_ likes this
Scott T January 19, 2014

Thanks Chris. I just noticed that ours got reverted to the regular handler as well. Did you ever contact support or do you have a work around for this? Thanks.

Chris Marts January 19, 2014

Also, FWIW, this is what we use:

/From: *|___.*|On .*wrote:|----Orig.*|On .*(JIRA).*|.*(JIRA).*wrote:/

Chris Marts January 19, 2014

I think the digging I did led me to conclude that I shouldn't expect a better workaround from suppot other than just setting it whenever it reverts. Just literally a limitation of how OnDemand works and gets updated.

I have found that update usually happens only over a weekend so I just check it Monday morning and change the default handler to use the RegEx.

Chris Whitten [Comskil] January 7, 2016

This worked really well for me when also using it with emails from Gmail. Thank you!

4 votes
Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2012

We got the solution!

It sounds like there is a very easy option to use few reqex in one single property.. Everyone that wants to cut email for different case just need to use an alternative sign when defining a reqex

Example:

/From: *|On .*wrote:|On .*(JIRA).*/

Works for us and I hope it will be helpful for others too

Regards,

Mirek

Karie Kelly
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2013

This is exactly what I've been wrestling with and this solved my issue. Thanks for posting!!!

ION Information Systems June 26, 2013

Hi Mierk,

This works great on both Outlook and Gmail when replying to a comment that was generated from JIRA. However, it fails to strip out the old content if we add a reply with a carriage return. Any ideas? The problem is on both gmail and outlook and we are on JIRA 5.2.11 and using the below handler.

  • handler:Add a comment before a specified marker or separator in the email body

Cheers,Gaj

1 vote
Center for Teaching and Learning November 12, 2014

I just wanted to follow up on this. It has been very helpful! For a long time, this was working great in our OnDemand instance - we had it set up with: 

/From: *|___.*|On .*wrote:|----Orig.*|On .*(JIRA).*/

But sometime over the past several months that seemed to not be working quite right as I'm seeing lots of duplicated messages in comments that it's not catching. 

I updated this to the one above:

/From: *|___.*|On .*wrote:|----Orig.*|On .*(JIRA).*|.*(JIRA).*wrote:/

Initial tests show that this is working better...

 

 

1 vote
Prosperitas June 17, 2013

Any solutions out there for OnDemand customers using the "Create a new issue or add a comment to an existing issue" Handler??

1 vote
Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 17, 2012

JEMH allows you to specify mulitple regexps for body delimiting (cut off point for the junk), as well as bundling a range of defaults (like the create/comment handler). Agree that languages make this more complex to deal with!

Regarding mobiles, given owners can inject their own 'sent from my awesome pad/insert text here' its difficult to do much for that, other than allow an admin to filter as required.

If you have specific mails that give you problems, Id be happy to look at them out of interest...

Mirek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2012

Hi Andy,

Thank you very much for your suggestion and help! JEMH its a very good plugin however unfortunately is not a free and on the other hand we do not want to add more plugins to our instance. We already have a lot and this is always a problem when doing the upgrade...

0 votes
su san July 31, 2020

You  can  use  email  in  your  mobile phone. you  need to  sign up  in  your  email  account  with proper  is and password.   mobile repair dubai   can  help   you  can  sync all mobile data with your  email . 

0 votes
Markus Zimmermann January 21, 2014

I made an external script https://github.com/zimmski/filter-reply-mailswhich can filter text and html mails and also remove referenced attachments of the trimmed content. It also works with many languages. Another language just means another regex in the filter definitions.
I'm a little bit frustrated that Atlassian stil has no solution to this problem so I hope that my project helps a little bit.

0 votes
SanjayD December 11, 2013

Do you have a sample of the change that needs to ve implemented here? - /opt/atlassian/jira/atlassian-jira/WEB-INF/classes/templates/email/html/includes/header.vm

Suggest an answer

Log in or Sign up to answer