Preventing issues from being closed while the sub-tasks are still open

Udayasee Patlolla August 9, 2020

1. I followed the given steps for the custom workflow but it does not work. It allows the parent to close even though sub tasks are open.

https://confluence.atlassian.com/jirakb/preventing-issues-from-being-closed-while-the-sub-tasks-are-still-open-724928276.html?_ga=2.233072091.474588100.1596924124-1842078371.1596466683

 

2. I also tried to apply the script runner script but it shows "Has not run yet".

Edited the workflow and published it.

1 answer

1 vote
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 9, 2020

Hi @Udayasee Patlolla 

I tested the instructions in the above link, and it worked for me.

These are the steps I took (same as the link):

  1. Go to Jira Administration > Workflows
  2. Located the workflow for the parent issue (eg. Story) and pressed "Edit"
  3. In diagram view, located a transition to our "Done" status - and selected it
  4. From the pop-up which appears, selected "Conditions"
  5. Pressed "Add Condition" on right-hand side, and selected to add "Sub-Task Blocking Condition"
  6. Added the parameter that sub-tasks need to also be in the "Done" status before parent issue can close
  7. Repeated steps 3-6 for each transition to "Done" on the workflow
  8. Once complete, pressed "Publish" near top of the page to activate the draft workflow

I'd give these a go again because this solution does work.

Ste

Udayasee Patlolla August 10, 2020

Hi Stephen,
Followed exactly same steps, but I am able to close the Parent EPIC.
Does this apply to custom workflows? We have custom workflows for each issuetype and I am applying these changes for EPIC workflow.

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 10, 2020

Hi @Udayasee Patlolla 

Are there sub-tasks on the Epic? 

Or are these children of the Epic? Such as stories, tasks, bugs, etc? If so, these aren't sub-tasks and you'd require an alternative solution :)

Ste

Udayasee Patlolla August 11, 2020

Hi Ste,

Thanks for the response!!

I tried on subtasks and even on child issues. It is not working on anything.

Could you please let me know the alternate solution of for child issues?

Regards

Udaya

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 11, 2020

Hi @Udayasee Patlolla 

For more powerful conditions, you'll need an app - such as Jira Misc Workflow Extension - to allow for the Epic/Child relationship.

You can also use Scriptrunner which you mentioned above.

But the above does work usually. As you've tried both options and it's not working, would it be possible to provide specific instructions on what you changed?

Screenshots of your workflow / conditions would really help - alongside the options for closure on your issue page!

Ste

Misha Goel April 3, 2023

@Stephen Wright _Elabor8_  based on your steps i do not see step 5 condition, "Pressed "Add Condition" in my workflow. Which workflow your project is set up into? Does it depend on a version?

I am trying to add a condition to include cancelled status for sub tasks, so that it lets me close the sprint. Currently it prompts that sprint cannot close as some of the sub tasks are with cancelled status. 

Suggest an answer

Log in or Sign up to answer