It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Parent issue needs to close once sub task are closed

Hello,

I have issue with post function. I want to close parent issue automatically once all sub-task are closed. i am using following post function but its not working as expected.

If you already know workaround please share with us.

Add a new post function to the unconditional result of the transition.

Set issue status to the linked status of the destination workflow step.
— THEN
Add a comment to an issue if one is entered during a transition.
— THEN
Update change history for an issue and store the issue in the database.
— THEN
Re-index an issue to keep indexes in sync with the database.
— THEN
Fire a Issue Closed event that can be processed by the listeners.
Edit
— THEN
Transition Closed will be triggered on the issue's parent issue.
Edit | Move Up | Delete

5 answers

1 accepted

2 votes
Answer accepted

Hi Lakshmi,

Use the script runner plugin https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner

It has a built in script to close the parent task when all sub-tasks are resolved.

https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Transitionparentwhenallsubtasksareresolved

Thank you

Bhushan

Hello ...

it still not working for me. I created it on sub-task worflow and i selected the correct taransaction id on that. but still its failing. i am not seeing anything happening over there

thanks

Lakshmi

Whatever transition you define for the parent needs to be valid...

Also check that you published the subtask workflow

If it is can you set the logging to debug for com.onresolve.jira.groovy and retry, and check the logs.

Found the solution

We need to fire event for Issue Resolved / Issue Closed based on action you take

0 votes
Joe Wai Tye Atlassian Team Feb 26, 2013

Hi Lakshmi,

In addition to the script runner plugin, it could also be possible by using the 'JIRA Misc Workflow Extension' plugin.

You can find further details on this here - https://innovalog.atlassian.net/wiki/display/JMWE/JIRA+Misc+Workflow+Extensions+Documentation;jsessionid=221BF81F38EABBAC81D20EED413F4D66#JIRAMiscWorkflowExtensionsDocumentation-10-TransitionParentIssue(newin2.1)

Cheers,

Joe

Hello Friend,

I tried "Transition Parent Issue" in subtask workflow when i close transaction happening . but I am getting following error message in front end

"The JIRA server was contacted but has returned an error response. We are unsure of the result of this operation.

Close this dialog and press refresh in your browser"

is there any area i need to check

Look at the atlassian-jira.log file and see what error it reports!

Hi,

i used script plugin and impleted the chagnes in sub-ticket workflow. the chagnes are not reflecting

could you please help me to fix the issue

thanks

lakshmi

Hi , I tried this functionality, it's working on my test instance but it's not working on the production server. I tried checking the logs but could not find anything usefull.

how to bulk change the status of the issues from reject to closed using groovy.Please help

0 votes
Andreas Knecht Community Leader Nov 21, 2016

There's now a very easy to configure way to transition parents and sub-tasks in sync using Automation for JIRA!

You can easily modify related issues (such as parents, stories, sub-tasks, epics, linked issues and even JQL) using our related issues action and condition:

(this example transitions sub-tasks to "In Progress", but you could easily change this to "Closed")

For more details see https://blog.codebarrel.io/synchronize-parent-and-sub-task-issues-with-automation-for-jira-bdcca6c9d453

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in United States

Welcome new members!

Wow, I got swamped and now that I've finally gotten my head back above water, I find we have several new members! Welcome @Darren Keith lowman , @Amanda Babb , @Luis Zapata , @Joli Holmes , and @bh...

24 views 0 2
View post

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you