fix version is a system field, not a custom field. This works for me
// inherit system fields
UpdateIssueRequest.UpdateIssueRequestBuilder issueRequestBuilder = new UpdateIssueRequest.UpdateIssueRequestBuilder();
updIssReq = new UpdateIssueRequest(issueRequestBuilder);
MutableIssue _subTask = issue as MutableIssue
def fixVersionsField = parentIssue.getFixVersions();
// add system fields to inherit before calling issueManager.updateIssue()
issueManager.updateIssue(curUser, _subTask, updIssReq);
below script copies story points from parents to sub task while creating sub task but still i'm not able copy fix version like story points.
could some one help me to modify this script to copy fix version as well
def field = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Story Points")
//def field = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("fixVersion")
def parentMyFieldValue = issue.parentObject.getCustomFieldValue(field)
def changeHolder = new DefaultIssueChangeHolder();
field.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(field), parentMyFieldValue),changeHolder);
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events