Forums

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

Jira JQL error I cannot fix....

Brian Jackson July 16, 2024

 

 

project IN (RITACP, RITDSM, RITAMC, RITAME, RITDFS, RISCO, RITAFBM, RITAMP, RITDFDO, RITAMPI, RITCRCL, RITAFLE, RITDLM, RITDDC, RITAIO, RITAIVN) AND (
    (issuetype = Initiative AND "XYZ" = "ABC")
    OR issueFunction IN linkedIssuesOf('project IN (RITACP, RITDSM, RITAMC, RITAME, RITDFS, RISCO, RITAFBM, RITAMP, RITDFDO, RITAMPI, RITCRCL, RITAFLE, RITDLM, RITDDC, RITAIO, RITAIVN) AND issuetype = Initiative AND "XYZ" = "ABC"')
    OR issueFunction IN linkedIssuesOf('issuetype = Epic AND issueFunction IN linkedIssuesOf("project IN (RITACP, RITDSM, RITAMC, RITAME, RITDFS, RISCO, RITAFBM, RITAMP, RITDFDO, RITAMPI, RITCRCL, RITAFLE, RITDLM, RITDDC, RITAIO, RITAIVN) AND issuetype = Initiative AND \"XYZ\" = \"ABC\"")')
)

 

Error in the JQL Query: Expecting ')' or ',' but got 'Key'. (line 1, character 232)

 

This query works when I am not trying to get issues linked to epics but just pull Initiatives and Epics.  When I try to add all linked issues, I get the error above.  Any help would be appreciated.

1 answer

2 votes
Trudy Claspill
Community Champion
July 16, 2024

Hello @Brian Jackson 

Welcome to the Atlassian community.

Your post tags say you are using Jira Cloud. I'm going to assume that is correct.

The "issueFunction IN linkedIssuesOf()" portion is not natively available in Jira JQL. Do you have a third party app such as ScriptRunner Enhanced Search or JQL Extensions installed? If so, it is that third party app that makes that syntax available.

In general that syntax can't be used directly in the native Jira issue search screens. For ScriptRunner there is actually a separate Enhanced Search screen where you have to create the JQL statement with that syntax:

Screenshot 2024-07-16 at 11.28.37 AM.png

 

You create the JQL statement there and save it, then in the native Jira issue search screens you can reference it with the syntax:

filter="put the name of the saved filter here"

Brian Jackson July 25, 2024

Thanks, 

Looking at ScriptRunner now in hopes it solves my issue.

appreciate the suggestions. 

-B

 

Trudy Claspill
Community Champion
July 25, 2024

Hello @Brian Jackson 

I was looking at the error message again, and think I made a mistake in my suggestion.

The message says it expect ')' but found 'Key'. However, 'Key' doesn't appear anywhere in the JQL you posted.

Can you double check that you posted the correct correct JQL? Can you show us the screen with the JQL and the error message displayed at the same time.

Brian Jackson July 25, 2024

project IN (RITACP, RITDSM, RITAMC, RITAME, RITDFS, RISCO, RITAFBM, RITAMP, RITDFDO, RITAMPI, RITCRCL, RITAFLE, RITDLM, RITDDC, RITAIO, RITAIVN) AND (
(issuetype = Initiative AND "Key Research Technology Enablers" = "In-Vivo Workflow Simplification")
OR issueFunction IN linkedIssuesOf('issuetype = Initiative AND "Key Research Technology Enablers" = "In-Vivo Workflow Simplification"')
OR issueFunction IN linkedIssuesOf('issuetype = Epic AND issueFunction IN linkedIssuesOf("issuetype = Initiative AND \"Key Research Technology Enablers\" = \"In-Vivo Workflow Simplification\"")')
)

 

Sorry, in an attempt to scrub industry terminology I replaced the In-Vivo Workflow Simplification and Key Research Technology Enablers with ABC, XYZ. 

I think your response may be the same, but, I posted the error causing query above. 

 

Brian Jackson July 25, 2024

atlassian image.png

Trudy Claspill
Community Champion
July 25, 2024

So, the error message is not coming from a native JQL filtering field, but rather from some third party plugin interface. What plugin are you using there?

Let us also confirm the hosting/version of Jira you are using. In the upper right corner on the menu bar near your Avatar there should be a "help" button labeled with a question mark. When you click that button and select About Jira, what information do you get? 

I'm having a hard time figuring out which instance of Key within the JQL the message is reference. It says line 1, char 83, but Key doesn't appear at the 83rd character of any line.

I suggest that you try building up the query in segments to try to identify the segment causing the problem. First try individually just the segments that include Key

issuetype = Initiative AND "Key Research Technology Enablers" = "In-Vivo Workflow Simplification"

issueFunction IN linkedIssuesOf('issuetype = Initiative AND "Key Research Technology Enablers" = "In-Vivo Workflow Simplification"')

issueFunction IN linkedIssuesOf('issuetype = Epic AND issueFunction IN linkedIssuesOf("issuetype = Initiative AND \"Key Research Technology Enablers\" = \"In-Vivo Workflow Simplification\"")')

If none of them individually generate the error then try building up the query by combining them

(issuetype = Initiative AND "Key Research Technology Enablers" = "In-Vivo Workflow Simplification") OR issueFunction IN linkedIssuesOf('issuetype = Initiative AND "Key Research Technology Enablers" = "In-Vivo Workflow Simplification"')

 

(issuetype = Initiative AND "Key Research Technology Enablers" = "In-Vivo Workflow Simplification") OR issueFunction IN linkedIssuesOf('issuetype = Epic AND issueFunction IN linkedIssuesOf("issuetype = Initiative AND \"Key Research Technology Enablers\" = \"In-Vivo Workflow Simplification\"")')

 

issueFunction IN linkedIssuesOf('issuetype = Initiative AND "Key Research Technology Enablers" = "In-Vivo Workflow Simplification"') OR issueFunction IN linkedIssuesOf('issuetype = Epic AND issueFunction IN linkedIssuesOf("issuetype = Initiative AND \"Key Research Technology Enablers\" = \"In-Vivo Workflow Simplification\"")')

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events