Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner JQL Function for particular linked issues specified issue key

PhilSpo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 15, 2023

Hello,

 

I am trying to create a JQL function that can be used in JQL to list all the issues that are linked through to a particular issue type using certain links. ( so a linked issue that's linked to a linked issue that's linked to another issue.

 

 

It seems to be working okay apart from the very last part of the script:

 

"key = {0} OR issueFunction in linkedIssuesOf(\"key = {0}\", contains) OR issueFunction in issuesInEpics(\"issueFunction in linkedIssuesOf(\\\"key = {0}\\\", contains)\") OR  issueFunction in subtasksOf(\"issueFunction in issuesInEpics(\\\"issueFunction in linkedIssuesOf(\\\\\"key = {0}\\\\\", contains)\\\")\") OR issueFunction in subtasksOf(\"issueFunction in linkedIssuesOf(\\\"key = {0}\\\", contains)\") OR issueFunction in linkedIssuesOf(\"issueFunction in linkedIssuesOf(\\\"key = {0}\\\", contains)\", contains) OR issueFunction in linkedIssuesOf(\"issueFunction in linkedIssuesOf(\\\"issueFunction in linkedIssuesOf(\\\\\\\"key = {0}\\\\\\\", contains)\\\", contains)\", \"is delivered by\") OR issueFunction in linkedIssuesOf(\"issueFunction in linkedIssuesOf(\\\"issueFunction in linkedIssuesOf(\\\\\\\"issueFunction in linkedIssuesOf(\\\\\\\\\\\\\"key = {0}\\\\\\\\\\\\\", contains)\\\\\\\", contains)\\\", \\\\\\\\\\\\\\\\\\\"is delivered by\\\\\\\\\\\\\\\\\\\")\", \"is implemented by\")”

 

So its the last OR thats failing. If i take that OR out of the scrip it returns results fine. As soon as the last OR is put into the script it fails with:

 

Scripted function "AllProjectContents"compilation failure. Contact administrator and check logs. Message: com.atlassian.jira.jql.parser.antlr.RuntimeRecognitionException

 

Can anyone spot what is wrong with the last part?

 

Cheers


Phil

 

 

0 answers

Suggest an answer

Log in or Sign up to answer