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

Jira smart values custom field properties not showing

ryan macdougall May 20, 2022

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

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.
May 21, 2022

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

ryan macdougall May 23, 2022

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. 

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.
May 23, 2022

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!

ryan macdougall May 25, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

ryan macdougall May 26, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2022

Hi @ryan macdougall

You should use {{issue.customfield_xxx}}

Remove the 'fields' section.

Regards

ryan macdougall May 23, 2022

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.

Hayden Davey March 23, 2023

Did this ever get sorted out? I am experiencing the same issue.

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

Hi @Hayden Davey 

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events