Need to update date field value to current date+5 days excluding weekends during workflow postfunction in JIRA v5.2.4

Vignesh February 4, 2016
 

1 answer

0 votes
rahuldanwade
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 4, 2016

Hi Vignesh,

 

You can write a groovy script and run it on post function.

put you logic in script

jira uses java.sql.TimeStamp class internally to display dates.

More on [Timestamp|https://docs.oracle.com/javase/7/docs/api/java/sql/Timestamp.html]

 

rahuldanwade
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 4, 2016

import java.sql.Timestamp

def dateCf = customFieldManager.getCustomFieldObjectByName("date_field")
issue.setCustomFieldValue(dateCf, new Timestamp((new Date() + 5).time))

 

just modify above fields to exclude weekends

 

Suggest an answer

Log in or Sign up to answer