Forums

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

How can I access a Jira user's email address from a custom field in Jira automation?

Matthias Miehl
Contributor
August 7, 2023

Since Jira Cloud automation for team-managed projects currently does not support the “People” custom field, you may want to vote for / watch the following issue in the public backlog to see progress on that suggestion: Add Automation support for the emailAddress value of a People field in team-managed projects.


I have created a custom field called "Accountable", internally known as "customfield_10568", which allows me to assign a user to an issue. I am trying to use Jira automation to send an email to the user selected in this custom field. To test the automation rule, I am using my own user account.

I have verified that I have the "browse users and groups" permission in Jira, and I can view and select users from the user picker. However, when I try to access the email address of the user using the smart value {{issue.customfield_10568.emailAddress}} it is empty.

When I use "Log action" to print the content of {{issue.customfield_10568}} the email address is missing:

{
self=https://<my company's jira instance>/rest/api/2/user?accountId=6..4,
accountId=6..4,
avatarUrls={
48x48=https://../48,
24x24=https://../24,
16x16=https://../16,
32x32=https://../32
},
displayName=Matthias Miehl,
active=true,
timeZone=Europe/Berlin,
accountType=atlassian
}

To confirm that the user's email address is available in Jira, I accessed the Jira REST API via <my company's jira instance>/rest/api/2/issue/AB-1234?expand=names, and I can see the user's email address as part of the "customfield_10568":

2023-08-07 Jira issue - customfield_10568.png

I have tried using the smart value {{#issue.customfield_10568}}{{emailAddress}}{{/}} as well, but the issue persists, and the email address remains inaccessible in the automation rule.

Is there a specific way to access a user's email address from a custom field in Jira automation? Are there any additional configurations or steps required to enable this functionality? Any insights or guidance on this matter would be greatly appreciated.

2 answers

1 accepted

1 vote
Answer accepted
Marc - Devoteam
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.
August 7, 2023

Hi @Matthias Miehl 

Welcome to the community.

Is the custom field you created for the user of the type "User Picker"?

If you did use this type you can access the field with the following smart value:

{{<custom field name..emailAddress}}

 

e.g.

If the field is of type user picker and named: Executor,

the smart value to use in the automation would be {{Executor.emailAddress}}

Matthias Miehl
Contributor
August 7, 2023

Hello @Marc - Devoteam

thank you for your reply!

I am not sure what type of custom field it is. I created the custom field using this option:

2023-08-07 Jira issue - customfield_10568 - type.png

I tried {{customfield_10568.emailAddress}} but it returns an empty string.

The custom field is called "Accountable". Using {{Accountable.emailAddress}} also returns an empty string.

Like Marc - Devoteam likes this
Marc - Devoteam
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.
August 7, 2023

Hi @Matthias Miehl 

I see that you are in a Team Managed project.

Unfortunate people field can't be used in automations in Team Managed projects.

From Atlassian:

When configuring automation rules for team-managed projects, you’ll need to be mindful of the following limitations:

  • Custom fields: All People custom fields in team-managed projects currently aren’t supported by Jira Cloud automation. This means that your automation rules won’t be able to access values or set values in any People fields. This improvement request is being tracked at AUT-1651.
Like # people like this
Matthias Miehl
Contributor
August 7, 2023

Ah, that is good to know. Thanks a lot!

Like Marc - Devoteam likes this
Matthias Miehl
Contributor
August 7, 2023

@Marc - Devoteam 

What is the best way to be notified, once the improvement request is resolved?

It seems like I have to request access to AUT-1651 and I am unsure whether this is the right thing to do.

Marc - Devoteam
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.
August 7, 2023

Hi @Matthias Miehl 

These are internal issues at Atlassian. I can't track the progress either.

The best I can give you is to follow/watch the product Team Managed projects on the community.

https://community.atlassian.com/t5/Team-managed-projects/ct-p/agility

Like Matthias Miehl likes this
Bill Sheboy
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.
August 7, 2023

Hi @Matthias Miehl 

You may vote for / watch this issue in the public backlog to see progress on that suggestion: https://jira.atlassian.com/browse/AUTO-519

Kind regards,
Bill

Like Matthias Miehl likes this
0 votes
Ryan Gutierrez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 24, 2024

Hi @Matthias Miehl!

I know this is an old thread and my answer may not be relevant at this point, but I believe I actually found a work around to this problem.

I was struggling with the same issue after creating a custom User Picker field from within a team managed project, but I found a solution that worked for me. When I created a custom User Picker field via Issue types settings—Settings (cog in the top right, not project settings) > Issues > Custom fields > Create custom field—for Jira as a whole, and not just the specific project I was adding the field to, it automatically appeared as an option under the "To" field in the automation email event.

  1. Create the field as a Custom field for your entire Jira instance.Screenshot 2024-12-24 131217.png
  2. Add that custom field to your issue type (make sure to select the one you just created).
  3. Go back to the automation rule and find your newly added custom field as an option for email recipient.
Bill Sheboy
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.
December 24, 2024

Hi @Ryan Gutierrez -- Welcome to the Atlassian Community!

What you describe is the already mentioned workaround described in the suggestion / defect to fix this symptom for Team-managed projects: https://jira.atlassian.com/browse/AUTO-519

Kind regards,
Bill

Like Ryan Gutierrez likes this

Suggest an answer

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

Atlassian Community Events