I am creating an issue automatically using script post function inĀ a transition. How to I set the parent issue for it. Like we have issue.getParentObject() to get the parent id, is there any method to set the parent id?
You have not told us exactly how you are creating the sub-task, or why, but assuming you are creating a subtask on the issue that the post-function is running against, the minimal calls you need are
newSubTask.setParentObject(issue) newSubTask.setProjectObject(issue.getProjectObject()) newSubTask.setIssueTypeId(subTaskTypeId)newSubTask.setSummary("A summary")
newSubTask.setParentObject(issue)
newSubTask.setProjectObject(issue.getProjectObject())
newSubTask.setIssueTypeId(subTaskTypeId)
You'll need to provide the subTaskTypeId in there, I can't guess what type you might need.
It looks like you're new here. Sign in or register to get started.