Hi,
Problem:
I'm trying to get the domain name of the reporter to be set as a label in my issues as they are created. Right now, I have a regular expression working in all of the regex testers online, but when I try it in JIRA it does not work. It returns a blank string or nothing at all.
What I'm looking for is if the reporter's email address is test@mydomain.com, I would like the label to be mydomain
My automation JSON code for updating the label is below:
{
"update": {
"labels": [
{
"add": "{{reporter.emailAddress.match("(?<=@)[^.]+(?=\.)").asJsonString}}"
}
]
}
}
I have tried with asJsonString and without asJsonString.
I have tried with escape slashes and without slashes
Any help would be appreciated. If not I will use the fall back of
"add": "{{reporter.emailAddress.substringAfter("@)}}
which returns the full domain name.
Thank you again in advance.