Create URL of Issue In ServiceNow

Knowledge Heis1
Tera Contributor

Hello

@Ankur Bawiskar 

We are using Jira webhook. Whenever an issue is created or updated, the information flows into ServiceNow through the flow designer. Now we want to create the Issue URL and update that in one of the fields in the ServiceNow Custom table, We have stored the base URL in the system property, Can I create a URL for that Particalur Issue?

 

"corp.atlassian.net/browse/issue key "in flow designer?

1 ACCEPTED SOLUTION

Hemant Kumar Ch
Kilo Sage

Hello Knowledge 

 

Create a Action with input as Payload 

 

Add Script Step 

var allInputs = JSON.parse(inputs.payload);
outputs.key = allInputs.issue.key;

 

Map that output Variable to Key field 

 

Please like if it helped You

Ch Hemant Kumar

 

View solution in original post

21 REPLIES 21

@Knowledge Heis1 

you can try to use the inline scripting and set the value

get the system property value and append the key

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Could you please help in Scripting ,I am lacking on that part 

@Knowledge Heis1 

in the inline script section for the URL field do something like this

return gs.getProperty('baseURL') + '/browse/' + <give here the key you receive from previous flow step>;

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hello Ankur 

 

When I am using the below script in Subflow Link inline script, it is given error as "attempting to use undefined input = 'current' from Process Jira ServiceNow Webhooks.

 

var getKey = fd_data.trigger.current.u_key
return gs.getProperty('jira_base_url') + '/browse/' + getKey;

 

and my key is IST-303 but in field it is updating as IST only ?

@Knowledge Heis1 

the key you will get from the step which is giving you the response i.e. the previous step

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader