Jira’s query language (JQL) is a query language similar to SQL. That being said,
the syntax for doing something similar to SQL’s
LIKE statement is nothing like
how you’d do it in SQL.
While deviating from the syntax that was used for inspiration isn’t uncommon, it’s quite peculiar that the word “LIKE” is also a reserved word in JQL, even if it’s not used explicitly for fuzzy matching.
In JQL, they refer to “like” statements as “contains”. The “contains” operator
is the tilde
~ and looks something like this:
field ~ searchtext
The operator allegedly attempts to match on derivates so searching for “file” will also match “files”.
The operator also supports wild cards, and uses an asterisk
* instead of SQL’s
wild card characters:
field ~ "searchtext*" field ~ "*searchtext"
If you are searching for a multiple word phrase, keep in mind that including a space in your search text implies “match BOTH of these words”:
field ~ "this that"
Which will search for “this” and “that”. If you’re looking for “this that”, you’ll need to quote (and escape) the string like this:
field ~ "\"this that\""
And if you’re looking for things that do not contain something, simply slap a
! on the operator:
field !~ searchtext