Hello. I wan't add condition on delete issue
I use PreDeleteIssue on scriptrunner with
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption
import com.atlassian.jira.issue.MutableIssue
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
def issue = issue as MutableIssue
log.warn(issue)
def issueManager = ComponentAccessor.issueManager
def currentUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
if (true) {
issueManager.deleteIssue(currentUser, issue, EventDispatchOption.ISSUE_DELETED, false)
issueManager.deleteIssue(currentUser, issue, EventDispatchOption.DO_NOT_DISPATCH, false)
UserMessageUtil.warning('Dont ')
}
but this only delayed delete)