Add a number of Month from one Field to a Date from another Field and fill in a third Field

Christopher Gruhm
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 19, 2024

Hello,

I´m Trying to take the Date from the Field {{object.Letzte Vertragsverlaengerung}} (ex. 19.01.2024) and add the Number of Month from the Field {{object.Laufzeit}} (ex. 24) and push the Result (ex 19.01.2026) in the third Field {{object.Naechste Vertragsverlaengerung ab}}

image.png

Error is 

image.png

 

Can someone give me an advise how to calculate with a Value of a Field and not a Fix Value like mentioned in all "How To"?

(ex. https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/ )

 

Thanks in Advance!

 

1 answer

1 accepted

0 votes
Answer accepted
Christopher Gruhm
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 25, 2024

Solution is:

{{object.Datum des Abschlusses.plusMonths(object.Laufzeit.asNumber).jqlDate}}

 

As the Atlassian support mentions:

The jqlDate is important as Date attribute will only accept date in yyyy-MM-dd format while without it automation was trying to insert yyyy-MM-ddThh:mm:ss (Time and date) and failing to do so.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events