Forums

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

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 Champion
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 Champion
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
AUG Leaders

Atlassian Community Events