Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Update custom field with post function

Nischal Sharma March 29, 2019

I have a custom field called due date. I want to auto-fill it to 2 weeks from the date the issue is transitioned to a particular status. Is this possible? 

3 answers

3 accepted

0 votes
Answer accepted
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2019

Hello @Nischal Sharma 

You need add-ons for implementing this feature. You can use Automation, Script runner or Power scripts or JSU. Multiple options are available.

I personally use Script runner quite a lot and if you use Script runner then here is an example explaining exactly what you need to do.

https://community.atlassian.com/t5/Jira-Core-questions/Automatically-Set-Due-Date/qaq-p/240779

issue.setDueDate(new Timestamp((new Date() + 14).time))

Here 14 is the number of days i.e. 2 weeks.

Nischal Sharma April 1, 2019

Thanks.

0 votes
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2019

As Tanya eluded, you would need an addon to perform the ‘calculation’ portion of you requirement.

Nischal Sharma April 1, 2019

Thanks

0 votes
Answer accepted
Tanya Gordon
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.
March 29, 2019

Hi Nischal,

Yes, this is possible using a post function. You should edit the workflow and add this on the relevant transition. 

I guess to implement this kind of calculation you would need to use script runner abilities and write a script that will implement this requirement.

If you need any assistance with that you are welcome to PM me 😊

Cheers,

Tanya

Nischal Sharma April 1, 2019

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events