Jira smart values custom field properties not showing
Asked by ryan macdougall:

I am trying to pull the basic properties of a custom field via automation but I am not getting the content I am expecting. I assume I am missing something simple but I have tried numerous iterations from various sources with no change in behavior.

I am able to pull the value of the custom field without issue but the properties do not seem to be producing any content.

I have been using this as a resource to see what my options are:  
<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/>

Available properties  
{{issue.\[Custom Field\].id}} - Returns the unique id for the field assigned by Jira. It is better to use this than name as it cannot be changed.  
{{issue.\[Custom Field\].description}} - Returns the text displayed below the custom field viewed in the Simple Search column.  
{{issue.\[Custom Field\].name}} - Returns the visible label displayed on the left of the field.  

Here is my custom field information:

![customfield.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/198444i53C3C47CA810E800/image-size/large?v=v2&px=999 "customfield.jpg")

This is my automation content:

Name: {{issue.User ID.name}}  
Desc: {{issue.User ID.description}}  
ID: {{issue.User ID.id}}  
Value: {{issue.User ID}}  
Name: {{issue.fields.customfield_10066.name}}  
Desc: {{issue.fields.customfield_10066.description}}  
ID: {{issue.fields.customfield_10066.id}}  
Value: {{issue.fields.customfield_10066}}

This is my issue details:

![automation-content-issue.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/198445iB87F7469945AFE52/image-size/large?v=v2&px=999 "automation-content-issue.jpg")

This is the information I get in the email:

![automation-content-email.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/198446i5BD6C6B70AA5552A/image-size/large?v=v2&px=999 "automation-content-email.jpg")

Any assistance would be appreciated.

Thank you.


Answers:
author: Bill Sheboy
body: Hi [@ryan macdougall](/t5/user/viewprofilepage/user-id/1383491)

Yes, and...to what Fabian suggests:

The field type determines the available smart values. For example, for user fields you can access accountId, displayName, emailAddress, etc.

To help identify the available attributes for a field, please take a look at this how-to article. Essentially you find an example issue and call the REST API with a browser to list all possible smart values and their structure. Please note this may not find fields from addons which could be dynamically calculated from the addon.

<https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/>

Kind regards,  
Bill

comments: author: ryan macdougall
body: Thank you for the reply. I referred to the resource you provided and was able to see the intended "name" of the custom field in the output. I am just not able to pull that property via the automation. I should have clarified, the field I am trying to get the properties for is just a custom text field, it has nothing to do with a user field that is related to authentication in any way. I have a number of these text custom fields that I would like to get a key:value pair from them in the automation output. I am able to pull the value successfully via a number of different syntaxes in various other posted questions about smart values.


author: Bill Sheboy
body: Ryan, would you please post images of your complete automation rule and of the audit log details showing an execution that does not work as you expect? That may provide context for why the data is not returning. Thanks!


author: ryan macdougall
body: Sure, thanks for any insight. I thought it was pretty straight forward in the documentation, which is why I just dont understand why I am not getting all the data I expect. This is a test rule I created just to play with the data I can pull.

![automation-rule.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/199132iC7938D78128B5A0E/image-size/large?v=v2&px=999 "automation-rule.jpg")


author: Fabian Lim
body: Bro, take the "fields" part off your smart values. So in your case it would be {{issue.customfield_1066.id}}

![Screenshot_20220525-182620.png](https://community.atlassian.com/t5/image/serverpage/image-id/199134iC93AEAB7F15EFD05/image-size/large?v=v2&px=999 "Screenshot_20220525-182620.png")


author: ryan macdougall
body: Here is the updated content per your suggestion.

Keep in mind, I have no issues pulling the values from the fields in any of the syntax examples I have tried, I am unable to pull the field properties. I was assuming based on the published documentation I provided in my original post that these properties were available in the manner they are being requested.

![automation-rule-edit.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/199341iD0546262A1269D33/image-size/large?v=v2&px=999 "automation-rule-edit.jpg")

![automation-email.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/199342i0970C4EE88E9CEC8/image-size/large?v=v2&px=999 "automation-email.jpg")


author: Fabian Lim
body: Hi [@ryan macdougall](/t5/user/viewprofilepage/user-id/1383491)

You should use {{issue.customfield_xxx}}

Remove the 'fields' section.

Regards

comments: author: ryan macdougall
body: Thank you for the reply, but I tried your suggestion and it resulted in the same data output as the examples I provided. I can pull the value in each iteration of the syntax, I just can't seem to pull the properties of the custom field.


author: Hayden Davey
body: Did this ever get sorted out? I am experiencing the same issue.


author: Bill Sheboy
body: Hi [@Hayden Davey](/t5/user/viewprofilepage/user-id/4623951)

Often when a rule does not return information for the smart values, it is caused by a few possible things:

1. When using the Issue Created trigger, the data is not fully loaded when the rule triggers. The work-around for this is to add a Re-fetch action immediately after the trigger to slow down the rule, and reload the data.
2. The incorrect smart values are used. Smart values are name, spacing, and case-sensitive. Please try using this how-to article to find the correct smart values for a field: <https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/>
3. The field is not supported by the REST API, and so is not supported by rules. This can apply to several fields, particularly ones dynamically calculated or from marketplace addon apps. Try using the how-to in item #2 above, because if you do not see a smart value in the results, it is probably not supported by automation.

If none of those help, please create a new question, and link back to this thread. Creating a new question helps, as otherwise only the people following an older thread will see your comments/questions.

Kind regards,  
Bill