JIRA jql Query - what * means?
Asked Answered
D

2

11

There is no regexp in JQL: https://answers.atlassian.com/questions/138055/how-can-i-use-regex-in-a-jql-query-i-cannot-match-strings-that-have-a-specific-ending-in-jql-ex-ing-should-match-running-jogging-etc

What is the meaning of * in a jql Query?, I have different results when using and not using it. But I didn't find any consequence in the results.

Dentate answered 22/2, 2013 at 11:3 Comment(0)
A
25

~ means CONTAINS, so

summary ~ win

means WHERE summary CONTAINS the exact word win. * is a wildcard. The example:

summary ~ "win*"

means WHERE summary CONTAINS win and any multiple character combination after it.

There are two types of wild-cards in JQL: ? and * where:

  1. To perform a single character wildcard search use the "?" symbol.
  2. To perform a multiple character wildcard search use the "*" symbol.

Check the JIRA advanced searching guide and the wild-card explanation here.

Aloke answered 23/2, 2013 at 12:22 Comment(3)
works not for every field. For example, fixVersion ~ 1.4.* returns error The operator '~' is not supported by the 'fixVersion' field., at least in Jira 6.0.4Overunder
For version fields like fixVersion and affectedVersion you have to use the versionMatch() function, e.g. fixVersion in versionMatch("15.2.*").Salangia
Doesn't work for sprint~"Yamaha*" . Returns error "The operator '~' is not supported by the 'sprint' field."Daria
D
2

Atlassian calls the '~' operator "contains", but it doesn't actually mean "contains". For example, searching the Customer field (a custom text field) for "ABCD" will return a hit for "ABCD, EFGH" but not for "EFGH, ABCD". And you can't use the wildcard character * at the start of the search string. See wildcard searches and JRASERVER-6218 for more. We're investigating Adaptavist ScriptRunner to work around this 12 year-old bug.

Donative answered 18/5, 2017 at 13:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.