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

The POC integration by Mr. Andersen is built to use this to store the sys id of the incident, prefixed with something. There is a property called "Pulling Instance Identifier". SN, whenever it tries to create the Jira issue, will take the value in this field, then append the sysid of the incident, then set the custom field in jira side. This allows it to link the SN incident with the Jira issue.



I will dig into getting the actual ID of the field, I was wondering if it was something like that. I know Remedy was similar, where it had a different database column name than what you saw in the tool.


garyopela
ServiceNow Employee
ServiceNow Employee

AWESOME!



Thanks, you helped me understand this. I pulled up firebug (well, had a coworker who had it installed) to find the true DB column name of the field, and updated the custom field property with that number. Then proceeded to create a new incident that would trigger the integration, and found in the log a new error message:



{"errorMessages":[],"errors":{"customfield_10701":"Operation value must be a number"}}



Which I totally expected, because they created the field as a number field instead of string. This tells me that at least everything else is working, and I can resolve this one last thing and I should have the base POC working.



Many thanks for your helpfulness!


garyopela
ServiceNow Employee
ServiceNow Employee

All right, got everything fixed up, and now SN will create a jira issue, and when the jira issue is updated, the SN incident is updated. Thanks again for your help!


Hi Gary,



I have the integration working fine, but I have been asked if it was possible to synch more information...


Do you have implemented the mapping for other fields for SNC? What I mean are the Closure Information (mandatory tab) and the Priority field in the Incident table (SNC).


And what about the Assigned to or the Reporter in Jira?


What is the best practice or guidelines to expand the integration also for other information and fields between the two platforms?




Thanks a lot,


Skender


garyopela
ServiceNow Employee
ServiceNow Employee

Hey Skender, unfortunately that was for a past employer where I had built it, I have now since moved on so I don't have access to that code.