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

garyopela
ServiceNow Employee
ServiceNow Employee

Wow Pavel and Maros, you guys are right where I am now. Now I need to get the attachment data in, but am having a hard time getting the encoded base64 data out, translating it back to an attachment. I was trying to right something in .net that would pull the data out and then translate it to an attachment. I had it pulling the base64 data out, I looked on the internet and tried a couple of things to change it to a regular file, then wrote it out to the certain file on my midserver, but it never could get it as a working file.


Hi,



could you just please answer to this my important question?


- is this PoC only applicable to ONE project at a time from Jira side?




Thanks a lot,


Skender


garyopela
ServiceNow Employee
ServiceNow Employee

Hey, sorry for this! The POC only can handle one project, however, if you pass that project as a variable, then you can control it to go to different projects.


Thank you Gary.


In fact I have done this way. I put the CF id and CF value at every project in Jira the client wants to sync the issues.


And the cf in the setXMLparameter (main script library) is fixed; the same for all.


And it works!



The only thing I have to 'map' now is the closure issue notes (mandatory fields in Jira and in the related list in ServiceNow).


Any idea how to handle this part?



Skender


Gary, do you know if there is a quick way to import all project (collections of issues) from Jira to ServiceNow?


Or maybe another alternative:


The idea is to have these groups of SNow incidents (different correlation IDs) to 'give birth' to projects in Snow...



Thanks a lot,


Skender