Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Use email address from description and set it as request participant

Hi all,

how can I use/copy an email address which is mentioned in the description and set it as a request participant via automation?

The e-mail address is written like below.

E-Mail Adresse =...

Thank you for your time and attention,
I do appreciate your feedback.

Kind Regards Mehran

2 answers

1 vote
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 14, 2023

@Bruno Altenhofen wrote a whole article on how to do exactly what you're trying.

Sorry about the earlier journey to get to the exact same place.

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 14, 2023

Hi @Mehran Ahmadi -

So I think this should work, using the match operator for smart values:

{{issue.description.match(".*E-Mail Adresse =(.+).*")}}

Ah, one catch is that I entered an email address via the GUI, which converted it into a link. So my code above extracts the address as Jira markup for the "link":

[test@notarealemaildomain.com|mailto:test@notarealemaildomain.com]

So I revised the smart value to only parse the text version of the description:

{{issue.description.text.match(".*E-Mail Adresse =(.+).*")}}

And this only returned the email address:

test@notarealemaildomain.com

FYI, for testing this, I used a Manual trigger and used the automation audit log. This is a really powerful way to debug automation rules. There's good details on this here:

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 14, 2023

Oh, because I have a tried lot of add-ons that generated service accounts, I did want to show how you might need to scroll through list of accounts before you can see the Smart Value at the bottom of the list when trying to use it for Request participants

Screen Shot 2023-03-14 at 2.07.27 PM.png

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 14, 2023

Ugh. Further complications.

I think Request Participants cannot be added by email!

When trying to add an active user by email address, I'm seeing this in my logs: 

Inactive user

                fb-test@darryl.com

So uh, that's not great. Oooof, of course the estimable  @Bill Sheboy has already run into this issue. 

So... the big question here is, is the email address in the Description an existing Customer or User, or a new Customer?

If it is a new Customer, then you could possibly follow instructions on that question to create a new Customer, do a couple of Re-fetches, and then grab the Customer accountId to add it as a Request Participant.

Unfortunately probably due to GDPR, I don't think there is a way to lookup the accountId of an existing user or customer by email. Does that sound right to you, Bill?

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 14, 2023

Ugh, I spoke too soon. There is a way with the Find Users API:

https://YOURSITE/rest/api/3/user/search?query=fb-test@darryl.com

So then, this rule got a lot more complicated, because you'll need to use a Web request action to the Jira API to try looking up the email address to see if it has a corresponding accountId, and if so, adding to the issue that using Advanced editing with JSON.

Wait wait! @Bruno Altenhofen wrote a whole article on how to do exactly what you're trying.

Wow, I could've saved myself a lot of time just linking to that!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events