Transition parent when subtask is in progress



We are currently searching for the same functionality as there is currently in script runner Transition parent when all subtasks are resolved but we need to finetune it a bit. We want that one subtask has been moved to in progress that the parent issue will also go into in progress


somebody who could help us?

3 answers

1 accepted

1 vote
Answer accepted

Hi Thomas,

For the current JIRA version, this should work:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
Issue issue = issue
def issueService = ComponentAccessor.getIssueService()
def currentUser = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()
// Use the ID number of the transition you want in place of the "4"
def transitionValidationResult = issueService.validateTransition(currentUser, issue.parentId, 4, issueService.newIssueInputParameters())
if (transitionValidationResult.isValid()) {
    issueService.transition(currentUser, transitionValidationResult)
} else {
    log.warn("Error transitioning issue")


If that is more logging than you want, just delete the second log.warn line.

Happy Monday smile

In the Script console the declaration of issue produces an undeclared error on the assignment?

"The variable [issue] is undeclared"

1) Is (out of scope) "issue" defined when run under the post function logic?

2) Is this assuming that the running transition is ONLY run for a subtask issue? ie. is in workflow dedicated to subtask issue types?

Do I understand it right, that the script by "April" requires ScriptRunner to work? Can it be achieved without a plugin?

So, you need:

  • all issues istead of one are resolved
  • this issue must be into "Progress" status and could not have a resolution.

Is it correct?


Thanks for the tip it is working correctly smile


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


199 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you