You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
@Daria Avdeeva - Sorry that's what I get for multitasking 🤦♂️. Correct, that should be IS EMPTY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe the below page will help you.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/
I replaced regex with these options.
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.