Hello community,
I would like to search for any email address, possibly in form of a regex, in any Jira ticket in any of the text fields & comments. The goal is to have an automation post a comment in the ticket, where an email address was found.
1. I have tried to set up an automation like this, but it does not seem to work. The audit log says, no actions were triggered. I'm not too familiar with regex'es so I tried different ones that I found, none worked.
2. I have tried to search in a JQL for text ~ "@", but this does not seem to be allowed by Jira (because @ is a reserved special character) and does not work either with the workaround that I found, that was suggested in the community forum which would be text ~ "\\[@\\]", I believe.
It would be great if you could support me in solving this issue. Thank you in advance for any insight.
Have you tried looking for “.com”
Hi, thanks for the idea, but I'd have to include every possible TLD there... but .com and a few others (the most likely ones) would probably be a good starting point. I will try it out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just realized, that it does not only find email addresses but also URLs, so this is not an option, unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yep not ideal but a start. if this is something you need to assess regularly you might consider incorporating Automation and add a label "email".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack, sorry, I don't understand your idea to - incorporating Automation and add a label "email". Would you be so kind to elaborate? My goal is to have an automation running, looking for tickets with an email address somewhere in the text fields and then have the automation comment on these tickets.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well I was just thinking that you might have a rule that triggers when an issue is create or edited and search the field for an email and if it finds one then a label is added. then you can simply use the label in a JQL going forward to check for issues containing and email.
Now, whether this makes sense or is doable really depends on the details of your situation. For example where might these email addresses appear in the issue? A single field or any text field. If I understood exactly what we are dealing with here and why you are trying to ferret out the issues w/ emails I might have a more appropriate answer for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Solveig Petersen ,
Can you please elaborate about the text field , here is my suggestion please let me know if it makes any sense to you.
Create multiple conditions like
{{issue.assignee.emailAddress}}
matches your reg expression
{{issue.reporter.emailAddress}}
matches your reg expression
{{issue.comments.author.emailAddress}}
matches your reg express
You can also add your text fields and then can match.
This regular expression will match all type of emails
^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.