Hello,
I'm trying to execute a sample groovy script from workflow post function. But the reporter field value is not getting updated
Script:
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
Does anyone have any clue what might be wrong here? I even checked for long and there are no errors too
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.