Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,294,020
Community Members
 
Community Events
165
Community Groups

Jira smart values custom field properties not showing

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

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

 

This is the information I get in the email:

automation-content-email.jpg

 

Any assistance would be appreciated.

Thank you.

 

2 answers

Hi @ryan macdougall 

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

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. 

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!

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

Fabian Lim Community Leader May 25, 2022

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

Screenshot_20220525-182620.png

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

 

automation-email.jpg

0 votes
Fabian Lim Community Leader May 20, 2022

Hi @ryan macdougall

You should use {{issue.customfield_xxx}}

Remove the 'fields' section.

Regards

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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Atlassian Automation

Jira Automation: Sum Up Story Points Roundup (Initiatives -> Epics -> Story/Tasks -> Subtasks)

Hi Everyone, In this roundup we combine all the jira automation rules to sum up story points across different issue types. We start from the lowest level, summing up story points from sub-tasks t...

1,768 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you