Transition parent state when sub-tasks are closed (not working even after following all guidelines)

Hi,

I have followed the below mentioned guides before posting this question. 

https://answers.atlassian.com/questions/75677

and 

https://answers.atlassian.com/questions/157110

Steps performed:

  1. Created a post function for transitioning the parent to closed state, on all such transitions of the subtask which move the sub-task to closed state.
  2. The post function is moved at the end of the list in the sub task transitions post function list
  3. In the parents workflow, added following conditions:
    1. All sub-tasks must have one of the following statuses to allow parent issue transitions: CLOSED
    2. Add grouped condition Edit Delete
      Condition to hide a transition from the user. The transition can only be triggered from a workflow function.

Still, the parent story doesn't close when I close all the subtask.

I am not sure what am I missing.

Can somebody please help?

======

Thanks for the comments. 

Sorry for not providing the screenshots.

  1.  id of the transition in parent workflow
    transition id in parent workflow.png

  2. Conditions specified in the parent function ( making it hidden, and not closing it until all sub tasks are closed)


    sub task post functions.png

    3. Post functions in the transition of sub task

    parent conditions.png

  3. Transition in the parent. It's hidden and Post function includes only changing a field.
    parent post functions.png

 

 

6 answers

1 vote
Steven Behnke Community Champion Jul 05, 2016

The problem is with the default Hide transition from user condition. It does not work with these other post-functions. Misc Workflow Extensions includes it's own "hidden" condition, but it is disabled by default in JIRA Cloud. I don't have a proper workaround for that right now.

The following configuration works just fine.

Parent Workflow – 
image2016-7-5 13:19:12.png

Conditions

  1. All sub-tasks must have one of the following statuses to allow parent issue transitions: CLOSED

 

Child Workflow – 
image2016-7-5 13:19:56.png

Post-Functions

  1. Set issue status to the linked status of the destination workflow step.
  2. Add a comment to an issue if one is entered during a transition.
  3. Update change history for an issue and store the issue in the database.
  4. Re-index an issue to keep indexes in sync with the database.
  5. Transition All tasks closed will be triggered on the issue's parent issue.
  6. Fire a Issue Closed event that can be processed by the listeners.
Steven Behnke Community Champion Jul 05, 2016

@Hemant Shinde, the problem is with the default Hide transition from user condition. It does not work with these other post-functions. I don't have a proper workaround for that right now.

Thanks Steven.

I see that you have not added specific transition for moving the parent issue to closed state.

Does it (parent issue) still get automatically closed? 

 

Steven Behnke Community Champion Jul 06, 2016

I do have a specific transition, it's the transition named "All tasks closed".

0 vote
Steven Behnke Community Champion Jul 04, 2016

Can you show a screenshot of your Post-Functions and Conditions?

The post function will fire when the parent issue is transitioned; not when the sub-task is transitioned.  Once you close the sub-task, the condition is met on the parent issue, but it will not automatically transition.  This is not possible in Cloud.

Steven Behnke Community Champion Jul 05, 2016

This is definitely possible using Misc Workflow Extensions. This add-on is included for FREE in Cloud instances.

Please explain how this is possible.  Yes, the plugin is included in Cloud, but only some modules are enabled and there is no way to add a condition for transition parent post-function.

Steven Behnke Community Champion Jul 05, 2016

I will do so. I happen to have a Cloud instance avaliable so I'll demo it and then come back.

Steven Behnke Community Champion Jul 05, 2016

The Sub-Task has a post-function which fires a transition on a Parent issue. That transition on the Parent issue has it's own condition called the Sub-Task Blocking Condition that makes this possible. 

Steven Behnke Community Champion Jul 06, 2016

Andrea I see an email alert but no corresponding comment here. I can confirm that when I set it up as in my answer above works – https://answers.atlassian.com/questions/39245214

Hi Steven,

Thanks or offering the help,

I have added the Post-Functions and Conditions screenshots. 

I don't agree with the many of the comments that it is not possible to achieve what I am trying to do here. As mentioned in the two links, I have already installed the Misc Workflow Extensions. I just thought that it would be a precondition for this issue and never thought of mentioning it. 

 

Misc Workflow extensions is preinstalled on Cloud instances, so I'm not sure what you installed.  Are you sure you are on Cloud?

Hi Andrea

The extensions are preinstalled but not enabled by default. I have enabled them so that the other options such as transitioning of the parent issue become available

 

@steven

I have messed up the order of images above. 

Hence I am posting it again here: 

 

The transition id in parent workflow (I am using the Close Issue [hidden, only from program ] trnasition)

transition id in parent workflow.png

======

Conditions in the transition of parent workflow. (we only hide the transition and make sure that the parent is closed after all sub-tasks are closed.

parent conditions.png

======

Post functions in the transition of parent workflow  (there is nothing mentioned to transition the children as we want parent to get closed based on subtasks, not the other way round)

parent post functions.png

======

Post functions in the transition of subtask workflow. 
Two things done here:
  1. Mentioned the parent transition id which should get triggered
  2. Moved the post function of parent transition at the end of the list. 
sub task post functions.png

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

149 views 1 17
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