I am trying to have a date field on the parent issue get set to 60 days from the current date when a sub-task is set to the Done status. I'm not copying a field from the sub-task, so I added a Groovy script post function from JMWE and added the following:
import com.atlassian.jira.component.ComponentAccessor
import java.sql.Timestamp
issue.parentObject.setDueDate(new Timestamp((new Date() + 60).time))
//issue.parentObject.getKey();
//issue.parentObject.getDueDate();
Using the bottom two lines I tested the script to make sure it was pulling the sub-tasks parent issue key, and then I tested what the parent due date field would be and it all checked out. However, whenever I mark this sub-task as done nothing happens. I even have it set to fail the transition if there is an error in the post-function, but that doesn't even happen. Am I missing something in my script or is there possibly a better way to do this?