Hi Folks,
I need to copy the value from a custom field in Jira to Fix Version field in a workflow postfunction in Jira via Script Runner plugin.
Need help with the groovy script to do the same.
Thanks and Regards,
Jenin C M
Something like this:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.project.version.Versionimport com.atlassian.jira.event.type.EventDispatchOptiondef user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()def csVersionPicker = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("version_picker")log.error(issue.getCustomFieldValue(csVersionPicker))List<Version> versionList = (List<Version>) issue.getCustomFieldValue(csVersionPicker)issue.setFixVersions(versionList)ComponentAccessor.getIssueManager().updateIssue(user, issue, EventDispatchOption.ISSUE_UPDATED, false)
It looks like you're new here. Sign in or register to get started.