hi,
I need to delete entries in History and Emails tab (next to Activity) of an issue. I have a script which worked for History
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.component.ComponentAccessor
def issueManager = ComponentAccessor.getIssueManager()
Issue issue = issueManager.getIssueObject("ABC-1234")
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
changeHistoryManager.removeAllChangeItems(issue)
But the script below dint work for Emails. It is returning 0 count of rows deleted -
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.component.ComponentAccessor
def issueManager = ComponentAccessor.getIssueManager()
Issue issue = issueManager.getIssueObject("ABC-1234")
def changeMailThreadManager = ComponentAccessor.getMailThreadManager()
Long issueid1 = 125481L
changeMailThreadManager.removeAssociatedEntries(issueid1)
what is wrong in above script and why it is not deleting email entries in Emails tab of issue?
regards,
Sandeep Upadhya
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.