Hello!
I am experiencing an issue with querying smart fields in e-mail Automations on JIRA Software Cloud.
I tried different syntaxes, including the ones suggested on this page for very basic fields such as "status", however, the return I get is an empty space in the e-mail instead of the field value. This is also valid for custom fields.
I was desperately trying different syntaxes and testing but for some reason it doesn't work. Has anybody come across the same issue for JSC? Am I missing a first step before calling out the fields?
Would appreciate some help! Thanks!
Hi Ioana - Welcome to the Atlassian Community!
Can you share the Automation rule that you have so far showing the detail for the body of the email with the smart values?
But just quickly, try adding issue. in front - so issue.status
And for names try adding .displayName at the end of the field.
Hello John! Sorry for my late response, appreciate your help!
I tried you suggestion and unfortunately it didn't work, attached a screenshot of the input and result. I also tried using the field ID, that didn't make a difference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to put the word issue in front of each item.
{{issue.Styles.displayName}}
{{issue.RetailValue.displayName}} - one note on this one, is RetailValue really the field name? Or is it Retail Value. Be sure it is exactly like the field name even if there is a space in it.
For the Status, try {{issue.status.name}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hei John! This worked for the status, however not for the custom fields... Any further suggestions on how to make this work? See attached, thank you for your support!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hei John, now it's showing me only the first custom field value, not the next numerical field and the date field which I selected...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For the date field, try something like this:
{{issue.customField_17038.convertToTimeZone("America/Chicago").longDateTime}}
This is a good time to note that you can use the custom field ID or the name.
For the number field, if you want to get rid of the decimal place, then use this:
{{#=}}ROUND({{issue.customField_17050}}, 0){{/}}
And next post can you share your new rule with the changes as well as the result? :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hei John, I got both numerical fields working as well! It's just the date that didn't work when I used that expression, however, it worked when i used {{issue.customField_#}}.
So it looks like for custom fields {{issue.customField_#}} is the solution that works! Will start setting up notifications and check how it's going for other fields.
Thank you so much for your support :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.