In my JQL syntax, how can I check for specific syntax?
e.g. find all text in the specific format 'XXX999'
Hi @Lesley Hamel ,
The JQL field "text" as in text ~ "some words" searches an issue's Summary, Description, Environment, Comments. It also searches all text custom fields.
text ~ "XXXX999"
https://support.atlassian.com/jira-service-management-cloud/docs/jql-operators/
Hi @Lesley Hamel
I've give this a go:
summary ~ "\"XXX999\""
Ste
Thanks Ollie, what I'm hoping to search for is any test which is in a particular FORMAT, rather than containing specific CONTENT.
In my example search for text content in the format 'XXX999', I'd like it to 'find' these:
ABC123, ABC456, DEF456, QZP603 etc etc
Thanks Stephen, but this identifies any instances of 'XXX999' wonderfully, but I want to identify any instances of content in this format, eg. I'd like it to find 'AGH145' and 'IOK456' etc.
I think I need to look outside JQL
I don't know of a native way of doing this.
Could you use Automation for this? For example...
...then use that field in the JQL instead?
In JQL (JIRA Query Language), you can use the ~ operator along with the tilde symbol (') to perform a text search using regular expressions. To find all text in the specific format 'XXX999', you can use a regular expression like 'XXX\d{3}'.Here's how you can write the JQL query:
arduinoCopy codetext ~ 'XXX\d{3}'In this query:• text is the field you want to search in. You can replace it with the actual field name where you want to perform the search, such as summary, description, etc.• ~ is the operator used for performing a text search using regular expressions.• 'XXX\d{3}' is the regular expression pattern. Here:• ' is the tilde symbol used to enclose the regular expression pattern.• XXX matches the literal characters 'XXX'.• \d matches any digit.• {3} specifies that the previous token (which is \d) should be repeated exactly three times, so \d{3} matches three consecutive digits.
This query will return all issues where the specified field (e.g., summary, description) contains text in the format 'XXX999'.
Adjust the field name as needed for your specific problem statement
Kindly let me know if this works
@Humashankar VJ
This does not work as JQL does not recognize \d. Can you confirm how were you able to make it using JQL?
Hi @visby8em
Can you try - summary ~ "XXX*"
This finds all summaries containing XXX followed by anything, basically It does not strictly enforce three digits after XXX.
Keep me posted if you need any additional assistance.
Regards
There is no need for a * either.
Simply doing summary ~XXX will search any summary having XXX
Hi @Lesley Hamel,
Unfortunately JQL doesn't support advanced wildcards, e.g. to match any digit.
This being said, if you're open to solutions from the Atlassian Marketplace, you'll find several apps that either extend JQL by additional functions, or provide their own, more powerful search mechanisms.
E.g., your use case would be trivial to solve using the app that my team and I are working on: JXL for Jira.
JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. One of the filtering options that is available for all fields is text filtering, which, for advanced use cases like yours, supports regular expressions.
This is how it looks in action:
The regular expression that I'm using here is
XXX\d\d\d\d
but you can use any expression that fits your need.
Once you've narrowed down your list of issues, you can work on your issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.
I should also add that JXL can do much more than the above: From support for configurable issue hierarchies, to issue grouping by any issue field(s), sum-ups, or conditional formatting.
Any questions just let me know,
Best,
Hannes
It looks like you're new here. Sign in or register to get started.