Hi
I am testing Groovy listener "Create subtask". My idea is to create subtask and update some fields of this created subtask based from parentissue.
I assume I can add some code in additional issue actions, e.g.
/*subtask summary*/
issue.summary = 'Notestēt risinājumu';
/*find parentissue*/
def parentIssue = issue.getParentObject();
/*find tester in parentissue*/
parentTester=parentIssue.getCustomFieldValue("Tester");
/*find fix version in parent issue*/
parentFixversions=parentIssue.getFixVersions();
issue.assignee = parentTester;
issue.fixversions = parentFixversions;
However when I added this code, subtask was not created. What is wrong?
I detect that I can copy customfield value from createdsubtask to this subtask assignee
This code works:
def cf = customFieldManager.getCustomFieldObjects(issue).find { it.name == "Tester" }
def cfValue = issue.getCustomFieldValue(cf)
issue.setAssignee(cfValue);
However I need fields from parentIssue and I am not able to get it now.
Is it possible to add these actions in listener?
Thank you in advance,
Fyodor