I am setting an automation to calculate the value of one Insight attribute depending on values of two other attributes of an Insight object. I can get the values without a problem using the name of the attribute, like {{issue.fields.customfield_10166."Budget planned"}}
The problem is that I renamed the Insight attribute and the system does not get the value by the new name (nor by the previous one), which in my opinion is a bug. The attributes which were not renamed work fine.
Now I know the attribute Id is 254, but I don´t know the syntax for it in smart values. For JSON I found objectTypeAttributeId ==264, which is nor working with smart values.
Could you help me to find an expression to get the attribute value by its ID not by its name?
Thank you in advance!
You're right, the Insight objects in smart values are very tricky to work with! With Automation for Jira, I try to extract data from an Insight attribute and put it in a custom field in Jira. Unfortunately, the proposed formula always returns no value.
The formula used is {{#issue.fields.customfield_39500.attributes}}{{if(typeId.eq(569),values.get(0).displayValue)}}{{/}}
I only changed the customfield number (39500) and the typeId.eq (569) in your proposed formula.
Do I have to set something else in the formula to make it work?
Thanks a lot in advance for your help!
Alain
Yes, Insight objects in smart values are a little tricky to work with. I've done a deep dive for another purpose and using some pretty sophisticated Smart Values expressions, this is actually possible.
Try:
{{#issue.fields.customfield_10166.attributes}}{{if(typeId.eq(264),values.get(0).displayValue)}}{{/}}
I hope these new features get documented soon.
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.