Using Smart Values when creating automation Rule

Lydia Roth June 9, 2022

I am trying to figure out the exact code needed to pull the date fields when setting up the rule and creating an issue. I am not sure if the abbreviations in the fields require doing something specific with the string of code to pull that fields' values.

 

The wording of the date fields is as follows

"Est. Date Final Data to MS" and "Est. Date Final Results Needed"

 

Code created so far: 

<h5><p><strong>Summary:</strong> {{issue.summary}}</p>

<p><strong>Client:</strong> {{issue.client}}</p>

<p><strong>project lead:</strong> {{issue.project lead.displayName}}</p>

<p><strong>Data Ready:</strong> {{issue.est. date final data to ms.format("dd/MM/yyyy")}}</p>

<p><strong>Data Needed:</strong> {{issue.est. date final results needed.format("dd/MM/yyyy")}}</p>

<p><strong>Analytics Needed:</strong> {{issue.analytics needed}}</p>

</h5>

 

Anyone have any suggestions? thanks!

2 answers

2 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2022

Hi Lydia - Welcome to the Atlassian Community!

You should not have a period in the actual name of the field. That is probably what is giving you the problem. I would change from Est. to just Est in the field name. 

The other thing you and do is replace the field name with the custom field ID. That will look something like:

{{issue.customfield_16748}}  where 17478 is the ID of your custom field. 

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2022

Heavy +1 on using custom field IDs.

(Fields can be renamed and it will break the automation rule. IDs will never change.)

Like John Funk likes this
1 vote
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 2022

Hi @Lydia Roth,

Welcome to Atlassian Community!

Since you are using a dot as part of the field name I would recommend that you use the custom field identifier instead, like {{issue.customfield_12345.format("dd/MM/yyyy")}}. You can get the custom field ID if you to go Settings > Issues > Custom fields. From here locate the field, click the three-dot menu and then hover over one of the menu option and you should see the link in the bottom left-hand corner and the last part of it includes the ID.

Screen Shot 2022-06-09 at 11.18.11 AM.png

Suggest an answer

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

Atlassian Community Events