Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to query Summary for EXACT match?

Sio I want an exact match when using the contains operator in a JQL query. 

 

key = TEST-36 AND summary ~ "__SPU__"

 

However this seems to return anything with SPU also regardless of capitalization!

 

How to get an exact match?

3 answers

1 accepted

4 votes
Answer accepted
Thomas Schlegel Community Leader May 18, 2017

Hi Timothy,

this is not possible with current Jira versions. There is an open issue for that: 

https://jira.atlassian.com/browse/JRASERVER-21372

Maybe you want to vote for it.

sigh...

OK, well since I am calling it from script runner then I can use a regex to make sure it matches. 

 

But it is really irritating that the issue referenced has been open for 7 years. This should be supported by JQL :-(

 

Thanks for the reply!

I have the exact requirement. Timothy, can you please elaborate on "calling it from script runner".

 

Thanks,

I love how this entire community is filled with posts that describe an issue, and they are all "solved" with the solution being "you can't do that".

I wish I could upvote this 1000x more

Like # people like this
Like # people like this
Like # people like this

The anthem of Atlassian :D

Like Grigory Salnikov likes this

seems like escape quotes work. summary ~ \"XYZ\"

Like # people like this

Hello everyone,

scriptrunner JQL function helped me solving that issue

issueFunction in issueFieldExactMatch(subquery, fieldname, regexp)

took from here

https://jira.atlassian.com/browse/JRASERVER-21372?focusedCommentId=2619612&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-2619612

Hello thank you solved for me !

@Julian from AF

I have been reading documentation for days now trying to get scriptrunner setup. Any advice to help me get it working?

Hi @Joshua Hopkins ,

Yes see my screenshot :

image.png

In my case i use it in Jira Automation and it's working fine. 

To help you, you can use the website https://regex101.com/ to construct your regex if you need more than an exact match. To have an exact match, just put your text between ^and $ as shown but with regex101.com you can construct more precise.
image.pngimage.png

Is it clear for you? 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

535 views 1 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you