Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: get issues based on a webhook-provided list related to a custom field

Björn Out
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 28, 2023

I've gotten stuck trying to do something which seems quite easy, but turns out is actually kinda complicated, haha.

We have a custom field which always contains an internal reference number. Our system can automatically send a list of active reference numbers to a webhook each night. I then want to find all the issues that have those reference numbers that were sent through the webhook, so that I can update them.

I've tried a few approaches, but got stuck on all of them:

  • Writing JQL to match the issues that need to be updated. This didn't work because you can't really match a list sent through webhook in JQL like that;
  • Doing some smart value magic. I finally ended up with {{#webhookData.NTOs}}{{#if(equals({{.}}, {{issue.customfield_10681}}))}}yes{{/}}{{/}}, which should print "yes" when the custom field matches an item in the list. Unfortunately, it doesn't understand the {{.}}, which should represent an item from the list I'm comparing to, and I cant figure out why;
  • Iterating over the list with a branch and using the Lookup action to find the issues to update. This didn't work because you can't actually update the resulting issues...

Does anyone know how I could make this work? Thanks a lot in advance.

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2023

Hi @Björn Out -- Welcome to the Atlassian Community!

Depending upon your custom field type...I wonder if you could use your webhook data to iterate and build a JQL statement (with an IN statement, or a bunch of OR statements, or...) and then branch to that for the updates.

Using a branch will be constrained by automation limits, so how many reference numbers are you expecting for the nightly run?

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events