Hello all,
I need you help to display the name of a custom field in a comment or notification.
How can I identify the field name correctly ?
Thanks for your help !
Marine
Hi @mgouirand ,
Use smart value "{{issue.Custom fieldname}}". Let me know if this works.
In the example below, we have a custom field called Team Leader, and the value of the field is currently Alana Grant.
<strong>{{issue.Team Leader}} </strong>returns Alana Grant
Hello Rilwan,
No it doesn't work ... I have no value at all.
Hi @mgouirand
"I have no value at all." - Do you mean the field you want is not having any values in it ?
Please share the screenshot of your automation rule and a sample ticket with the field for further assistance.
No it means that with "{{issue.Custom fieldname}}", now I have :
Field : , from "test@yahoo.com" to ""
instead of Field : customfield_10398, from "test@yahoo.com" to ""
Hi @mgouirand - it would be helpful if you can provide a screenshot of your actual Automation Rule or the comment/notification part of it, so we can see what your "code" looks like. Thanks!
Hello @Darryl Lee Please find the screenshot of the automation and the existing rule.
Thanks for your help.
Kind regards,
Thank you! I would try:
{{fieldChange.fieldName}}
{{fieldChange.field}}
{{fieldChange.name}}
(Weirdly on my test instance, I cannot even get {{fieldChange.toString or fromString}} to show me anything.)
OK, tested, and it looks like we have a winner:{{fieldChange.field}}
I hope this works for you! Also, it's important to note this limitation:
When there are multiple fields that have changed, {{fieldChange}} only contains the first changed value. If multiple values are changed, use # to iterate over these. For example, when setting multiple Fix Versions, then you can iterate over these using {{#changelog.fixVersion}}{{toString}}. Learn more about using smart values with sections and lists.
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
Alas, #changelog does NOT let you iterate through every field change if you don't know the field name, so this failed. Repeat, this does not work, but it OUGHT TO (IMHO) if Atlassian fixed it:
{{#changelog}}{{#field}}Field: {{field}}, "{{fromString}}" to "{{toString}}"{{/}}{{/}}
(Yes, this also would mean Atlassian would have to support nested list expansion, which they do not.)
It's SUPER-annoying.
It looks like you're new here. Sign in or register to get started.