How to calculate dates in jira automation based on field in the parent issue

Seán Curran February 9, 2021

In automation rules I am trying to calculate the due date for tasks based on the "Go live date" set on the parent task. 

To do this I have created a variable called GoLiveDate after the creation of the task with the "Go live date" custom field. 

The variable has the smart value set to {{issue.Go Live Date}}

Then I have created a branch to create a number of sub tasks.

When I create the subtask I am using a smart value to calculate the due date. 

For example if a task must be complete 3 days before go live then I would use the smart value {{GoLiveDate.minusDays(3)}}

However the due date is not being populated when I test this. 

I know the variable is working as I am printing it into the summary of the subtask and it is correct so I dont know why it wont calculate the minus days and populate the due date. 

 

Any help appreciated 

1 answer

1 accepted

1 vote
Answer accepted
Ravi Sagar _Sparxsys_
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.
February 9, 2021

Hi @Seán Curran 

It seems like it because of the type of the field.

Try this.

{{GoLiveDate.toDate.minusDays(3)}}

Let me know if this works.

Ravi 

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.
February 9, 2021

Hi @Seán Curran 

In addition to what @Ravi Sagar _Sparxsys_ suggests, please consider posting an image of your entire rule and a copy of the audit log from a rule run.  That may provide some context to indicate what is happening.

Best regards,

Bill

Taranjeet Singh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2021

@Seán Curran I agree with @Bill Sheboy

Please provide the screenshot of your automation rule configuration and the audit logs for the rule, so that you can get specific help.

Seán Curran February 9, 2021

@Ravi Sagar _Sparxsys_ Thanks!! That worked. 

Like Ravi Sagar _Sparxsys_ likes this
Ravi Sagar _Sparxsys_
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.
February 9, 2021

Nice

Suggest an answer

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

Atlassian Community Events