how to integrate servicenow with jira with rest api and without any updateset download .How can we connect through it can anyone suggest me? Im struck with business rulle can anyone help me?

Sriramachandra
Tera Guru

Help me through business rule?

1 REPLY 1

Anil Shewale
Mega Guru

Hi

go through following steps.

  1. A. Basic Installation & Setup
    1. a.         In ServiceNow
      • Import Jira Integration POC xml in to ServiceNow instance.
        1. 1. Navigate to Retrieved Update Sets Ã­  Click on "Import Update Set from XML.
        2. 2. Choose Jira Integration POC XML to upload.
        3. 3. Commit the update Set.
        4. 4. Verify New application module "Jira Integration POC" in Application Navigation menu.
  • Configure the Application
    1. 1. Click on the "Settings" link under the Configuration section of the application.
    2. 2. Here is a screenshot of the settings available for the integration:
      1. a.             Enable the Jira Integration: If this property is marked as YES that's when Integration will take place.
      2. b.           The Base Jira Instance URL: Please provide URL of Jira Application from which this integration needs to take place.
      3. c.             Jira API Username: User created in Jira, having all privilege access for Web-Service Communications.
      4. d.           Jira API Password: Password for above User.
      5. e.           Jira Project Key: Create a project on which this integration would work for Sync. Provide 'Project Key' (available in Jira) to this field.
      6. f. Custom Field ID for ServiceNow ID: This field is custom create in Jira on above project. This is very important for communication between these two tools.
      7. g.             MIDServer: If set is belongs from MIDServer Concept then Information need to feed up here.

 

iii. Pulling JIRA for updates and applying them to ServiceNow

1. 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.

2. The following settings allow you configure the pulling schedule, etc.

iv. REST Messages Changes:

Navigate to 'REST MESSAGES' Ã­  Open 'Jira Issue'

Provide Authentication with ServiceNow's Username and Password, who has capability to Communicate REST MESSAGES.

b. In Jira:

i. Create a Sample project e.g. Test sample project (TST).

(NOTE: This key (TST) has to be provided in ServiceNow Jira Settings Jira Project Key.

  • Create a Custom Field as 'ServiceNow Syne'.

Technical Aspects of Integration:

1.             Architecture:

2. 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.

 

When a corresponding JIRA issue is created, the ticket information is stored in a comment on the ServiceNow incident record.

 

After the JIRA issue is created, ServiceNow will store the JIRA ticket number in the incident's "Correlation ID" field. It will also set the "Correlation Display" field to 'JIRA Integration'.

 

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.

var s = source.u_status;

if(s == "10000") answer = 1; // New

if(s == "1" || s=="3" ) answer = 2; // Active

if(s == "5" || s=="10001" ) answer = 6; // Resolved

if(s == "4") answer = 2;

if(s == "6") answer = 7; // Closed

OOB Integration Fields

 

Because this is just a simple Proof of Concept, we only integrate with a small number of fields to get the idea that we can synchronize between the two systems. The fields currently integrated in this integration are:

 

  • Jira Issue <--> SNC Incident
  • Jira Issue Summary <--> SNC Short Description
  • Jira Issue Status <--> SNC Incident State
  • Jira Issue Comment <--> SNC Incident Comment

Adding new fields for sync:

  1. 1. Create the new fields in the WSDL table i.e. u_jira table and check whether those fields are reflecting in the inbound web service fields.
  2. 2. Add the newly created fields in the transform map and update the transform map.
  3. 3. Update the business rule JiraIntegration — CreateIssue with the new fields as shown below and save the BR.
  4. 4. Create and try the field sync in new incidents.

for more refer the following thread.

https://community.servicenow.com/community?id=community_question&sys_id=f0ac07e5db9cdbc01dcaf3231f96...

https://community.atlassian.com/t5/Jira-Core-questions/JIRA-SERVICENOW-integration-by-REST-API/qaq-p...

https://community.servicenow.com/community?id=community_question&sys_id=72ce3ea5db58dbc01dcaf3231f96...

 

If it help mark helpful or correct 

Thanks and regards

Anil