My goal is to determine the number of outward linked issues of the current issue that are not in status "Declined".
From my research it seems lookupIssues is my best bet, however I'm not sure if I'm trying to do too much at once.
I currently have:
However, there is no output due to this error:
10152 is field "status" - so far so good. But I'm trying to understand the cause for the error.
The scope of the automation does not make a difference - the error is the same with a global scope.
Thanks!
The Lookup Work Items action requires valid JQL, and the expression you show is comparing a list of field values (e.g., Declined, Declined, To Do) on the left side of an operator to a single value. JQL requires a field, not a value, on the left.
Next, why test the outwardIssue ones specifically? Could you instead test by the link types using the JQL function linkedIssues()?
If you actually need only the outwardIssue ones, please try this JQL for the lookup:
key IN ( {{issue.issuelinks.outwardIssue.key}} ) AND status != Declined
Please note well: the rule scope in the details at the top will determine what this JQL finds in the rule. When you expect the linked work items to be in multiple projects, the scope will need to be multiple-project or global. Your Jira Site Admin will need to help change the rule scope.
If you only need the count and do not want to change the rule scope, this would work:
{{#=}}0{{#issue.issuelinks.outwardIssue.fields.status}}{{#if(not(equals(name, "Declined")))}}+1{{/}}{{/}}{{/}}
How that works:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.