Link same component with Automation for Jira addon - Smart value array and JQL

Viktor June 10, 2020

Hello.

I am trying to link issues that have the same components.

 

How do I get list of components that can be used by JQL?

 

This is throwing errors:

component = {{issue.components.name.asJsonStringArray}}

 

Error:

SD-768: "((component = ["ABC"]) AND (key != SD-768)) AND (project in (10001))" - Error in JQL Query: Expecting either a value, list or function but got '['. You must surround '[' in quotation marks to use it as a value. (line 1, character 15)

 

Using this documentation>

https://support.atlassian.com/jira-software-cloud/docs/smart-values-json-functions/

1 answer

1 accepted

0 votes
Answer accepted
Viktor June 10, 2020

This seems to do the trick, first component is enough for me:

component = {{issue.components.first.name.asJsonString}}

Documented at: https://blog.codebarrel.io/automation-for-jira-smarter-smart-values-9da5598f2bdc 

Suggest an answer

Log in or Sign up to answer