Forums

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

Jira Cloud Assets value automation calc value from date

Urmo
Contributor
November 27, 2025

Hi

I'm creating automation where date value come from Assets and date format is in variable 

End date: {{object."End date"}}

Now i have in Assets another field ( {{object."Renewal date notice period (calendar days)"}}) where is stored days in number format what is needed to calc off from "End date"

So i log both into audit log.

Renewal date: {{object."Renewal date notice period (calendar days)"}}

End date convert value {{object."End date".format("dd/MM/yyyy")}} and i just did to test that maybe date format is wrong.

So when i write in .minusDays(30) this calc works and it shows from orginal date 30 days off but how to write it with value what come from assets and today it is 30 but tomorrow it is 180?

End Date minus Renewal Date: {{EndDateminusRenewalDate}}

{{object."End date".minusDays(30).format("dd/MM/yyyy")}}

automation.png

In log side it seems to be nice:

end date calc.png

Idea is that orginal date is 23.01.2026 then in renewal date notice period (calendar days) say how many days have to take off and then automation will send e-mail.

3 answers

1 accepted

1 vote
Answer accepted
Marc -Devoteam-
Community Champion
November 28, 2025

Hi @Urmo 

I think I have tested something like this before.

As you created a variable called "RenewalDate" (I believe this stores the number of days)

Use the smart value:

{{object."End date".minusDays(RenewalDate).format("dd/MM/yyyy")}}

 

Urmo
Contributor
November 28, 2025

In Assets this is just number and Type Value = Text.

asset value.png

So from Assets it is taken out into automation to Log action:

Renewal date: {{object."Renewal date notice period (calendar days)"}}

and this value is added into Create variable with name RenewalDate

Renewal date: {{object."Renewal date notice period (calendar days)"}}

but when calc happens it does not work anymore.

Variable name EndDateminusRenewalDate

{{object."End date".minusDays(RenewalDate).format("dd/MM/yyyy")}}

Still log is empty.

still empty.png

But when i add {{}}

{{object."End date".minusDays({{RenewalDate}}).format("dd/MM/yyyy")}}

I'll get error:

Create variable 28/11/2025, 14:13:24
Unable to render smart values when executing this rule:
Failed to get value for object."End date".minusDays({{RenewalDate: {{object."End date".minusDays({{RenewalDate}}).format("dd/MM/yyyy")}}

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 28, 2025

Hi @Urmo 

Created Variables are text values, even when they look like a date / time value.

To use a variable as a date / time, such as with the minusDays() function, the variable must be converted with the toDate() function immediately before the minusDays() function:

https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-dates/#Converting-text-to-dates

 

Kind regards,
Bill

0 votes
Urmo
Contributor
November 28, 2025

Issue was in Create variable because i don't know why i did but field name into smart value and after adding log i notice that i have more data in field as should.

Working way is:

{{object."End date".minusDays(RenewalDays.asNumber).format("dd/MM/yyyy")}}

Suggest an answer

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

Atlassian Community Events