Forums

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

lookupIssues doesnt get data

Angel
Contributor
May 7, 2025

Hi 

We need validate in automation rule if a sprint has stories, so my rule activate by webhook so I search with this JQL "Sprint = {{webhook.id}} AND issuetye = storie" and then I create a variable with size but when I validate with audit log, it doesnt show anything, I´m dooing the same with the sprints and works,  What am I doing wrong?  We have Jira-Cloud

 

sprintss.pnglogs.png 

Thanks

Regards 

2 answers

1 accepted

3 votes
Answer accepted
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.
May 7, 2025

Hi @Angel 

Without seeing your entire rule and audit log for context, I do notice two things:

The list size function used with a Lookup Issues result is already a number, and so converting that with the asNumber function likely does not work.  Instead please try just this:

{{lookupIssues.size}}

 

Next, you create a variable named stories but later write that to the audit log as {{strories}}.  Those do not match and so the audit log value will be null.  Please update the log write to {{stories}} and make the above change for using size, and then re-test your rule.

 

Kind regards,
Bill

Angel
Contributor
May 8, 2025

Hi @Bill Sheboy 

"{{lookupIssues.size}}" didnt work neither, but I tried with "{{lookupIssues.size()}}" and its works 

Thanks

 

2 votes
John Funk
Community Champion
May 7, 2025

Hi Angel,

Why are you using a Webhook to initiate the rule? Seems like overkill.

I would start simple and solve things along the way. For example, do the lookupIssues step and simply log out the size to see what it is. So hardcode the Sprint Name/ID in the lookupIssues step for a Sprint that you know has stories, and see what you get. If it is greater than 0 then you know the Sprint ID value is not getting set properly. 

Mikael Sandberg
Community Champion
May 7, 2025

And to add to @John Funk answer, when you are calling the webhook, are you sending data as a payload? Because you are using {{webhookData.sprint.id}} your payload should look something like this:

{
"sprint": {
"id": "<sprintId>"
}
}

But if you are only sending the sprint Id then you could simplify the payload.

Have a look at this article where I describe how to use smart values for the incoming webhook trigger.

Suggest an answer

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

Atlassian Community Events