Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if user is administrator using smart values?

Eiríkur Baldur Þorsteinsson February 21, 2024

Hi,

I want to create an automation rule which goes through all request participants and checks if they are administrators.

Skjámynd 2024-02-21 141259.png

The smart value {{RequestParticipant.emailAddress}} successfully delivers a participants email address, but how can I check if the participant's role is administrator?

Kind regards, Eirikur

1 answer

1 vote
Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2024

Hello @Eiríkur Baldur Þorsteinsson 

RequestParticipant list, is that a user picker field?

In the If condition section, instead of comparing 2 values option, there is a user condition section which lets you check reporters/assignee/user are in admin role. Have you checked that option?

image.png

Eiríkur Baldur Þorsteinsson February 21, 2024

Hi Kalyan,

RequestParticipant is a list of users in the issue field Request participants, which is a user picker field.

I cannot use the User condition because its User input does not take smart values.

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2024

To confirm, you dont see "Request Participants" as an option in the drop down? (highlighted below)

image.png

Eiríkur Baldur Þorsteinsson February 21, 2024

That is correct. I don't see "Request Participants" as an option in the drop down.

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2024

Hmm. I cant think of a simple way and hoping others can pitch in and help.

But If what you want to know if is the user is of Admin role in a project, below thread tells you how to do that through REST calls. So if comfortable with making "send web request" action inside your branch, def review below thread in the mean time.

https://community.atlassian.com/t5/Jira-Software-questions/How-to-get-users-assigned-to-Jira-Project-and-their/qaq-p/2219936#M238087

 

Eiríkur Baldur Þorsteinsson February 22, 2024

Thank you, Kalyan.

I have been able to make it work with send web request, but it seems like a lot of effort. I was hoping there was a simpler way, which did not require a user's email address and password or token, because it means that the automation stops working if the user gets disabled.

Kalyan Sattaluri
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2024

Great,  and agreed with the effort needed and especially the tight coupling to rule author's credentials.

Maybe its because of GDPR regulations that Jira does not have a easy way maybe?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events