I started learning script runner. I found an article on the Internet about changing custom field.
ComponentManager componentManager = ComponentManager.getInstance()
IssueManager issueManager = ComponentAccessor.getIssueManager() CustomFieldManager customFieldManager =componentManager.getCustomFieldManager()
User curUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() MutableIssue curIssue = issueManager.getIssueObject("PRJ-1")
CustomField cfReleaseVersion = customFieldManager.getCustomFieldObjectByName("Release Version") curIssue.setCustomFieldValue(cfReleaseVersion, "3.5")
issueManager.updateIssue(curUser, curIssue, EventDispatchOption.ISSUE_UPDATED, false)
My jira 8. Jira 8 don't have import com.atlassian.jira.ComponentManager.
What do I do? I'll want to do it after transition "closed"
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
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