Sunshine-jcy

JIRA中,报告人匿名场景

 

 

 方法一:注意换成特定的issueKey

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption

def issueManager = ComponentAccessor.getIssueManager()
def issue = issueManager.getIssueObject("TPIS172-401")
issue.setReporter(null)

issueManager.updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), issue, EventDispatchOption.ISSUE_UPDATED, false)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

方法二

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption

def issueManager = ComponentAccessor.getIssueManager()
def issueObject = issueManager.getIssueObject("")
issueObject.setReporter(null)

issueManager.updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), issueObject, EventDispatchOption.ISSUE_UPDATED, false)

posted on 2021-02-07 10:37  Sunshine-jcy  阅读(186)  评论(0编辑  收藏  举报

导航