Ticket creation and commenting by email for several projects

Michael Attenberger June 23, 2014

Hi,

i stand in front of a little problem, we have several smaller projects managed by jira, and my part is now to make it easy as possible for my co workers to work with it. so i thought about email handles. Have seen it somewhere else where they do it by mails.

You send a mail and get a ticket created and got a mail back, and got mails if someone comments on this ticket. If you answer on that mail, regardless with which client or structure of the mail it get added as a comment to the ticket.

now i wanted to implement this the same way, at the start with 3 projects. i got one email adress to let jira send mails, and 3 other adresses (havent seen other option to use 3 projects with one email adress).

I set up the handles for each account. I can create a ticket by sending mails to prj1-ticket@domain.com. but now it begins... i got no notification... not on the mail that sends the mail or even the the cc adress gets beside the original mail a notification.. i tried all combinations... nothing worked smooth...

only if i write another mail to prj1-ticket@domain with same subject and delete the other content i can add comment, but still no notification (btw turned the notifications for every comment, status change or creation to on).

why this wont work is, nearly every of my co workers have different client/setting for sending and replying mails. So until i cant send them a notification with text like "answer above this line to add a comment" it will allways get the whole mail discussion as comment over and over again...

2nd problem is 3 project... so each project needs an own adress to let the user add issues/comments, but jira answers itself only with one adress (jira@domain.com) and if my co workers answer to this mail, it wont be processed...

so my question is more or less... how can i manage to

a) let jira use a own email adress for notifications for each project (not one for all)

b) how to define a reply template for these mails to make it easier to answer / add comments

c) what setting defines notifications for this scenario

d) what option at the mail handles i have to use for creating new issues by mail, and if existing and by a fixed string comes it adds a comment (as i have seen they are two different non combinable options)

btw i searched and googled allready but most ppl just use only one project and activate near every notification and have the users have to know exactly what they doing (not my case, they are not it related)

greetins Mike

1 answer

1 accepted

0 votes
Answer accepted
Michael Attenberger June 25, 2014

found most of it on my own :) and here's how:

a) let jira use a own email adress for notifications for each project (not one for all)

was a bit missunderstanding, now its using only one email-adress thanks to this plugin:

https://j2eeps.cern.ch/wikis/display/JMH/JIRA+Advanced+Mail+Handler

It isn't reachable on marketplace for me, but you can download it there. With this plugin you can define one email for in and out, and seperate the projects by creating contact naming the project key, or naming the project key in the subject line. better described at their own page.

for anonymous creations without notifications for account creation and excluding quoted content the handle parameters looks something like

project=FALLBACK_PRJ_KEY,issuetype=3,jiraemail=your-jira-ticket-mail@domain.com,createusers=true,notifyusers=false,ccassignee=true,stripquotes=true,splitregex=---

for description of the parameters please look at the pluginpage and these links:

https://confluence.atlassian.com/display/JIRA040/Creating+Issues+and+Comments+from+Email#CreatingIssuesandCommentsfromEmail-HandlerParameters

https://confluence.atlassian.com/display/JIRA044/Services#Services-messagehandlers

to let "everyone" create issues you need to set the rights for it. go to:

http://your_jira_url.com/secure/admin/EditPermissions!default.jspa

and give the group "everyone" the right to create attachments, comments and issues.

Or better define a new group for the mail domains that are allowed to create issues and assign these group

b) how to define a reply template for these mails to make it easier to answer / add comments

you can edit the email templates manually with this plugin:

https://marketplace.atlassian.com/plugins/com.atlassian.labs.jira.emaileditor.emaileditor-jira-plugin

or edit by hand going this directory

/opt/atlassian/jira/atlassian-jira/WEB-INF/classes/templates/email/html/includes#

for my case i added simply "----"directly after the opening body tag in the header.vm and added these to the regex :)

if ppl now answer above this line everything below is cut off

(for text templates go [...]templates/email/text/includes# and edit userdetails.vm)

c) what setting defines notifications for this scenario

it uses the default notification schema, only it cant get notified at issue creation for "new" users. as soon as a issue get "starting" they get notifications.

It's not nice, i will looking for a solution, but till then this works...

d) what option at the mail handles i have to use for creating new issues by mail, and if existing and by a fixed string comes it adds a comment (as i have seen they are two different non combinable options)

combines the options above..

Andy Brook
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.
June 25, 2014

I guess you're using an old JIRA version given the addon is only listed as compat to 4.0?

Michael Attenberger June 25, 2014

not exactly, i cant find the exact version number atm, but it's not 4.X its something 5.X.

i know it's not listed as compat to my version (it event tells me that in the addon overview) but it works, i/we tested it in some cases, and all runs smooth.

No Performance lost, no errors anything.

i may should have mentioned my version and this little "version conflict".

do you think there could be a problem later on?

Andy Brook [Plugin People]
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.
June 25, 2014

> do you think there could be a problem later on?

I know it will, JIRA 5 mail handlers need to be reworked for JIRA 6. If you invest the time you could get it going, then again, you could just use JEMH which does all the above.

Michael Attenberger June 25, 2014

i tried JEMH, beside the to high cost for our use, it's way to complicated.

i tried it in a fresh jira testing enviroment, after some hours it still wont work. not a single issue ticket from all mails.

this way it's getting hard to argument to my boss the 500$ for our 10user license with the words "hey lets try it, i maybe work myself in and getting it to work" ;) I'm not even sure if we will upgrade from version 5 to 6

do you maybe have a link for the mail handler changes from 5.x to 6.x? so i can take a look at the source if it's changeable to the new version.

Andy Brook [Plugin People]
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.
June 25, 2014

The two minute intro linked from the first page gets email creating issues, after that, you can get creative. If you don't ask for support, none can be given :D

https://developer.atlassian.com/display/JIRADEV/Custom+Message+(Mail)+Handler+for+JIRA

Michael Attenberger June 25, 2014

the problem was i didn't understood a single thing, but i keep it in mind (for a upgrade from 5 to 6). but till then it works ;)

and thanks for the link :) seems i could rework the plugin for version when i got some time spare

Suggest an answer

Log in or Sign up to answer