Manually "unpacking" E-Mail

Paul J Simpson September 17, 2016

Hi,

We are in the process of moving to JSD and I am trying to deal with customers who still send e-mails to the old distro. (Note: I do NOT want to simply have JSD monitor that distro as it is used for other stuff that should not result in a ticket!)

Ok, what I want to be able to do is for my users to forward an e-mail to JIRA and have it create the ticket. So far so good. BUT, I also want to auto-assign the ticket to that user, replace the "Reporter" with the original sender of the e-mail, remove any "forwarding" stuff (Subject, Description) and finally, check if the e-mail has already been forwarded. A tall order!

So far, I have figured out that in order to achieve this, I need to forward the mail as an attachment. I have JSD then calling a web service I have written that handles the auto-assigning and the Subject replacement. I then plan to store the Message ID in a property and use that to detect duplicates and auto-disposition them as such.

Where I am stuck is in converting the HTML e-mail into the correct format for the Description. I think it uses some form of Wiki format? I can see JSD does it internally when it receives an e-mail, but how can I trigger that process? Can I call the routine externally? Does anyone know of a library that could do it?

Thanks in advance for any help!

2 answers

0 votes
Paul J Simpson September 19, 2016

Thanks for the suggestion! I had a quick look and it seems to be overkill for what I need. (I also couldn't find a price, but looking at the reviews, I suspect it isn't cheap!)

I have managed to cobble something together with a series of REGEX substitutions, but would prefer something more robust and tested, for example, I haven't figured out how to translate lists yet...)

Ideally, if the routine JIRA uses internally could be exposed in the API.....

0 votes
noamdah
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.
September 18, 2016

Check out this add-on.

Suggest an answer

Log in or Sign up to answer