Business Rule issue - triggers twice when comment is updated via email

Hanumant Madan1
Kilo Guru

Dear Team,

We have business rule : Jira_Webhook_Commentsupdate.

This rule should ideally gets triggered when someone updates the comment on Incident, and the Jira_ref_id field is not empty i.e. have value.

In regular scenarios i.e.: when someone updates comment using Incident form, the trigger works fine and BR gets executed as expected.

But when someone updates the comments via email , the BR gets executed twice and we are unable to identify if this is something to do with BR filter, as only single comment gets updated on INC via email, then why BR runs two times.

Any advise on this, why BR triggers twice when comment gets updated via email?

Attached rule.

Regards,
Hanumant

1 ACCEPTED SOLUTION

Hanumant Madan1
Kilo Guru

Hi All,

 

We resolved this by moving field action from UI under action tab into the Script and this got resolved.

Not sure what field action in Action tab was causing, but this is now resolved.

 

Regards,

HM

View solution in original post

15 REPLIES 15

If its on the same table it will matter, you need to identify which one of this is having the conflict (deactivate them 1 at a time and check)

Then try to try to remove current.update, one way to do that is change the BR to before and just comment the line current.update. But you will have to test it thoroughly to make sure it doesn't cause any issue.

 

-Anurag

shloke04
Kilo Patron

Hi @Hanumant Madane 

Couple of things which might be affecting this in your instance:

1) Can you make your current BR through which you are using for your comment update "JIRA_BR_Update_condition" from After Update to Before Update and then check again.

I believe this should avoid any other update which might be affecting your current BR and might be getting triggered along with your current BR.

Also since you are using After Update in your BR, in Inbound email as well you might be using current.update which might be causing multiple updates to happen on the form and hence you are seeing two transaction of updates.

So please make your BR from After to Before Update and then check again.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi Shlok,

 

Tried that, but still the BR got triggered twice.

 

Regards,

Hanumant

Hi Shlok,

Your comment above: Also since you are using After Update in your BR, in Inbound email as well you might be using current.update which might be causing multiple updates to happen on the form and hence you are seeing two transaction of updates.

My response: I see that update.incident inbound action does have current.update(), and may be this is causing it.

I tried setting my BR to before but still it ran twice.

Any further advice?

 

Regards,

Hanumant

 

Not an issue. Will try to assist you in this to get you to a solution.

Can you share me the BR code which you have written for this purpose and also the Inbound action code as well?

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke