Help with JQL query - quotation marks

Louise Pancholi August 5, 2021

Hello, I'm trying to search for subtasks of issues with certain criteria. The criteria I want to search for contain custom fields with spaces, so I need to use quotation marks, however JIRA interprets this as finishing the 'subtasksOf' statement. Is there a different way I can write the query, without using a plugin?

 

Example:

issueFunction in subtasksOf("project = PRJ AND issuetype = Story AND status not in (Closed) AND component in ("Salesforce Service Cloud")")

1 answer

1 accepted

2 votes
Answer accepted
Deniz Tımartaş August 5, 2021

Hi there,

Try this:

issueFunction in subtasksOf("project = PRJ AND issuetype = Story AND status not in (Closed) AND component in (\"Salesforce Service Cloud\")")

So you should use \" to escape that character.

Best Regards.

Pedro Felgueiras
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.
August 5, 2021

I agree with @Deniz Tımartaş but you could also reference filters inside filters 

 

Create a first filter with project = PRJ AND issuetype = Story AND status not in (Closed) AND component in ("Salesforce Service Cloud") and check the ID on the URL 

 

Ater that create a second filter issueFunction in subtasksOf("filter = 123123"). Replace 123123 with the ID of the previus filter. 

 

If the filter get's more complex it's simpler to use this way.

Like Deniz Tımartaş likes this
Louise Pancholi August 9, 2021

That worked! Thanks a lot both! 

Suggest an answer

Log in or Sign up to answer