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

Custom Field Multi-Picker as To in email automation

Michele Bazzani
Contributor
March 9, 2023

Good morning, 

 

I have created a custom field called CSATRecipient, this field is a multi User Picker group searcher.  I have attached a screenshot of the field and the smart value below. 

I have also tried: 
{{issue.customfield_10148}}
{{customfield_10148}}

They continue to fail with the below error.  Any ideas on what's causing this?  When I looked in the REST API for this I wasn't able to see the custom field but I did see the email address of one of the users in that field and my email address which was also in that field. I have seen similar issues in the community but none that speak to this specific issue with Cloud.  I also looked at Atlassian ticket AUTO-277 and its not the same issue.

Thanks! -M
Customfieldfail.png
customfield_10148.png AutoCSATTo.png

1 answer

1 accepted

1 vote
Answer accepted
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 9, 2023

Hi @Michele Bazzani 

Would you please post an image of your entire rule?  That may provide some context for what is happening.

Until that is posted...

You are using a multi-user selection field, and so there could be multiple values.  To iterate over the users' email address values you can try this:

{{#issue.customfield_10148}}{{emailAddress}}{{^last}}; {{/}}{{/}}

This will iterate over each selected user, supply their email address, and add a semicolon after each...leaving off the last one.

Kind regards,
Bill

Michele Bazzani
Contributor
March 10, 2023

Hi Bill!

Thank you for your response. So I tried your code, and then I tried it again, removing the # and it still failed for the same reason 

Send email
Could not send an email, the 'To' address field is empty. If you have referenced a field it may be empty.

I have attached a screenshot of the rule and a screenshot of the field with values in it on the issue screen.  The rule executes on the trigger as it should it just fails in trying to populate the email address from that field. I am going to try to recreate the custom field as a single picker and see if it works, but for this particular team they often have multiple people they want to send the survey to, so I was hoping this automation would allow them to do it with a click.

Thank you for all your assistance
-M
Michele Bazzani
Contributor
March 10, 2023

UPDATE:

 

A few things, I realized I had the incorrect field number, there is apparently an old field that was created by a long-deleted app that no longer shows in the custom field list but when I pulled the ticket through the JSON viewer, it showed up and it had the same name.  So I got the correct number and again tried both versions (with and without #), still failing for the same reason, it is not able to parse that email address even though its associated with the user selected.

I also created a single picker field and that is failing for the same reason.  I know I am missing something so basic and its making me crazy.

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 10, 2023

Would you please post images of your complete rule and of the audit log details, showing the rule execution?  Those may provide context for the symptom you are observing.  Thanks!

Like • Michele Bazzani likes this
Michele Bazzani
Contributor
March 10, 2023

Hi Bill,

I appreciate all your assistance on this in the last couple of days. After much frustration, I decided to check the To: Dropdown again, and to my great surprise, the field was now there.

I am unsure if it needed time to update, though that has never seemed to be the way with Jira, or if my connection was poor and that was an issue with me seeing it there.  Whatever the reason, it is now there, and it is working!

Thank you!

-M

Like • Bill Sheboy 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.
March 10, 2023

I am glad to learn that it is working now.

From what you describe, that seems like an issue where the field was not visible to the rule, either through permissions or access to a view.  If neither changed, I am at a loss why it would suddenly appear.

Michele Bazzani
Contributor
March 10, 2023

We have a saying around here

Jira's gonna Jira. :D

Have a great weekend and thanks for all your help.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events