How to automate a date calculate between two custom field values

Brian Taylor
Contributor
February 13, 2025

I have a use case for which automation would work, but I need to see if it is possible to calculate a date field between two fields. 

I have a date field called Renewal Date, and a secondary field is a dropdown field that shows the time for the next renewal (i.e., 6 months, 1 year).

I want to clone the issue to a new issue but update the Renewal Date to take the existing renewal date and add 6 months or 1 year based on the dropdown value. 

2 answers

0 votes
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 13, 2025

Hi @Brian Taylor 

Adding to the suggestion from @Manon Soubies-Camy ...

I recommend using a Lookup Table for this scenario.  There is even an example in the documentation which nearly matches what you need for a date increment based upon a selection value.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-lookup-table

This would eliminate the need for an if / else condition block to compare values, replacing them with a single get() call.

Kind regards,
Bill

0 votes
Manon Soubies-Camy
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 13, 2025

Hi @Brian Taylor,

Here's a similar use case where:

  • I'm updating Due date instead of Renewal date.
  • I'm relying on the Description instead of a dropdown field, but the same logic would apply.

automation-date.png

Below are the smart values I used:

  • To add 6 months: {{triggerIssue.duedate.plusMonths(6)}}
  • To add 1 year: {{triggerIssue.duedate.plusYears(1)}}

Hope this helps!

- Manon

Suggest an answer

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

Atlassian Community Events