Skip to content

Instantly share code, notes, and snippets.

@jechlin
Created July 24, 2014 20:48
Show Gist options
  • Select an option

  • Save jechlin/a9a156862817b50321ce to your computer and use it in GitHub Desktop.

Select an option

Save jechlin/a9a156862817b50321ce to your computer and use it in GitHub Desktop.
package examples
import com.atlassian.jira.issue.Issue
import com.onresolve.scriptrunner.canned.jira.utils.CopyIssueWithAttachments
def subTaskObjects = (issue as Issue).subTaskObjects
if (subTaskObjects) {
def util = new CopyIssueWithAttachments()
util.copyAttachments(issue, subTaskObjects.last(), Closure.IDENTITY)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment