Basically I am trying to take the required parent due date, subtract 14 days from it and apply it to my subtask's due date field.
Currently it is setting the subtask due date as the created minus 14 days which is not what I want.
I want to set the parent to Apr/20/20 and then the subtask automatically, upon creation through a transition, sets its own due date to Apr/06/20.
The code I have right now in my subtask additional issue actions is:
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.MutableIssue;
import java.sql.Timestamp;
MutableIssue myIssue = issue;
Calendar dueDate = Calendar.getInstance();
myIssue.setDueDate(new Timestamp((new Date() - 14).time));
Any help would be much appreciated