• 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 vote
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).

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

685 views 6 13
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