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"
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.