Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,410,348
Community Members
 
Community Events
169
Community Groups

JIRA - Comments from Email

Mirek Community Leader 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

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.

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

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.

Also, FWIW, this is what we use:

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

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.

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

4 votes
Mirek Community Leader Aug 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

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

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

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...

 

 

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

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 Aug 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...

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 . 

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.

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