I'm really struggling trying to do something, what I thought was going to be rather easy..
The triggerissue has a parent, this parent has linked issues, with different lintypes, and I (simply) need to retrieve the issue which is linked (to the parent) with a particular link type. (in my case: "External-Internal")
I've been trying multiple angles of logic but all fails..
Most hopeful I came up with was this, but it doesn't work:
For parent:
{{issue.issuelinks.type.split(",").match("(External-Internal)").outwardIssue.key}}
any help or suggestions would be highly appreciated !
Short answer:
For this scenario, I recommend using a Lookup Issues action with JQL and the linkedIssues() function for the specify link type to find the issues, then get the keys from the lookup result:
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues
https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#linkedIssues--
More information...
For the expression you show, {{issue.issuelinks.type}} would already be a list, and so the split() is not needed. But even then, the match() shown could not return the entire, linked issue record as it would only be matching on the "type" attribute.
In my experience, the smart value {{issue.issuelinks}} is one that does not load all of the data for the issues in all contexts. Sometimes the data must be loaded into a variable for parsing / filtering. Thus to perform that filtering on the type, the entire list of linked issues would need to be deserialized into a text string, stored in a created variable, filtered with a dynamic regular expression with match(), and then parsed to extract the keys.
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.