I'm trying to execute a sample groovy script from workflow post function. But the reporter field value is not getting updated
import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.issue.Issue; import com.atlassian.jira.issue.IssueManager; import com.atlassian.jira.issue.MutableIssue; String issueKeyFrom = "xxx"; String issueKeyTo = "xxx"; IssueManager issueManager = ComponentAccessor.getIssueManager(); Issue issueFrom = issueManager.getIssueObject(issueKeyFrom); MutableIssue issueTo = issueManager.getIssueObject(issueKeyTo); log.warn(issueFrom.getReporterUser()) log.warn(issueFrom.getReporterUser()) issueTo.setReporter(issueFrom.getReporterUser()); log.warn(issueTo.getReporterUser()) issueTo.store();
I deployed the script to the correct location.
When I run this script from script runner console - the reporter field does get updated.
I'm sure that:
issueTo.getReporterUser() is logging the correct name. its just when I go to the issue, I cant see the changes. I tried refresh,new window, different browser
Please help!! TIA
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in talking to 20 people planning t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs