how to create incident from servicenow instance to Jira instance using Rest

caffry
Kilo Guru

when i create an instance in servicenow instance it should create an instance in JIRA incidents..

can anyone help me out

1 ACCEPTED SOLUTION

Priyanka136
Mega Guru

Hi caffry,

1) Go to link - https://www.atlassian.com/software/jira

    Try it Free (Trial for 7 days only) - Go to Jira Software, Jira Service Desk - Create Your Jira account

2) Refer this link also :-https://developer.atlassian.com/cloud/jira/platform/jsapi/request/

https://developer.atlassian.com/server/jira/platform/rest-apis/

https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-api-3-universal-avatar-type-type-ow...

4) In Snow Instance , Go to - System Web Services - OutBound - Rest Message

5) New - Endpoint = https://<your site name>.atlassian.net/rest/api/3/user

6) Authentication Type - Basic Auth Profile

7) HTTP Request - HTTP Header - Name = Content-Type, Value = application/json

😎 Save - Go to HTTP Methods - Default Get already created - Go to New

9) Http Methods = GET, POST, PUT, PATCH, DELETE

10) If you are creating the user in jira from snow so for that use POST method

11) In HTTP Query Parameters - Give the Content (json format) - save

12) click on auto-generate variables

13) Copy Preview script usage code - paste it in Business Rule ( user table, before , insert) - save

14) Go to - User table - Fill the fields

15) Check it in Jira , whether the user is created or not.

Please let me know if you have any question.

I hope it works, Please mark it Correct or Helpful based on impact...!!!!!!

Warm Regards,

Priyanka

find_real_file.png

www.dxsherpa.com

 

View solution in original post

9 REPLIES 9

Priyanka136
Mega Guru

Hi caffry,

1) Go to link - https://www.atlassian.com/software/jira

    Try it Free (Trial for 7 days only) - Go to Jira Software, Jira Service Desk - Create Your Jira account

2) Refer this link also :-https://developer.atlassian.com/cloud/jira/platform/jsapi/request/

https://developer.atlassian.com/server/jira/platform/rest-apis/

https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-api-3-universal-avatar-type-type-ow...

4) In Snow Instance , Go to - System Web Services - OutBound - Rest Message

5) New - Endpoint = https://<your site name>.atlassian.net/rest/api/3/user

6) Authentication Type - Basic Auth Profile

7) HTTP Request - HTTP Header - Name = Content-Type, Value = application/json

😎 Save - Go to HTTP Methods - Default Get already created - Go to New

9) Http Methods = GET, POST, PUT, PATCH, DELETE

10) If you are creating the user in jira from snow so for that use POST method

11) In HTTP Query Parameters - Give the Content (json format) - save

12) click on auto-generate variables

13) Copy Preview script usage code - paste it in Business Rule ( user table, before , insert) - save

14) Go to - User table - Fill the fields

15) Check it in Jira , whether the user is created or not.

Please let me know if you have any question.

I hope it works, Please mark it Correct or Helpful based on impact...!!!!!!

Warm Regards,

Priyanka

find_real_file.png

www.dxsherpa.com

 

 

Hi caffry,

Any Update on this ?

If you found my answer worthy, Please close this thread and mark it Correct or Helpful. So it will remove from Unanswered List and other can refer it easily.

Thanks,

Priyanka

www.dxsherpa.com

Business Rule on Problem table

 

(function executeRule(current, previous /*null when async*/ ) {

try {
var r = new sn_ws.RESTMessageV2('JIRA_POST_GET', 'POST');

r.setXMLParameter('jqlstring', 'project=JIRASOFT');
r.setStringParameter('issuetype','Task');

r.setStringParameter('description', current.description);
r.setStringParameter('summary', current.short_description);
r.setStringParameter('SNOWPRBID', current.number);
r.setStringParameter('SNOW_SYSID', previous.sys_id);


current.u_sent_to_jira = true;

var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();

var obj = JSON.parse(responseBody);
current.u_jira_issue_id = obj.id;

current.update("Updating Sent to Jira to true");
gs.info('BR:Post to Jira:Info:' + "Created new PRB:" + current.number + ",JIRA ID: :" + obj.id);

} catch (ex) {
var message = ex.getMessage();
gs.error("Br:Post to Jira: Info :" + message);
}

})(current, previous);

 

Priyanka136
Mega Guru

Hi caffry,

If my answer is satisfied and enough your requirement then Please mark my answer as Correct. So other can refer it easily.

Thanks in advance,

Priyanka

Brad Collins
Kilo Expert

Hi,

We're working with ZigiWave for quite some time now and their integration platform was the best way to achieve this integration. Their new version support fully customizable mappings, conditions, etc., directly from the platform's UI. I should also mention that their integration specialists did pretty amazing job, assisting us.

I would recommend to drop them an email.