Branching on JQL failes for Incoming Webhook Trigger rule
Asked by Jimmy Petersson:

Hi,

*Context: using Jira Data Centre*

My use-case involves triggering a project automation rule using an incoming webhook from another project automation rule on the same Jira server. The send- and receive webhook works great and can exchange data.

***Incoming Webhook Rule***

![Webhook_rule.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/195402i0CFF47DAF24556CE/image-dimensions/290x882?v=v2 "Webhook_rule.PNG")

However, the branching on JQL is never executed for my receiving rule as is evident from the below audit log as *Debug 3* tag is not shown in audit log. The rule skips branching and goes :

![Webhook_Audit.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/195403i658C2C44F67647A4/image-size/large?v=v2&px=999 "Webhook_Audit.PNG")

Initially I suspected the received data used to craft the JQL was incorrect, so I hardcoded the JQL statement to one specific issue that exist on the server (as can be seen below).

![Webhook_rule_branch_statement.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/195404i8422AC3AC2962B69/image-dimensions/330x271?v=v2 "Webhook_rule_branch_statement.PNG")

But this did not resolve the issue.

If I modify the trigger to a scheduled one, and run the rule manually, the branching condition works as expected, and *Debug 3* tag appears in audit log:

![Webhook_Audit_2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/195406i99774B137AA4BB71/image-dimensions/420x284?v=v2 "Webhook_Audit_2.PNG")

Are there any known issues/limitations when it comes to branching logic when using Incoming Webhook trigger?

If not, any suggestions for further troubleshooting would be much appreciated.

Best Regards

//Jimmy


Answers:
author: Bill Sheboy
body: Hi [@Jimmy Petersson](/t5/user/viewprofilepage/user-id/3760714)

First thing, I am using Jira Cloud so I cannot confirm the following for Server/Data Center version...

There is an defect that when the incoming webhook trigger fires, JQL in the rule is executed as an anonymous user: <https://codebarrel.atlassian.net/browse/AUT-547>

That one looks like it was fixed, but I wonder if you change the user the rule runs under if that will impact the results.

Regardless, I recommend submitting this one as a ticket to Atlassian Support to review: <https://support.atlassian.com/contact/#/>

Kind regards,  
Bill

comments: author: Jimmy Petersson
body: Hi Bill,

Thanks for sharing.

There is something fishy with my combo of incoming webhook trigger and branch statement. Will do some more digging around before submitting a defect ticket.

B R

//Jimmy


author: Grant Kadokura
body: [@Jimmy Petersson](/t5/user/viewprofilepage/user-id/3760714) I'm having the same issue, webhook not triggering JQL branch. I similarly tried hardcoding and still nothing. Did you figure out what was going on?


author: Grant Kadokura
body: [@Jimmy Petersson](/t5/user/viewprofilepage/user-id/3760714) I figured out what was causing my issue, I had failed to set this webhook field properly

![2023-11-29 08_17_51-Clipboard.png](https://community.atlassian.com/t5/image/serverpage/image-id/294451iDEF0526C013C1CB2/image-dimensions/245x86?v=v2 "2023-11-29 08_17_51-Clipboard.png")


Tags: jira-data-center

webhook