Hey, I am using the Script Post-Function: "Create a sub-task" of the Script Runner Plugin.
I can create Subtasks from the parent issue easily, but how would I create one if a sibling subtask is transitioned?
Thanks in advance.
edit:
I found the following lines in the "Create a sub-task" script, see whole script: http://goo.gl/3sQaKV
def String subtaskAction = params[FIELD_SUBTASK_ACTION]
subtaskAction = subtaskAction?.replaceAll(/ .*/, "")
String subtaskSummary = params[FIELD_SUBTASK_SUMMARY]
if (issue.getIssueTypeObject().isSubTask()) {
log.warn ("This issue ($issue) is already a sub-task... doing nothing.")
return [:]
}
So it already checks if the task itself is a subtask and does nothing if so. In this case I would like to set "issue" to the parent issue, something like issue = issue.getParentIssue(). How would this be possible?