The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello,
I need to get an email from summary of issue and put it in a text field in the same issue.
I use JQL:
issueFunction in issueFieldMatch('project = ATLAS AND issuetype = "Chore"', "summary", "[a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+")
that works correct, because it find one and only issue fitting the conditions. So it means that my regular expression is OK.
Then I've created a simple automation like on screenshot below
and it works every time, but nothing happens in issue fields. I mean I see success status in audit log, but when i check the issue link I see that there is no any new value in that field.
The example of smart value for text field i got from documentation here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/
Any idea why smart value from action in my automation doesn't set the email to a text field? Maybe I have a smart value syntax error in action?
Hi @daria
I'm joining the party a bit late here but I've just encountered a similar issue that lead me here.
I tried to run a simple regex in my automation but the output was blank despite the pattern working as expected. What solved the issue for me was to add a capture group to my pattern.
My pattern that was returning an empty set: "[\w-]*$"
My pattern that works as expected: "([\w-]*)$"
You might achieve the desired result by changing
"[a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+"
to:
"([a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+)"
I hope this helps
I may be mistaken, but I believe .match is used to evaluate the regex. I believe you want to use Quote...
{{issue.summary.quote("[a-zA-Z0-9_!#$%&'*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Mark!
I've just tried it now, but that smart values also gives zero values (nothing) to my field. It also cleared any values from field if i set their manual.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having the same issue in my test environment. It does look like your original use of match should work. I may need to lean on the other community members to help solve this one.
As for making sure it's not overwritten, I would add one of the following to your automation:
AND Test Field IS NOT EMPTY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But what it will explain or give to me? When i add "AND "Test field for email from summary" IS NOT EMPTY" it won't find any issue for such JQL.
I've also checked it with "Test field for email from summary" IS EMPTY" to be sure that there is no any value in the field.
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.
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.