Can someone provide an example outgoing email to create a JIRA issue via JETI?

David Gonsalves October 26, 2016

We are currently using a Google form to create bugs in Trac using a Python script called Email2Trac.  I've been tasked with modifying that to work with JIRA so we only have one piece of bug tracking software.  I can create issues, but have no control over what goes into them with the exception of the description.

I need to know how to format (encode, script, whatever?) the text in the outgoing Google email to create issues in JIRA with JETI, specifically how to designate Components, Summary, Description, Issue Type, Priority, Reporter, etc.  I need to be able to have the reporter (who will most likely not be a JIRA seat owner, hence the use of JETI) on all emails back and forth.

I've tried using some of the things (Components, Priority, & Reporter) available in the templates, but they're just ignored and show up in the description instead of being parsed.  I don't know how they're supposed to be encoded/formatted in the email. and none of the tutorials explain this (that I've found thus far).  For example, in our current email system (Email2Trac), to designate some of the fields, I simply do this:

@reporter:someone@somewhere.com
@component:someComponent
@type:defect
@priority:[level]
@description:blah, blah, blah

Those all get parsed into the resultant bug in the places you'd expect them.  I want to know how to do the same thing with JETI.

Can someone please post an example of what the outgoing mail for the JIRA/JETI configuration should look like.  Once I have that figured out, I can proceed with modifying our current Google form to work with JIRA instead.

1 answer

1 accepted

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.
October 28, 2016

Hi David,

In JETI, you need to do the following:

  • Enable Field Initialization in the JETI Mail Handler
  • Create a Field Context and add field rules to initialize fields for new issues or when a comment is added 
  • A field rule example could look like this (below prepared for the @component tag):
    • Goal: Initialize field for new issues / existing issues
    • Regex: (?i)@component:(.*)
    • Match in: Mail Body
    • Value: Capture group 1
    • Issue Field: Components

Once you have a field rule for each tag, fields should be populated.

 

Regards,

Tibor

 

David Gonsalves October 28, 2016

Tibor, thanks for the assistance, that was all I needed.  You may want to update your tutorial with this example because it wasn't clear to me at all what needed to be done to make this work.

Thanks again,

David

David Gonsalves October 28, 2016

Well, or not...I've added more field context rules for @reporter and @priority and both are just being ignored.  The reporter is being set to the default email that I'm sending to in my mail handler instead of the address I provided in the email, and the priority is just being set to "Minor" which is the default.

The email body looks like this:

@component:Online RMA
@reporter:dgonsalves@seabird.com
@priority:Blocker

The only piece that's working is the `@component` part, the rest is not.

I've used the exact same regex as you provided for "@component" and simply switched in the appropriate field name, EG:  (?i)@reporter:(.*) & (?i)@priority:(.*), set their issue fields appropriately, I've used sequential capture groups and matched their processing order to the capture group numbers.  See screen capture belowimage2016-10-28 11:38:54.png

What am I doing wrong?

Tibor Hegyi _META-INF_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 31, 2016

Hi David,

The problem is that your expressions for reporter and priority contain only one capture group, but the rules are configured with Capture Group 2 and Capture Group 3 respectively.

Please change both of them to Capture Group 1.

Read more on capture groups and regex: http://docs.oracle.com/javase/tutorial/essential/regex/groups.html and http://docs.oracle.com/javase/tutorial/essential/regex/index.html

Regards,

Tibor

David Gonsalves October 31, 2016

That fixed it, thanks again for your help.

Aniket Patil August 15, 2018

Hi David, 

I am facing the same issue even after entering the Capture Group as 1 for each regex expression. 

Could you provide more insight into this? 

Suggest an answer

Log in or Sign up to answer