Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Smart fields queries returning empty spaces in e-mail automations - help?

Ioana Nicolau July 24, 2020

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!

1 answer

1 accepted

1 vote
Answer accepted
John Funk
Community Champion
July 24, 2020

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. 

Ioana Nicolau August 3, 2020

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.Screenshot 2020-08-03 at 09.33.18.pngScreenshot 2020-08-03 at 09.33.07.png

John Funk
Community Champion
August 3, 2020

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}}

Like Bill Sheboy likes this
Ioana Nicolau August 3, 2020

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!

Screenshot 2020-08-03 at 16.23.54.png

John Funk
Community Champion
August 3, 2020

Actually, drop the .displayName off of those and see if it helps.

Ioana Nicolau August 3, 2020

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...

Screenshot 2020-08-03 at 17.31.13.png

John Funk
Community Champion
August 3, 2020

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?  :-)

Ioana Nicolau August 4, 2020

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 :)

John Funk
Community Champion
August 4, 2020

Great! Glad it worked for you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events