• Community
  • Products
  • Jira
  • Questions
  • Is there a plugin or method that can change the status of a parent task, depending on the status or resolution of a sub-task?

Is there a plugin or method that can change the status of a parent task, depending on the status or resolution of a sub-task?

Am using the CREATE ON TRANSITION plugin to spawn some sub-tasks off the parent JIRA.
Workflow A creates a sub-task calling Workflow B
Is there a way you know of that, for instance: Workflow B needs to kick something back to Workflow A, so that when the STATUS (or resolution) of Workflow B is changed, the STATUS of workflow A 'can be automatically updated depending on the result of workflow B?

4 answers

The CLI Plugin for JIRA has a post function that can can do any CLI action on JIRA. Although more intended for accessing other systems, it can also run stuff on the local instance including progressIssue which allows you to change the status of any issue. The workflow needs to have the appropriate transition(s) to get it to where you want including providing all the required fields needed along the way.

0 votes
Timothy Chin Community Champion Jun 26, 2013

It is possible to restrict the progression of an issue through workflow depending on the status of the issue's Sub-Tasks. For example, you might need to restrict an issue from being resolved until all of its Sub-Tasks are resolved. To achieve this, you would create a custom workflowand use the Sub-Task Blocking Condition on the workflow transitions that are to be restricted by the Sub-Tasks' status.


Try this (http://www.minyaa.com/documentation/latest/Features/ModuleWorkflows/AutoTransitionManagement/index.html).

I don't think this is possible to transition a parent's issue to a specific status depending on the sub-task; just because both the sub-task and parent issues are using different workflows.

I was about to suggest the JIRA Misc Workflow Extensions plugin (using the Transition parent issue post function), but that would only work if the sub-task and parent issues are using the same workflow.

You can use a groovy script called from the child transition def WorkflowTransitionUtil workflowTransitionUtil = ( WorkflowTransitionUtil ) JiraUtils.loadComponent( WorkflowTransitionUtilImpl.class ) def String currentUser = ((WorkflowContext) transientVars.get("context")).getCaller() def parent = issue.parentObject JiraWorkflow workflow = componentManager.getWorkflowManager().getWorkflow(parent) int stepId = workflow.getLinkedStep(parent.getStatusObject().getGenericValue()).getId() StepDescriptor stepDescriptor = workflow.getDescriptor().getStep(stepId) int savedAction = 0 // Find the next transition on parent for (Iterator<actiondescriptor> iter = stepDescriptor.getActions().iterator(); iter.hasNext();) { ActionDescriptor actionDescriptor = (ActionDescriptor) iter.next(); if (actionDescriptor.getName().contains("Name of Transition")) { savedAction = actionDescriptor.getId() } } workflowTransitionUtil.setIssue(parent) workflowTransitionUtil.setUsername(currentUser) workflowTransitionUtil.setAction(savedAction) // validate and transition issue workflowTransitionUtil.validate() workflowTransitionUtil.progress()

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

24,968 views 2 7
Join discussion

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