How to connect OTRS with JIRA
Robert Ullrich14. Nov 2016 | ConsultingUse cases
Disclaimer:
The practical examples presented in our technical blog (blog.otrs.com) and now in the expert category in our FAQ blog section serve as a source of ideas and documentation to show what is theoretically possible with OTRS in concrete scenarios or sometimes even for more exotic configurations. All configurations presented here were developed under laboratory conditions as a proof of concept.
We can only guarantee testing and implementation of these concepts to be error-free and productive if implemented in a workshop with one of our OTRS consultants. Without this, the responsibility lies with the customer himself. Please note that configurations from older OTRS versions may not work in the newer ones.
With the new OTRS Business Solution™ 5s you have the possibility to create and update issues in JIRA using the JIRAConnector. The following article will explain how to configure this JIRAConnector.
Requirements for the JIRAConnector
You are able to connect to JIRA, if you meet the prerequisites which are listed below:
OTRS Framework
The following OTRS framework is required:
- 5.0.x
OTRS Packages
You need the following Freely selectable Features of the OTRS Business Solution™ 5s :
- OTRSGenericInterfaceInvokerTicket
(Adds new invoker for TicketCreate and TicketUpdate in the GenericInterface.)
- OTRSGenericInterfaceInvokerEventFilter
(Contains additional functionalities to add conditions to events of invokers.)
Third Party Software
You need this third party software:
- XML::Simple
- XML::LibXML
- XML::LibXSLT
DynamicFields
- DynamicField „JiraIssueID“ of type „TEXT“
When you’re done with the pre-requirements, you have to create a new web service within OTRS to set up the needed requester invokers:
Configuration of the JIRAConnector
Please select „XSLT“ for the outgoing and incoming mapping in the configuration of the invoker „IssueCreate“,
Afterwards you have to define a valid XML structure to map the OTRS structure to a structure which can be understand by JIRA.
IMPORTANT: You need some basic XML and XPATH knowledge
I use the following outgoing mapping:
Also the response format of JIRA is not in an OTRS structure. You have to specify an incoming mapping too:
Now we need to define a trigger which will execute the request to JIRA e.g.: TicketLockUpdate for test purposes.
Click on „save and finish“ when you finished the configuration
We will do the same for the invoker “IssueUpdate”. Click on it or create it, if you haven’t done until now and use the following XSLT Mapping for outgoing request data:
As you can see i will only update the Summary in JIRA and i’m using the latest OTRS Ticket Title.
When you’re satisfied with your mapping, please click on „Save and finish“.
Go to the „Network Transport“ configuration of the JIRAConnector and change the following settings.
You need at least the following information:
- Host:
- http://<YOUR_FQDN/rest/api/2
- Controller Mapping for ‚IssueCreate’:
- /issue (Request Command: POST)
- Controller Mapping for ‚IssueUpdate’:
- /issue/:JIRAIssueID (Request Command: PUT)
- Username:
- A valid user for the JIRAConnector
- Password
- A valid password for the user
Before you can test the new web service, you have to configure a DynamicField in the SysConfig (e.g.: JIRAIssueID) which is used to store the response of JIRA.
See attached image:
Testing the JIRAConnector
Now we can use a ticket and lock it.
The request to JIRA will look like the following, if the mapping was applied to the outgoing request. You can find this information, if you go to the Debugger of the JIRAConnector.
The request to JIRA was a success, if you see the following answer:
OTRS can only store one response value of the response, you created the incoming mapping for the response data. The result of this mapping is:
Congratulations! You successfully connected OTRS with JIRA.
More information
You can also use other resources which are provided by JIRA. Please go to the following website, if you need information: https://docs.atlassian.com/jira/REST/cloud/
Shawn Beasley at 04.09.2019, 08:12
Currently JIRA connections are supported only in STORM due to changes https://confluence.atlassian.com/cloud/basic-authentication-deprecation-from-jira-and-confluence-cloud-apis-972355348.html.
zain Jhan at 31.08.2019, 09:42
Is this possible with OTRS 6?
Tom at 11.04.2019, 14:31
This is great and works really well for us. My problem is that I've not been able to get it working the other way. We really want our OTRS ticket state to be mapped to the corresponding JIRA state when the tickets are linked. I've got the connector working as details above but for some reason the webhook bit doesn't work going from JIRA to OTRS and I don't know how to debug it.
Jens Bothe at 14.02.2017, 11:15
The connection is only possible with the OTRS Business Solution™ 5s
roberto at 11.02.2017, 16:23
what is the restriction with 3.3.8 framework?