Forums

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

{{deletedFieldChange.values}} for User Picker that has been removed from Custom field

Marcia Booth March 5, 2025

I would like to create an automation when a custom field (user picker, single) is changed. If a user is added or removed from the field, I would like to notify the user via email.

For that, I created two separate rules. The one that is triggered when a user is added to the custom field (Tester) is working fine and the email is sent to Tester.

However, the rule to send email when the user has been removed from Tester is not...

The trigger is the same (Field value changed and field to monitor is Tester) but the change type is "Value deleted". I then want to send an email to the user who has just been removed from Tester, so I tried the following smart values among others:  

{{deletedFieldChange.values}} and  {{deletedFieldChange.fieldId.emailAddress}}

They all generate Automation rule error

"Unable to send the email as the recipient's email address wasn't provided"

How do I get the email address of the user that has been removed from the custom field (Tester)?

1 answer

0 votes
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.
March 5, 2025

Hi @Marcia Booth 

When your field is a single-select, user picker it can only have one value.  It does not add or remove values: it changes the selected one.  Are you certain this is a single-select field?

 

Assuming you actually have multiple-select user picker field, for the field change smart values with a user field, they only provide the value (e.g., the user display name) or the account ID.  The email address is not available.

To get the email address there are two possible solutions:

  • using the Send Web Request action, call the REST API to get the user's information with their account ID
  • set a different customer user field in the issue to the account ID, re-fetch the issue, and then get the email address from that other field

 

Kind regards,
Bill

Marcia Booth March 7, 2025

Yes, it is a single-select field - only takes one value at a time and may be empty as well.

image.png

Could I somehow use {{deletedFieldChange.values}} or {{deletedFieldChange.valueIds}}, which will have the Tester (user) name or account id(?), to find the user email ({{tester.emailAddress}})?

Suggest an answer

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

Atlassian Community Events