Is it possible to use nested Smart Values?

Sean Dooley July 3, 2020

I can't seem to find a way to use a variable inside a smart value. For example:

{{ now.withMinute( {{originalMinutes}} ) }}

 

...where {{originalMinutes}} is declared earlier in the automation as a math function:

{{#=}} {{issue.customfield_10030.toStartOfDay.diff(issue.customfield_10030).minutes}} - ({{originalHours}} * 60) {{/}}

 

I'm trying to update a datetime value to a new date, while retaining the time. So far I have all the pieces, but when I go to put them together, they require nesting of some sort, which appears unsupported.

 

One way around this would be if I could pull the hour, minute, and second attributes directly from the original datetime, but that also appears unsupported (or at least poorly documented).

3 answers

1 accepted

0 votes
Answer accepted
Ignas Selvestravičius June 8, 2023

Atlassian shared with me the solution.

So it is possible to do nesting with variables. Here is how:

  1. Create a variable varTemp to hold the value "originalMinutes"
  2. Then use the variable like this:

    {{now.withMinute(varTemp)}}

    Note that you don't need the braces inside the brackets.

 

Below is my automation which might give you a better understanding. My case: add business days to get Due date to create issues every month with new Due dates.

image.pngimage.png

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2020

Don't you wish we could upvote Automation feature requests:

Possibility to nest smart values in Automation: 

https://codebarrel.atlassian.net/browse/AUT-2086

0 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.
July 6, 2020

Hey Sean - Welcome to the Atlassian Community!

Take a look at this previous post:

https://community.atlassian.com/t5/Jira-Core-questions/Is-there-a-way-to-concatenate-or-nest-smart-values/qaq-p/1374187

Suggest an answer

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

Atlassian Community Events