In our company we have two offices in USA and Europe. And we want to have a help desk platform and ability to create tickets via email. It is a common task and easily achievable with the help of JIRA, but we have some points, that are not so transparent how to reach.
- Single email address to send inquires to.
- Single project to manage all the help desk tickets for two locations.
- Issues should be assigned to the proper person, depends on the location of the reporter.
- No commercial plugins should be involved (in worst case create custom mail handler)
I’ve made some investigation, what we have and what is already written and how we can use it.
Jira already contains the basic mail handler that can be bound to the project. Unfortunately that handler is not supported several asignees (e.g. create component per location and assign task to the component lead). There is a commercial plugin JEMH that supports assignment issues to component lead, however it is needed to write the component name in email somewhere (subject, body) or have different email addresses. And in our case we want to have single email address for all the tickets.
I spent some time on it cause there is a possibility to use it for free when all the preferences are made manually through the config file (in commercial version there is a GUI for that). The other issue is that JEMH can’t be installed to grab mails from the IMAP folder like the out-of-the-box JIRA mail handler.
The idea was to create some rules on the mail server (we’re using google apps) and filter USA and Europe employee’s mails, assign the proper label and assign tickets to the proper components regarding the IMAP folder they are in. Ideally the combination of Jira mail handler and JMEH will work for us.
And we’re nearly agreed on the following solution:
- Create separate projects in JIRA for USA and Europe offices
- Each project will have its own Project lead
- Setup to JIRA mail handlers and grab emails from the proper IMAP folder
- Create some filters in gmail to apply the proper labels on mails.
I’ve asked my question on JIRA Answers. Nobody answer with the working solution, however there were an idea about JIRA post functions. Digging in post functions the following solution was born:
- As a JIRA administrator create a project HELPDESK
- Create 2 components “USA” and “EUROPE”
- Assign to each of the component component lead
Add POP / IMAP Mail Server
- Log in as a JIRA administrator
- Go to Administration / System / Mail / Incoming Mail
- Click the button “Add POP / IMAP mail server”
|Google App IMAP (or whatever you want)
|Email Handler is used to create issues by email
|Google Apps Mail / Gmail (IMAP)
|<your account name>
|<your account password>
4. Test the connection and press "Add" button
- Press the button “Add incoming mail handler”
- First Screen:
|Google App IMAP
|Create a new issue or add a coment
- Second Screen:
|HELPDESK (or whatever project you are going to use)
|Ignore the email and do nothing
|username (put someone in charge)
- Test and save
- Create two groups of users: “usa-employee” and “europe-employee”
- Assign all the employee to these two groups
Script Runner Plugin
As a JIRA administrator install the following plugin Jira Script Runner
- As a JIRA administrator go to Administration / Issues / Workflow
- Copy your current workflow and change the name to “help-deksk-workflow”
- Go to Design view of that workflow and the gear icon, selecting “View Post Functions” from the menu
- Click “Add Post Function” and select from the list “Script Post-Function”
- In the Script file path field insert the path to your groovy script (server path), please see below for the script source of my script helpdesk.groovy:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Code is obvious. It’s a groovy script (to be honest, never dealt with it before and java itself). It’s just trying to resolve the reporter group and if the reporter in USA group, the task is updated with proper component and component lead. The same for the EUROPE group.
- Save the post function and the workflow.
- Go to Workflow schemes and create the new one “help-desk-scheme” and assign the “help-desk-workflow” workflow for lets say just tasks.
The Final One
- Now go to project “HELPDESK” / Administer Project
- Open “Workflows” tab. Action / Select a scheme and choose our “help-desk-shcema” as a primary schema for the project.
- Here we’re!
Now, lets try to send email to our helpdesk mail addess. You should see something like:
Hope that helps someone else!