I am trying to use the linkedissues() function within a Jira Automation, but I am getting an unexpected error.
The following JQL query works fine in an advanced search:
issue = PROJ-154 AND issue in linkedissues(PROJ-155)
With the automation with a JQL match If condition where issueToLink is an issue found in the comments.
issue = {{issue.key}} AND issue in linkedissues({{issueToLink}})
I get the error:
No subsequent actions were performed since JQL condition did not pass due to error running JQL:"(key IN (PROJ-164) AND (issue = PROJ-164 AND issue in linkedissues(PROJ-154, PROJ-154)))" - Issue link type 'PROJ-154' could not be found in function 'linkedIssues'.
I want to match all linked tickets. If I use issue = {{issue.key}} AND issue in linkedissues({{issueToLink}}, "relates to"), it works fine, but I want to match any linked tickets that match the key.
Is this a Jira automation bug, or am I using it wrong?
Note:
It looks like a bug might have been introduced on 9/20/2020, as linkedissues function worked in automation with a single parameter for me earlier that day and started failing past 9PM PST that day, unless someone changed the trigger on me.
I'd previously thought I successfully tested and rolled out a trigger using this query:
https://community.atlassian.com/t5/Jira-Software-questions/Jira-automation-restrict-linking-issue-rule-from-adding/qaq-p/1465593#M95060