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

Emailthisissue - How to capture long description?

Yeoh Tun Liang November 22, 2015

I'm currently using the free trial of JETI and the feature of handling the incoming email to automatically insert the fields is exactly what I need.

However, I'm unable to handle a email that has a long description ( More than 1 line to be more specific ) which will end up putting the whole email body into the description of ticket. 

Image belows shows my field setting for mail handler

field setting.PNG

 

Image below shows the email I sent with the content. 

success sent.PNG

 

Image below shows it successfully insert description with "TEST" only without the machineID in it.

success.PNG

 

Image below shows email sent with description more than 1 line

failure sent.PNG

 

Image below shows description included other information as well.

failure.PNG

Thanks in advance

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Tibor Hegyi _META-INF_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 22, 2015

Hi,

Is there a termination character or string that should stop extraction?

E.g. in your example above, to extract the text from Description: till Country:, you can do the following as regexp:

(?i)(?s)Description:(.*)Country:

Value: Capture Group 1

I hope this helps.

Tibor

Yeoh Tun Liang November 22, 2015

hi. i tried another method which is to add (\\)(\\) then it did work by not showing content after \\. However it still capture the word "Description : ". Is there anyway to remove this as well?

Tibor Hegyi _META-INF_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 22, 2015

Sure there is. Use capture groups. In you example group 4 is not correct as there aren't 4 groups in the regex. Try group 1 as in my example.

Yeoh Tun Liang November 22, 2015

Does trial has limited mail handling? Because it stopped creating new issues from the mail after 20 ticket creation automated.

Yeoh Tun Liang November 22, 2015

I meant limited usage** sorry for double comment

Yeoh Tun Liang November 22, 2015

nvm again. Just solved the problem. It was because wrong format in email body which somehow caused JETI unable to create issue from it. Will mark your reply as answer. Thanks!

Wei Chin Chong November 23, 2015

Tibor I have another question. Can you please explain how does the capture group works? I have read the link given in tutorial but don't quite get how it works.

Tibor Hegyi _META-INF_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 24, 2015

Regexp caputre groups are marked with parenthesis. Capture groups allow you to capture parts of the text matched by the expression. e.g. (?i)Test:(.*), delimiter: (this is also capture group .*) In this (?i) is not a capture group rather an instruction to the regex parser. However (.*) is a capture group indexed as 1. "(this is also capture group .*) " is also capture group with index 2. To put it short, capture groups are sub expressions between parenthesis. Groups are indexed from 1 and can help you extract content from text.

TAGS
AUG Leaders

Atlassian Community Events