Forums

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

Jira search returning unexpected results

Sebastien Brion May 13, 2025

In our project there is a custom field called "pid: email".

We filter issues by their values in this field in order to retrieve the stories associated to a specific email.

This appears to return incorrect results when the email domain contains dashes. Specifically, when the email domain contains dashes, it looks like the filter will return all matches across the email domain, not just for the particular email.

In our STAGE project, I'm using the following JQL search string:

project = STAGE AND "pid: email[short text]" ~ "test123@domain-with-dash.example.com" ORDER BY Rank ASC

And this returns 2 issues:

* STAGE-179 which has a "pid: email" value of test123@domain-with-dash.example.com (expected)

* STAGE-193 which has a "pid: email" value of something@domain-with-dash.example.com (not expected)

 

I understand that the "~" operator is not an exact equal match, but I was not expecting that "something@domain-with-dash.example.com" would have matched my search value of "test123@domain-with-dash.example.com".

Can we write this jql search differently to achieve what we want (finding the first issue but not the second)? Or is this a bug in the Jira filtering mechanism?

1 answer

1 accepted

1 vote
Answer accepted
Aaron Pavez _ServiceRocket_
Community Champion
May 13, 2025

Hi!

This is a known issue in Cloud. You will get the results as you mentioned.

More on that here:

https://community.atlassian.com/forums/Jira-questions/JQL-search-for-string-that-contains-a-dash-quot-quot/qaq-p/1782137

Seems there is a fix:

https://jira.atlassian.com/browse/JRACLOUD-69172

If not explore the workaround mentioned above and here:

https://jira.atlassian.com/browse/JRACLOUD-85456

Regards

Sebastien Brion May 13, 2025

The fix in JRACLOUD-69172 does work, using the following JQL (using backward slashes instead of forward slashes for the exact phrase match):

project = STAGE AND "pid: email[short text]" ~ "\"test123@domain-with-dash.example.com\"" ORDER BY Rank ASC

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events