Tags (e.g. $$issue$$) always return quotation marks (" "), so if you want to use JQL, in which the nested query is located, you have to use one of additional special characters - escape quotation marks.
Characters | Name | Desription |
---|---|---|
'query' | Inputs | Second level of JQL |
\'query\' | Backslash | Third level of JQL |
It happens because from the application point of view quotation marks (" ") have already been used.
Example JQL with tag:
issueFunction in linkedIssuesOf('issue in linkedIssuesInQuery(\'key=$$issue$$\')', 'relates')
will result with JQL
issueFunction in linkedIssuesOf('issue in linkedIssuesInQuery(\'key="DEMO-1"\')', 'relates')
This applies to all Validators, Conditionals and Post Functions in which JQL is used.