Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,455,462
Community Members
 
Community Events
175
Community Groups

substring search within title field?

Hello,

Consider that I have user stories with names like the following

  • 2022-Q2-pictures
  • 2021 Q1-pictures
  • 2022 Q3 pictures

That is, the text sometimes has hyphens between words, sometimes spaces, sometimes both.

I want to write a query that finds all of them.  If I search 

issuetype = Story AND text ~ "pictures"

I do not see the ones where a hyphen connects "pictures" to preceding text.

 

How can I write a query that finds all of them?

 

2 answers

1 vote
Darryl Lee Community Leader Dec 03, 2022

Hey @edburns and @Alex Koxaras _Relational_ :

Aren't story names in the Summary? When I did some testing with just "2*pictures" it matched this test issue "Need New Part - Part number 2". 

Hrm, weird that the * picks that up, despite the "pictures".

If you can are able to constrain your search to this decade (2020-2029), that might help at least narrow it down bit. (See below.)

Also, I think you'd need a .* in there somewhere.

issuetype=Story and summary ~ "202?.*pictures"

But yeah this still matches this Summary:

Do this thing by 2022-02-22

So it also seems that you can't constrain "fuzzy" searches (that use the ~ character) to the beginning of the string.

I'm sure this has been covered somewhere beyond the official docs... let's see.

Ah yeah, here's the relevant bug:

You can use regular expressions in the issueFieldMatch JQL function in its ScriptRunner Enhanced Search but that would require purchasing that add-on. Also, ScriptRunner search is a little different, since you can't use those functions directly in Jira searches.

Hi @edburns 

If your text has a year in front of the work picture, then you can use the:

text ~ "2*pictures"

But you can't place the "*" in front of "pictures".

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events