Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Cancel delete issue

I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 29, 2020

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
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)

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events