Service-Now Jira Rest Integration

garyopela
ServiceNow Employee
ServiceNow Employee

Much thanks to John Andersen, as always, for his stellar work on the Service-Now platform with regards to integrations.

ServiceNow integration to JIRA through REST API's-John James Andersen

 

I was wondering if anyone had any tips on this. I set this up and for some reason my service-now instance isn't able to communicate with the Jira instance. I can see in my logs whenever SN tries to send the data to jira to open a bug, I get the following returned: "Jira issue created: undefined"

 

Do I need to set up anything on the Jira side?

 

I have verified the "Jira base instance URL", the "Jira Project Key", as well as the "Custom ID for Service Now". Also I am having to use a mid-server, and I have verified it is up and running.

 

Any help would be greatly appreciated, as I have a lot more work to do on expanding this integration beyond just incident, but first I just have to get incident working.

 

Thanks!

1 ACCEPTED SOLUTION

pavel_muller
Giga Contributor

I've done a large JIRA integration based on the Andersen's code too. But I improved quite a lot there including the webhooks (used for updates from JIRA to SNC).



To debug your problems, the best way is to watch the ECC queue responses. There you can see the full JIRA response including the error messages and JSON. The Andersen's code is not very robust in terms of error handling. You will have to improve it before going into production.


View solution in original post

83 REPLIES 83

geirtresselt
Kilo Explorer

Hi,



I have a question some of you may tell me how to solve.



In the presentation/demo


all communication is initiated from ServiceNow as I understand it.


What do we need to do to be able to handle the communication when it's initiated from Jira?



This is the actual Jira version info.


JIRA v6.1.5


JIRA Service Desk v1.2.0.2



Br


Geir


Hi Geir,



there are two approaches you can use


  1. The same JJA is using. Polling the JIRA instance regularly to get issue updates
  2. Implement a webhook and be notified about changes in JIRA


We are using the webhook option. It requires to implement a REST JSON service on the ServiceNow side. It is not that complicated.



Cheers,


Pavel


Hi Pavel,



Thank you for your reply.


Will test out your suggestions/approaches



Br


Geir


Hello Pavel,



I was wondering if you could guide me to any documentation on how to set up the inbound REST JSON request for JIRA. When JIRA makes the call to SN that a change has been made to it's ticket, does SN need to make an outbound call again to JIRA to collect the info or does JIRA pass the info over at the same time .



Thank you in advance


Martin,



you have to go to JIRA docs and check the webhooks:


JIRA Webhooks Overview - JIRA Development - Atlassian Developer Documentation



JIRA webhook is sending quite a lot of information with every even. Usually it contains all you need. You just need to implement a REST endpoint in ServiceNow. Simple URL handler processing the incoming JSON.



Pavel