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

sushilkumar
Giga Contributor

Hi All,


Can anyone help me with the correct code syntax to be used in the business rule to update Labels into jira from servicenow.


we need to add a label to the system field "Labels" that is in an array. Below is the API:



{ "update": { "labels": [ {"add": "newlabel"} ] } }



I tried below code but its not working:



issue.fields.labels = new Object();


issue.fields.labels.add =current.u_labels.toString();


//issue.fields.labels =current.u_labels.toString();



Also tried below code but no luck.



issue.update = new Object();


issue.update.labels = new Object();


issue.update.labels.add =current.u_labels.toString();




gautamsk
Tera Contributor

Hiii All ,



We   implemented John J Anderson's code (http://www.john-james-andersen.com/blog/service-now/rest-based-servicenow-jira-integration-poc.html) using a MID server with a proxy in place.



We are encountering an issue when initiating the REST command from our ServiceNow instance; the MID server tries to go directly to our Jira instance, bypassing the proxy, and results with the following error:



The request failed: java.net.SocketTimeoutException: connect timed out when posting to {jira_url}/rest/api/2/issue/createmeta



Any Suggestions/assistance would be greatly appreciated .


mrjohn
Giga Contributor

Coming to this thread pretty late, I know, but it seems to be the de facto place. 

Can anyone answer the following please: Is there an updated ServiceNow/Jira Incident/Request integration since the famous Andersen (no relation) code? 

We are using Jira 7.2 and ServiceNow Istanbul, so his update set/code is now out of date.

If anyone has a step-by step doc/wiki that would be awesome.

Hi mrjohn - I'd recommend that you take a look at Tasktop for your Jira/SNOW integration.  Tasktop works through the REST API's of each tool and synchronizes any data you wish in real time as status changes.  It even can support workflow like the creation of a backlog item in Jira based on Change Request settings  in ServiceNow.  Best of all, Tasktop continually tests all new releases of both Jira and ServiceNow to ensure your synchronization configurations will work now and in the future.  You can find more on the Tasktop website and even see a demo here: https://www.tasktop.com/integrations/servicenow-service-desk.

 

prachishah17
Kilo Contributor

Hi All,

 

SyncSnow is data integration platform which seamlessly connect/integrate servicenow with Jira or vice versa.                                                      

 

For more information   please visit www.syncsnow.com                          

 

 

 

thanks                                                                    

 

prachi