Jira Webhook JQL Query for Done

Laryssa August 9, 2021

Hi there,

I've created my webhook which is currently functioning well, however, i'd like to be notified when issues are moved to Done.

 

I've tried the JQL "statusCategory = Done" but it didn't trigger a notification in Teams. Any suggestions?

1 answer

1 accepted

1 vote
Answer accepted
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2021

Hello @Laryssa ,

I set up a quick test with a webhook pointing at a randomly generated URL for a  listener tool to do a rapid test using basic settings for a JQL on an updated event, and everything is coming through to the test listener with 200 OK and all the expected content:

  • Issue related events:
    • JQL: statusCategory = Done
    • Issue: updated

Screen Shot 2021-08-11 at 1.53.38 PM.png

So looking at this the webhook should be triggering correctly and firing off the data to the noted URL unless there is possibly a conflict somewhere else in the rule,  can you navigate to the webhook and edit the settings and send me a screenshot of the rule configuration for each section of the webhook that you have options configured so I can take a closer look at the settings to see if there is a conflict somewhere.  I would also recommend running a quick test on another third-party webhook listener to see if there is a block occurring somewhere between Jira and Teams,  I ran my test on a free online tool called beeceptor but any webhook listener of your choice including creating a custom listener should do the trick.

Let me know what you find.

Regards,
Earl

Laryssa August 12, 2021

Hey Earl,

Your writeup in itself may have answered my question, I had not enabled Issue - Updated because what I don't want, is updates when it goes to other stages, only done. It's too many notifications to have it moved to priority, in progress, blocked, etc. So is the JQL query acting in conjunction with2021-08-12 13_11_27-Window.png the Issue related event > issue > update?

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 12, 2021

Hi @Laryssa ,

Thanks for the update, and yes the JQL is only interacting with the "Issues" and the "Comments" selectable items as noted in the description of the section:

You can specify a JQL query to send only events triggered by matching issues. The JQL filter only applies to events under the Issue and Comment columns.

So in the scenario, Updated events would apply to status change occuring in a transition and applied to the JQL filter such as the transition to done via statusCategory change you are going for as issue created should not apply as issues should not be resolved when created and it would be expected to occur on a follow-up transition action where transitions count towards the updated value. 

So when using the trigger of Issue > Updated it will trigger the webhook base on the value defined in the JQL, and should not be triggered for alternate status update events.

Regards,
Earl

Like # people like this
Laryssa August 12, 2021

Awesome, thanks for the info - I didn't find this particularly intuitive but your explanation is very clear and resolved this for me. I was able to use the webhook successfully with a test, it captured only the "done" transition, not the others. 

 

THANK YOU!

Like Earl McCutcheon likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events