Check if an email in a free text field has a Jira account

Orly Dahan
Contributor
August 14, 2023

Hi,

I have a free text field that is filled in with an email address.

I would like to check with Jira automation if the email is also a user in Jira, and if iit is, to change the reporter field according to this user.
I managed to update the reporter, but I could not find a way to verify that the email has a Jira account.
If the email does not have a Jira account. an error message pops up in the automation.

Please advise

2 answers

0 votes
Orly Dahan
Contributor
August 14, 2023

Hi @Trudy Claspill 

As you mentioned, I am searching for an option to check if the email address matches a Jira use.

Thank you!

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

Hello @Orly Dahan 

First addressing

If the email does not have a Jira account. an error message pops up in the automation.

You can't have a pop-up error message for an Automation rule. Automation rules by their nature are not interactive (excluding manually triggered rules which also allow for prompting for input). You could use a Log action to log a message to the Audit Log for the rule execution, but you can't pop-up a message for a user to see in real time.

I don't have an answer for how you can check if the email matches a Jira user. I don't think there is any automation action that you can use for that, unless you want to use the Send Web Request to access the Jira REST API to try to get the information.

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

A quick check of Actions and Conditions available in Automation indicates there is no Automation function to check if an email matches a Jira user.

Have you investigated the Jira REST API?

Orly Dahan
Contributor
August 16, 2023

Yes, I managed to do it with REST API

Thanks!

Like Trudy Claspill likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2023

Can you share your solution details, to help other members of the community that might come across your post?

Orly Dahan
Contributor
August 20, 2023

Hi,

Of course.

First of all, this is actually not needed because in case a user exists in Jira, the collector updates automatically the reporter according to the updated email.

Please note that if you do need to check if an email has a jira permissions, I managed to do so through 2 web requests are needed:

  1. To find if the user is active
  2. To take the account Id from the previous web request and to use Advanced branching and ran on every group and if it contains 'jira-users' Pic1.pngPic2.pngPic3.pngPic4.png
Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events