need to write the script in the postfunction of the workflow to add the current date + 10 Days excluding the weekend
Please help me in exclude the weekends
eg : current date = 9th nov 4:12 +10 days means the result should show as
result = 23 nov 4:12 ( as weekend will fall on saturday and sunday)
Already written the script which is adding 10 days but including the weekends:
import com.atlassian.jira.component.ComponentAccessor
import java.sql.Timestamp
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def dateCf = customFieldManager.getCustomFieldObject("customfield_18761") issue.setCustomFieldValue(dateCf, new Timestamp((new Date() + 7).time))
return dateCf