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
Thanks
Regards
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
Hi @Bill Sheboy
"{{lookupIssues.size}}" didnt work neither, but I tried with "{{lookupIssues.size()}}" and its works
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.