Hello,
i want to create a Workflow transission that deletes linked Issues of the Parent issue. I have script runner but i havnt found a function like that. Is this even possible ?
If you really want to do it despite what @Joe Pitt had to say, look at IssueService component and it's methods
basically, you'd do something like this:
import com.atlassian.jira.component.ComponentAccessor
//finding the issue you want to delete
def issueService = ComponentAccessor.issueService
def currentUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def deleteValidationResult = issueService.validateDelete(currentUser, issueToDeleteId)
if (!deleteValidationResult.isValid()) {
log.warn deleteValidationResult.errorCollection
} else {
issueService.delete(currentUser, deleteValidationResult)
}
but still, it's better to close that 2nd one with the 'Duplicate' resolution and remove a link if you want to have only one issue linked.
Do not delete issues. When you delete it is GONE. Hardly a week goes by without someone wanting to restore an issue. Deleting issues will come back and bite you when it is the most inconvenient. I suggest closing with a resolution value of Deleted anything you want to delete. I implement a special transition only the project lead can execute and it requires filling in a reason field from a select list (such as entered in error, OBE, Duplicate, Other) and explanation text.
Deleting issues destroys historical data. Missing issue numbers will eventually cause a question about what it was and why was it deleted even if it was done properly. Missing data always brings in the question of people hiding something that may have looked bad.
The only viable way to restore an issue is to create a new instance of JIRA and restore a backup that has the issues. Then export them to a csv file and import them to your production instance. You will lose the history.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The User can create 2 Types of issues out of the Parent Issue, but he can only create 1. So when he creates the wrong one by accident i just want to delete the issue because its not relevant anymore. The issues i want to delete are only a clone of the parent issue anyway
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sooner or later someone will delete the wrong issue that you want back. I think it is a bad practice to delete anything from a tracking system.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But since its only a clone of the parent issue it doesnt really matter. When u want it back all u need to do is one click. So is it possible to delete an issue with a workflow function?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.