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/
The post How to connect OTRS with JIRA appeared first on The OTRS Blog.