Stuck in loop copying comments between Jira and ServiceNow using Jira Spoke and flow designer.

MB12
Kilo Sage

Hello,

I'm trying to copy comments between Jira and ServiceNow using Jira spoke and flow designer, but have found myself stuck in a loop between the two. When a comment is added to an RITM, it's added to Jira. However, once that comment is added to Jira, it's copied back over to ServiceNow. Can anyone help in modifying this to work properly? Below is what I'm using:

 

Copy comments from Jira to ServiceNow:

1. I'm using a copy of the included Jira webhook subflow with the following actions added.

find_real_file.png

 

Copy comments from ServiceNow to Jira:

1. Business rule to trigger a flow designer flow

find_real_file.png

2. Triggered flow

find_real_file.png

1 ACCEPTED SOLUTION

Pranesh072
Mega Sage
Mega Sage

Use gs.isInteractive() in your BR conditions

The isInteractive() method checks if the current session is interactive. An example of an interactive session is when a user logs in using the log-in screen.

View solution in original post

13 REPLIES 13

Shrutika Surwad
Kilo Guru

Hey MB,

 

is your sub flow working ?

 

Because I'm getting blank value at additional comments

find_real_file.png

 

Expecting your responce

Hi Shrutika, 

 

Try updating the comments section to use Input-Comment-Author-DisplayName rather than Input-Author-DisplayName.

 

Thanks,

Now Im just try to display comments i.e input->comment->body

 

Still it is blank.

VR17
Tera Contributor

HI @MB12 

How you are called flow from BR ,In advance tab ,I have written below However getting error

 

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

var inputs = {};
inputs['current'] = current; // GlideRecord of table:
inputs['table_name'] = 'incident';


sn_fd.FlowAPI.executeFlow('global.to_update_comment_in_jira', inputs);

})(current, previous);

 

 

Error: Cannot read property "comments" from null,Detail: Cannot read property "comments" from null