Forums

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

Create a Calculated Expiration Date

Will Richardson December 3, 2018

Hello! I want to have a read-only calculated date field in my workflow. Is it possible to write a script for this to base the date on when a user transitions an issue? To give some context, I have a calculated field in the post-function of one of my transitions, and I want this calculated field to have an expiration date (120 days in the future) on when it will no longer be valid.

I am pretty new to scripting, so assistance on how to write this would be appreciated!

1 answer

1 accepted

0 votes
Answer accepted
Payne
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.
December 3, 2018

The groovy expression new Date() + 120 will give you what you seek. We have implemented something like this with the JMWE "Set Field Value" post function.

Will Richardson December 3, 2018

Awesome, thank you Payne! Worked perfectly.

Like Payne likes this

Suggest an answer

Log in or Sign up to answer