Forums

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

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

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.
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 Champion
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
atlassian, jira service management, jsm webinar, ai in jsm, opsgenie integration, incident management, virtual agent, atlassian intelligence, ai-powered service desk, it operations, atlassian learning, service management webinar, team '25 recap

What’s new in Jira Service Management 🤔

Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.

Register here ⬇️
AUG Leaders

Atlassian Community Events