Having difficulty with filtering through lookupIssues with if statements, I have it running through an advanced branch so it will look at every result and will write to the audit log depending on whether the issue key from the lookupissues list is CUS or CDI. The problem is that it will match correctly on the first if statement but will never match on the second if statement. If I reverse the order and place "contains CUS" as the first if statement, it will match on that one and then not match on the other. Any ideas why and how to fix this? Based on this particular case it "should" match on both.
Found a workaround by modifying the JQL and assigning to individual variables.
Your created variable {{atVAR}} apparently contains:
CDI-94, CUS-39
And that is used in a dynamic JQL expression for the Lookup Issues action:
issue IN linkedIssues({{atVAR}}, "Child of")
However, the linkedIssues function only takes one issue as a parameter, optionally followed by a list of link types: https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#linkedIssues--
What do you want that lookup to find? For example, if you wanted the linked "Child of" issues for both, you could make the JQL more dynamic with list iteration:
{{#atVAR.split(", ")}}
( issue IN linkedIssues( {{.}}, "Child of" ) ) {{^last}} OR {{/}}
{{/}}
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.
I want it to find all issue links of {{atVAR}} which I believe it's doing, in this case being CDI-94 and CUS-39.
I thought using the advanced branch I could loop through each of the lookup results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
a screenshot of the advanced branch
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you want to loop through the issues, use a Branch on JQL instead of the Lookup Issues action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
odd enough I'm showing the same behavior when I move it to a JQL branch instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
btw, {{atVAR}} only contains one issue, AT-85. So it is only passing one parameter. The CDI-94 and CUS-39 are the results
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.