I am trying to create an automation that searches all the tickets within a project that contains sensitive data (I have the regex I need for this), and then emails specific users.
I am stuck on the syntax of the JQL portion of the Scheduled trigger. How can I combine JQL with Regex? For example I want the JQL to return any issues that have specific numerical formatting in the Description.
I then want that list of tickets to be emailed to specific users. I know to use the send email action, but how do I add the list of tickets the JQL returned?
description ~ (?!000|666)[0-8][0-9]{2}-(?!00)[0-9]{2}-(?!0000)[0-9]{4}$ does not work (syntax is incorrect)
Hi @Sam Gerzon
The out-of-the-box JQL does not support regular expressions. It only has limited wildcard handling and a "fuzzy" match supported by the CONTAINS ~ operator: https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CONTAINS----
If you need this type of query often, consider investigating marketplace addons for JQL which might add regular expression support.
If you need this infrequently and are trying to check within 100 issues or less, an automation rule could pull in up to 100 issues with the Lookup Issues action, and then use the match() function with a regular expression on the result set to filter down further. Please look here if you want to try that: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match--
If you decide to try that, please test your regular expression with small batches first to confirm it works as you expect. Regex which works with one tool may not work with the implementation for the match() function in automation rules.
Kind regards,
Bill
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.