• 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

This widget could not be displayed.

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.

This widget could not be displayed.
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.

https://confluence.atlassian.com/display/JIRA/Configuring+Sub-tasks

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

This widget could not be displayed.

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.

This widget could not be displayed.
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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

55 views 1 0
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