Why does forwarded the original emails from JETI to another project after creation end up as a comment to the original ticket?

Leonard Hu May 1, 2015

We're currently using JETI as a mail handler in replace of JIRA and experience issues with JETI where when a new ticket is created from email and the same email is forwarded to another JIRA project, it ends up as a comment to the original ticket.

We verified that the other JIRA project is configured properly by testing it separately. We also tested the case where we copy and pasted the same "Subject" and "Body" and sent to the same alias and it worked properly. It just seems to only be the case where we forward the original email to another alias that this happens. We checked that the message ID was different so any help in this would be useful.

We're currently running Email This Issue plugin 5.3.3.6 and JIRA 5.1.5.

6 answers

1 accepted

2 votes
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.
May 4, 2015

Daniel, your case actually applies to both option 1 and 2. An email notification from JIRA includes certain headers that contain a reference to an issue ID (not the Key). When JETI processes the email, it calls the JIRA API to find a matching issue. 

JIRA then finds the issue by the ID stored in the email header (please note, the email headers are retained when you forward an email you received from JIRA).

As the issue has been found by the ID, the handler adds a comment regardless that the issue has been moved to another project.

I hope this is clear now.

What you can do is the following: in the handler for the HELP project, select the JETI email processing strategy called: Create Or Comment Or Link issues.

then enter a JQL condition in the Comment Criteria field: project = HELP.

Select a link type as well.

What will happen is the following:

  • when the HELP handler processes an email and the associated issue is in the HELP project, it will comment it
  • otherwise (issue is in some other project like MIRS), the handler will create a new issue in the HELP project and link it to the MIRS issue.

Please read our documentation about JETI Mail Handlers. I hope this solution can be applied to you.

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

JETI handler depends on JIRA API to associate an incoming email to an existing issue. If such an issue is found, the email body is added as a comment (well this depends on the JETI handler strategy you configure).

This means that the email that ended up as a comment contained something that JIRA identified as an existing issue. 

Options are:

  1. Headers like: "In-Reply-To" or "References" contain a JIRA Issue ID
  2. Issue key is in the subject.

I suppose option 2 is not the case as you should have noticed it.

Option 1 usually happens if the email is actually a reply or forward email of the original email that was sent from JIRA.

E.g. JIRA or JETI sends a notification email when an issue has been created. This email contains the message ids in the headers mentioned above. Issue is moved to another project. Someone replies to the notification email or forwards it. As the headers are preserved, JIRA extracts the ID of the oringal issue and adds the comment. As issues are found over the ID not the KEY and as Issue Move operation retains the ID, the comment is added to the issue.

Can this be the case?

Tibor

Leonard Hu May 4, 2015

Thank you for the clear explanation for the JETI handler Tibor and for the help everyone. I've tried your method above since we're experiencing the issue in option #1 with the forwarding of the original email but I'm having issues with your instructions. You said select in the JETI email processing strategy: "Create Or Comment Or Link issues", but I can't find it I only see "Create or Comment Issues", "Always Create Issues", and "Always Add Comments". We're running JETI 5.3.3.6 so it should be supported. Do you know how I can get the processing strategy to display so I can add in JQL, it seems I can only do the Split Regex for now. 

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

In order to configure JETI Mail Handler, you must do two steps: 1. Configure a Mail Handler in Incoming Mails page of JIRA. Add a handler called Email This Issue Mail Handler 2. Add a Mail Handler Context in JETI Admin Screen that matches the Project and Type for the Mail Handler you added in step 1. In the Mail Handler Context, select the Create Or Comment Or Issue processing strategy. See related docs here: http://www.meta-inf.hu/wiki/display/PLUG/Mail+Handler+and+Auto-reply+emails

Leonard Hu May 4, 2015

I followed the steps but I still don't see it, do you think it's the version of JETI or JIRA that we're currently running? It seems we're not allowed to update past 5.3.3.6 for our current version of JETI too.

1 vote
Paul Biagio May 1, 2015

I actually had the same issue happen this week in JIRA 6.4.2 using JETI  6.2

0 votes
dgustafsonBMCM May 4, 2015

Tibor,

 

Thank you very much for those instructions.  That is great functionality added w/ the newer Link issue functionality.

0 votes
dgustafsonBMCM May 4, 2015

Hi @Tibor Hegyi [META-INF],

 

I'm working with @Paul Biagio on the above issue.  Our case IS actually Option 2 as you describe.  We have a project which uses "MIRS" as its identifier which sent out an issue email notification to its subscribers.  They forwarded this to the Helpdesk Project ("HELP" as identifier), so the subject of the email our HELP Project received was " MIRS-1234 - subject description".  

Our question is:  If our Helpdesk Project uses its own mailbox and mail handlers, why does an email with another project's ID jump projects.  Since the email was read by HELP mail handler, we would expect it to only create an issue under HELP.  

 

0 votes
Stas May 3, 2015

do you have other handlers?

it seems that you has handler type like "create issue or add comment" so if mail subject has issue number in it - message will become comment of this issue. If you want to create other issue - change issue type or mail subject

Suggest an answer

Log in or Sign up to answer