I am attempting to send an email upon resolution to an address listed in a custom field on the issue.
I have tried using the field name as well as the field ID and both seem to be failing in the mail log.
{{issue.sender email address}} AND {{issue.customfield_xxxxx}} AND {{issue.customField_xxxxx}}
If I enter a regular email address on the automation rule, it sends fine. But the smart value isn't working.
We were finally able to confirm that the data was pulling correctly, but the email was being blocked on our email server. Should have been the first place I looked, but was convinced I was doing something wrong. Thank you kindly for your help!
Take a look at the issue using the REST API ("yourjiraurl.com/rest/api/latest/issue/[issuekey]") and see if it is storing the email address as a basic string or if there's something else going on?
For example, if your custom field is a 'user' type field, the field is actually an object with a bunch of values. As example, the assignee field:
assignee": {
"self": "...",
"name": "gus",
"key": "gus",
"emailAddress": "gus@somedomain.com",
"avatarUrls": {
"48x48": "...",
"24x24": "...",
"16x16": "...",
"32x32": "..."
},
"displayName": "Gus IsMyName",
"active": false,
"timeZone": "America/Havana"
To get at Gus' email, I think you would need to use the smart value:
{{issue.customfield.emailaddress}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that! I have confirmed that it's storing it as a string as intended. Is it possible that it has something to do with the address not being associated to a user?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wouldn't think the type of field would matter much except how you access the info...What type of custom field are you storing the email address in? Have you tried {{issue.customfield.value}}?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your help and feedback! We figured it out - it wasn't JIRA or me... it was the email server config.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Phew!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jessica Golden ,
I am unsure of exact requirement, but if you are looking to send a custom email to an email address (for a workflow transition) specified in a text field, you may try using
issue.getAsString("customfield_ID")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do I replace the "Customfield_ID" with the id number?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yeah it should be customfield_12345.
issue.getAsString("customfield_12345")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.