Forums

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

Filter tasks under story by alternative text in Summary

Anastassia Ignatova
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 6, 2022

I want to filter tasks under particular story based on alternative text in the Summary.

 

I tried the following query but it displays me tasks that are not part of the story:

project = MYPROJECT AND parent = "Story number" AND summary ~ "Text one" OR summary ~ "Text two"

It works only if I  search with one word/text for the summary

project = MYPROJECT AND parent = "Story number" AND summary ~ "Text one" OR summary ~ "Text two"

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
April 6, 2022

Hi @Anastassia Ignatova -- Welcome to the Atlassian Community!

The ANDs get processed before the ORs in JQL, so use parentheses to force the order of operation you want.  For example, please try this:

project = MYPROJECT AND parent = "Story number" AND ( summary ~ "Text one" OR summary ~ "Text two" )

Next, the CONTAINS operator ~ is checking for each of the words and not a complete, specific string.  If you want an exact match on the multi-word text try wrapping it in quotes as shown here: https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-operators/#Advancedsearchingoperatorsreference-CONTAINS-CONTAINS--

For your query to exact match on "Text one" or "Text two", please try:

project = MYPROJECT AND parent = "Story number" AND ( summary ~ "\"Text one\"" OR summary ~ "\"Text two\"" )

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer