A few years ago, I developed a SOAP-based proof of concept integration between ServiceNow and JIRA. Recently, Atlassian announced that the JIRA SOAP web service interface was to be deprecated in favor of their newer REST-based API. Due to this change, I have had several customers approach me with the question, can ServiceNow integrate properly with JIRA now that Atlassian will be focusing on SOAP. The following PoC setup serves as an example of bi-directional communication between ServiceNow and JIRA.
Sample Business Case
Out of the box, this integration fulfills a scenario where there are two groups working tickets. One group is in the ServiceNow tool and the other is in JIRA.
The ServiceNow group creates a ticket that they know will be a JIRA issue to be worked by the secondary team. Once the ticket is created in ServiceNow, a corresponding ticket is created in JIRA. Comments can be exchanged between the two systems. Status changes can also occur between ServiceNow and Jira.
Integration Flow
This proof of concept demonstrates the ability of users in ServiceNow to create an Incident ticket that gets synchronized as a JIRA issue within a specified project. Only incidents marked as a “Jira Issue” will be synchronized.
When creating an incident in ServiceNow, the user must set the Category field to be “JIRA Issue”. From there, the Subcategory field will be populated with supported types of JIRA Issues. The user will select the appropriate issue type.
When the incident is created, the information is sent to JIRA and a corresponding ticket is created. JIRA responds to ServiceNow with the ticket information that was created. ServiceNow records that information both as a comment and saves the unique ticket ID in the incident’s “Correlation ID” field.
Once this handshake has taken place, if you were to go and view the incident record, you will notice a button labeled: “View JIRA Record”. When this button is clicked, a new window will pop up with the JIRA issue shown.
If someone were to add a comment on the ServiceNow incident, the comment is sent to the JIRA instance and added to it’s comment history.
If a technician were to add a comment to the JIRA issue, that comment will be brought it either 1) by a scheduled query that ServiceNow can make to the JIRA issue on a regular basis, or 2) a web service call made from JIRA to the Inbound JIRA Web Service Import Set endpoint.
State changes in ServiceNow will be reflected in JIRA and vice/versa.
Architecture
Setup & Configuration
STEP 1: Install the Update Set
Download the update set listed at the bottom of this blog post. Preview the update set and then commit it.
Once you install the update set, there will be a new application in your Navigation Pane. You may have to refresh the navigation pane to see it.
STEP 2: Configure the Application
Click on the “Settings” link under the Configuration section of the application.
Most of the settings should be self explanatory.
Here is a screenshot of the settings available for the integration:
Pulling JIRA for updates and applying them to ServiceNow
There is a section in the settings that allow you to configure the integration to Pull updates from JIRA, rather than receive them from JIRA directly. This is a useful setting when you are in a Hosted JIRA instance that does not give you the power to send Web Service calls to ServiceNow on required events.
The following settings allow you configure the pulling schedule, etc.
Pushing JIRA updates to ServiceNow
If you are in a dedicated, on-premise JIRA instance, it is recommended not to pull data from JIRA, but rather send web service requests ServiceNow. The integration provides a web service for this purpose. To view the Web Service URL for your instance, browse to the integration application and click on “Inbound JIRA Web Service”. You will be presented with the web service and the corresponding WSDL address for SOAP web service calls.
The following are sample SOAP calls you could make from JIRA:
Change issue type (subcategory) to Improvement
Set the “u_issue_type” element to one of the values of the Subcategory dropdown choices on the incident form for JIRA Issues as the category.
1 2 | TST-49632 Improvement |
Change Status to Closed
Send the JIRA status code in the “u_status” field. We will convert it to a ServiceNow state.
1 2 | TST-49632 6 |
Change the Short Description on the Incident
Set the “u_summary” field to have the updated Short Description text.
1 2 | TST-49632 ? |
Add a comment to the incident
Set the “u_comment” element to the comment string you will be adding to the incident.
1 2 | TST-49632 My comment goes here |
Demo Video
Download the Update Set
This update set has been discontinued. There is an official version of a new and improved JIRA Integration Framework found on the ServiceNow Store:
https://store.servicenow.com/$appstore.do#!/store/application/cdc4e34adb4d4300e0cbda11cf9619b8
Dear John,
Thank you for sharing this information!
Best regards
Jürgen
Hi, very interesting information.
How much workload can this integration take?
Is it somthing that an Administrator would do let’s say in 1 hour ?
Thanks
@Samir, This was meant as a proof of concept and should be used as a kickstart to deploying your own Jira integration. I would recommend putting a developer on it or hiring a consultant to do polish up the implementation in a more formal way. I don’t typically maintain these update sets as official production level sets as I don’t have time to keep up with them all.
That being said, I would imagine, if you were to configure this AS-IS, it would probably take 1-2 hours for an administrator to set up. That is assuming you have a set of Jira API credentials that you can use in the integration and that you are using the pulling mechanism to get ticket updates from Jira.
Hi,
I have followed all the instruction, but I don’t know where I should Change issue type (subcategory) to Improvement.
I could open the WSDL, but the corresponding SOAP is not available.
I have created a ticket in ServiceNow, couldn’t find it in JIRA.
I appreciate your advice.
Hi,
Thanks for sharing. The instruction is very accurate.
Everything is almost working for me now. A corresponding JIRA issue is created for a new incident.
The issue is the “ID” and “Issue Number” are undefined and this is the https://jira.atlassian.com/browse/undefined.
I will appreciate your help,
@Maryam…looks like your project ID is having issues. You must set this in the properties and it needs to match the project as it appears in the URL of the Jira ticket. I can’t tell you much more from my viewpoint without seeing your logs, your setup, etc.
I couldn’t find anyway to set the project ID in Service-Now.
The Project I created has a Project Number and sys_id.
Could you please let me know how to set it up.
Just to save future people working on this integration a little bit of time: if you get this error:
“Field ‘customfield_xxxxxx’ cannot be set. It is not on the appropriate screen, or unknown.”
Check that the field is:
– Available for the issue type you’re trying to create
– Available on the form for the user who’s trying to create it
– Available either for the project you’re trying to insert to, or globally
HI john,
why web services cant it be done with email notifications .
Yes, email notifications can do something similar, however, if you have the options of Web Services, that is usually the preferred option.
john
can you please share the advantages of web services over email notifications.
Hi John,
Do we really need a MID Server to integrate with ServiceNow if Jira( Ver 6.1) is not over internet ?
@Joe – you only need a MID Server if the instance cannot reach the Jira Web Service Endpoint. If you establish a VPN tunnel between the ServiceNow instance and your network, then a MID Server would not be required.
Hi John! Thanks for all of the work you do. I am about to embark on establishing the Jira integration here. I am very glad you have given a good starting point.
We will have multiple projects in Jira. I think I’ve figured out how to dynamically pass the project instead of relying on the property. Also right now they have multiple field mappings for each project. I have come up with an idea how to do that, however they are getting pushed by management to keep the same mappings for all of their projects in Jira.
Also we are going to try and tie in the Catalog/RITM/Cat Tasks and Change Request into Jira, so this has potential for lots of fun.
We are still in the early stages. I’m still trying to get access to a test jira instance on our side, but hopefully will be making progress soon. I’ve set up the integration already and read through all of the scripts, mappings, packets, etc and it all looks pretty straightforward.
Again, many thanks for all of the material!
Okay, so trying to get this integration working for incident. Is there something on the Jira side that has to be turned on? It doesn’t look like my mid-server can communicate with the jira instance. I’m seeing errors like:
ERROR: Web Service did not respond after 30 seconds
Initial response: null
And then the big one:
Jira issue created: undefined
This last one tells me that SN is sending the call off to Jira, and expecting a response, which would be the Jira issue’s identifier, but is getting nothing.
Servicenow and Jira can be integrated using informatica cloud. Please
visit the following link-
http://mansasys.com/servicenow
Thanks,
Promila
Awesome John! Thanks for doing things like this in your blog!
Hi John,
I am facing “Unknown Host” issue when I try to use the solution you have provided. When I try to access using browser with “http://my_jira_instance/rest/api/2/search?jql=created>-3m” I get the result but when I make a call from ServiceNow I get the error mentioned above.
Any clue why?
Thanks in Advance.
Rajnish
Hello Mister Anderson,
did you ever used the Attachments REST Endpoint of Jira. I try to send a attachment from servicenow to jira without “curl”.
I converted the Attachment into a Byte-Array, every time i send the file to jira i get a 500 response.
Kind Regards
Philipp
Hello John,
Thank you for all the information you have shared – most helpful.
I was wondering if you can share some of your experience with JIRA’s outbound issue with Basic Authentication.
How have you managed to set up JIRA to send an update to ServiceNow (I believe via an SN Processor) but have issues with Basic Authentication within the url?
Thank you
Martin
Any idea how to get around this error?
RESPONSE:
{“errorMessages”:[],”errors”:{“customfield_11802″:”Field ‘customfield_11802’ cannot be set. It is not on the appropriate screen, or unknown.”}}
Hi Scott.
It’s a great tutorial… A great starting point !!
Actually I need to change the Incident table destination to create a Change Request directly (the destination table should be change_request, I think :-?… )…. In our environment Jira will be created only CR so I need to recreate it on ServiceNow.
In particular.. In change_request table I didn’t found the Correlation ID field.. I could create a custom field ..
Could you help me? Have you any suggestion?
Thank’s a lot.
Alessandro
Hi john,
Thank you for all the information you have shared – most helpful.
A corresponding JIRA issue is created for a new incident.The issue is the “ID†and “Issue Number†are undefined and this is the https://jira.atlassian.com/browse/undefined.
Could you help me? Have you any suggestion?
Hi,
When you write “SOAP calls you could make from JIRA” you mean that me as a Jira administrator should develop the api from Jira side?
thanks,
Skender
Hi,
Thank you for all the information you have shared – most helpful.A corresponding JIRA issue is created for a new incident.The issue is the “ID†and “Issue Number†are undefined and this is the https://jira.atlassian.com/browse/undefined.Could you help me? Have you any suggestion?
Hi John ,
Please can create Jira intergration video step by step with coding .
Kindly help me out .
Regards,
Gaurav Rai
Since upgrading our QA environment to Jakarta, the outbound sync of messages from ServiceNow to JIRA does not work.
The following Business Rule conditions are no longer valid:
current.element==”comments” && current.name==”task” && gs.getSession().isInteractive() && gs.getProperty(“com.snc.integration.jira.enable_integration”)==”true”
We have modified the tables, the variables, and trigger conditions. Nothing seems to be working. When I remove the condition above, the script runs to this point, then stops:
var gr = new GlideRecord(“incident”);
gr.get(current.element_id);
if( gr.isValid() ){
j.debug(“correlation display: ” + gr.correlation_display);
j.debug(“Should be: ” + j.CORRELATION_DISPLAY);
At a loss as to why the outbound fails, but opening a new JIRA issue using the button works flawlessly, and comments sync from JIRA without problem.
Hi John,
Any update on Brandon’s issue. I am having the same issue – Outbound sync of messages from ServiceNow to JIRA does not work.
Hi John
This is a great design thank you for sharing. Can you kindly advise if the design can be enhanced to work with multiple Jira Projects please?
If so could you kindly confirm what is required via the settings etc. If you already have this documented, could you kindly point me to this please?
How can I configure this with an Atlassian API token (versus an API username/password configuration)?
@Mike, this POC was created with only basic authentication configured. You can do token based authentication using a JIRA REST endpoint, when connecting to JIRA Cloud using this method: https://confluence.atlassian.com/cloud/api-tokens-938839638.html
I, personally, haven’t tried it though. Good luck.
Hello admin, i’ve been reading your page for some time and
I really like coming back here. I can see that you probably
don’t make money on your site. I know one interesting method of earning money, I think you will like it.
Search google for: dracko’s tricks
Thanks @John, that did the trick!
@John, with this configuration, a Jira issue is created when a Service Now Incident is created. How can I modify the Service Now configuration so that a Jira issue is created when a Service Now incident is modified (e.g. a Service Now Incident’s category was changed from “Inquiry / Help” to “Jira Issue”)?
please can anyone help me to get the update set for this poc.
I didn’t see any link or xml file for get the update set.please share the link or file.
@selvan – here is the link on Share: https://developer.servicenow.com/app.do#!/share/contents/5185213_jira_rest_based_integration_poc?v=1.01&t=PRODUCT_DETAILS
This is more of a learn-as-you-go type of POC update set. My company, Yansa Labs, does offer a JIRA integration framework that allows us to help people build JIRA integrations rapidly and securely. Let me know if you need any help.
Info on the framework: http://www.yansa.io/solutions/#jira_integration
Contact us: http://www.yansa.io/#contact
@John any update on @Brandon’s issue. Seems that I have the same issue where SNOW INC comment will not update back to Jira, however the Jira Comment update back to SNOW INC works fine. Just wondering if any update or fix was found.
@John, with this configuration, a Jira issue is created when a Service Now Incident is created. How can I modify the Service Now configuration so that a Jira issue is created when a Service Now incident is modified (e.g. a Service Now Incident’s category was changed from “Inquiry / Help†to “Jira Issueâ€)?
@mike g
You would change the Business Rule that implements the create, to happen on “Update” instead of “Insert”.
Some additional code changes may also be required from that business rule, but that is where I would recommend you start.
Hi John,
Good Morning!
Thanks for sharing above article.
Could you please help me with an issue which I am seeing post importing given update set.
Issue: Post importing the import set in my dev instance, I can see that my customized categories got disappeared instead, I can see default categories like Hardware, software, Network etc.
Hi john,
Thank you for all the information you have shared – most helpful.
A corresponding JIRA issue is created for a new incident.The issue is the “ID†and “Issue Number†are undefined and this is the https://jira.atlassian.com/browse/undefined.
Could you help me? Have you any suggestion?
Hi,
For attachments,
I have tried to debug code from another thread and works perfectly for me. I have posted complete solution code here – https://community.servicenow.com/community?id=community_question&sys_id=0679b3b0dbfeeb00f21f5583ca961916
Will this integration work on JIRA that is Cloud Based ?
So, there is no more Basic (Simple) authentication. How do we make the change to just Basic Authentication? I make the change and can test the REST messages, but it never triggers from an incident
Hi John,
Thanks a lot for your efforts and information.
It seems the link is broken to download the update set. Could you help me with the updated link or the file on my email ID:- pkj.kmr.6@gmail.com.
Hi all,
your issues with posting comments from SNOW to JIRA can be solved by amending the condition for business rule “JiraIntegration – addComment” to:
current.element == “comments” && current.name == “incident” && gs.getSession().isInteractive() && gs.getProperty(“com.snc.integration.jira.enable_integration”) == “true”
We are working with Madrid Release and it works.
Looks like the journal table is now storing comments for incident table and not for task table anymore.
Hope this helps!
Sophie
This integration outlines how a bug and incident ticket can be integrated, but what about how an epic and change tickets could be integrated? We’d like ServiceNow ChG tickets to have link to JIRA EPICs and import information the SQUAD/team into the change ticket for trending. We’d also like the live date from JIRA to reflect in SNOW for verification that everything is being done at the correct times. is this possible?
Hi John,
Thanks a lot for your efforts and information. It seems the link is broken to download the update set. Could you help me with the updated link?
John,
Link seems to be broken …please share the location of the link please..
John ,
We got the updateset
https://developer.servicenow.com/app.do#!/share/contents?page=1&keyword=jira
HI John- I have tried using your POC with jira to service now cloud. I haven’t got any errors but still its not working at all.
Any help from your end much appreciated.
HI John- I have tried using your POC with jira to service now cloud. I haven’t got any errors but still its not working at all.
Any help from your end much appreciated.
Hi John,
Thank you very much for the post. Its highly informative.
I have questions around “If you are in a dedicated, on-premise JIRA instance, it is recommended not to pull data from JIRA, but rather send web service requests ServiceNow. ”
Can you please throw light on reason behind recommendation. Data from Jira can be either pulled by ServiceNow OR Jira can push data to ServiceNow. What all issues do you see when Jira server instance push the data to ServiceNow via REST API.
Thanks in advance for your response.
Hi John,
Thank you so much for the information shared.
Can you please advise how do you create a Jira Instance when there are multiple projects in Jira.
Thanks in advance
Hello John,
It seems that the link to the update set is not anymore available.
Is there any alternative ?
Thank you !
Malek
Hello – also looking for the update set. Can someone re-post on Share or drop a link where we can download it? Thanks!
Update – Chuck Tomasi zipped it and put it on community.
https://community.servicenow.com/community?id=community_question&sys_id=60c90be5db5cdbc01dcaf3231f96197d
Kim – Can’t find the link?
Could you please provide the list for update – Chuck Tomasi zip file?
@Harika, unfortunately, that update set was written probably about 8 years ago and is not supported. I have built a new JIRA integration framework that is now listed on the ServiceNow Store and fully supported. It can be found at: https://store.servicenow.com/$appstore.do#!/store/application/cdc4e34adb4d4300e0cbda11cf9619b8
-John