How to connect OTRS with JIRA
Robert Ullrich14. Nov 2016 | ConsultingUse cases
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:
The following OTRS framework is required:
You need the following Freely selectable Features of the OTRS Business Solution™ 5s :
(Adds new invoker for TicketCreate and TicketUpdate in the GenericInterface.)
(Contains additional functionalities to add conditions to events of invokers.)
Third Party Software
You need this third party software:
- 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:
- Controller Mapping for ‚IssueCreate’:
- /issue (Request Command: POST)
- Controller Mapping for ‚IssueUpdate’:
- /issue/:JIRAIssueID (Request Command: PUT)
- A valid user for the JIRAConnector
- 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.
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/