Forums

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

How to make Due date field auto-populate a value based on another custom field ?

Om
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!
August 2, 2019

I have a due date field (calendar picker). I want it to auto-populate a value based on the value in another custom field 'severity'. 

Example :

1) If the 'severity' is 'Major' - auto-populate due date with created date + 2 weeks

2) If the severity is 'Minor' -  auto-populate due date with created date + 6 weeks

I am fairly new to this. Can anyone please share if you have implemented anything similar ? 

P.S - A big shoutout to the amazing community here. You guys are super helpful :) 

Thanks! 

 

1 answer

1 vote
Alexey Matveev
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.
August 2, 2019

Hello,

You would need an app for it like Power Scripts, ScriptRunner, Automation for Jira, JWME, MyGroovy and so on.

If you want to use the Power Scripts app, then you could create a SIL listener for the create and update events with a code like this:

if (#{Severity} == "Major" {

  duedate = currentDate() + "2w";

}

if (#{Severity} == "MInor" {

  duedate = currentDate() + "6w";

}
Megan D August 6, 2024

@Alexey Matveev Hi Alexey, would you be able to share the code if I were to use ScriptRunner? Thank you!

Suggest an answer

Log in or Sign up to answer