How to change parent's status Automatically?

Rahul Ingle March 10, 2022

Hi Community.

What I want to do basically is when the first subtask is moved from To Do to In Progress the parent ticket (story) be updated automatically as well to in progress

Scenario 1

  • If there is even one subtask under a story that is "In progress" state the parent status should automatically move to "In progress"

Scenario 2

  • If all subtasks under a story get completed and marked as "Done", the parent status should automatically change to "Done"

 

  • When one of the child issued is moved from ON HOLD to IN PROCESS, the parent issue must be moved to IN PROCESS.

Sharing server version - (v7.13.2#713002-sha1:c794ca7:node4) 

Note- I don't have JSU plugin.

 

 

 

2 answers

1 accepted

0 votes
Answer accepted
Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2022

@Rahul Ingle 

By default this functionality in there in jira.

Either You have to develop plugin by your self for this functionality using the Jira API and Plugin Modules. If you have programming knowledge then its easy.

In this you need to create Postfunciton which will run on subtask workflow and transits the parent issue base on subtask status

Plugin Development Document 

Post function Module 

 

Or  You need go for plugin either JSU/JMWE/Script Runner

 

Accept the answer if it helps

Rahul Ingle March 11, 2022

@Sachin Dhamale 

Thank you response.

I have JMWE plugin. Can you please share the steps how can configured the post function.

Thanks

Rahul

Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2022

@Rahul Ingle ,

For Scenario 1

1. You need to go to the In progress transaction post function of workflow which is attached to the Subtask 

2. Select the Transition Parent Issue Post-function

3. there you can select the in-progress  transaction for parent issue

Transition.png

Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2022

For Scenario 2:

You can add same postfunciton on Done transaction of subtask to trigger Done transaction for parent issue.

Here you need to add condition i.e. If all subtasks under a story get completed then and only then trigger the transaction for parent.

This you have to do in groovy script.

@David Fischer can help you with condition

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2022

Actually, I usually don't use Conditional Execution for that second case but instead add a Linked Issue Status Condition on the parent transition to Done, so that even manually you cannot close the parent issue if not all sub-tasks are closed.

Sachin Dhamale
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2022

@David Fischer  Ya condition also fulfill your requirement .This will be other way around. good

Rahul Ingle March 15, 2022

Hi @Sachin Dhamale  @David Fischer 

I have follow mentioned steps but Scenario 2 not working for JMWE.

Can you please help for Scenario 2.

When one of the child issued is moved from ON HOLD to IN PROCESS, the parent issue must be moved to IN PROCESS.

 

example in JSU have linking issue. what is for JMWE.

 

sub-task done psot function.JPG

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2022

@Rahul Ingle why do you need conditional execution at all? 

Rahul Ingle March 16, 2022

Hi David,

Requirement-> If all subtasks under a story get completed and marked as "Done", the parent status should automatically change to "Done"

  • To achieve the above case i tired implement this condition but its not working as accepted.
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 16, 2022

Hi @Rahul Ingle 

the conditional execution script should be:

parentIssue.subtasks.every{it.get("status").name == "Done"}

And you'll need to make sure to move the post-function to the bottom of the list of post-function on the transition.

Alpa Padliya September 22, 2022

Hi @Sachin Dhamale , @Rahul Ingle , @David Fischer 

What if we do not know coding and also do not have any third party app then what we need to do in this. Guys can you tell step by step that how can i have third party app and how can i do this thing in my JIRA - How to change parent's status Automatically?

My scenarios - If any sub-task status has change from TO-DO status to IN PROGRESS the automatically parent status should change in  Development.

If any subtask is remained to close then should not allow to close the parent's status also.
If you can help me.

Thanks in Advance.

Saisuraj Palavalasa January 25, 2024

Hi @Alpa Padliya 

I have the same scenario and looking for some help. Were you able to achieve it?

 

I my case, the hierarchy is Feature --> Epic --> Story --> Subtask

Scenario 1

  • If there is even one subtask under a story that is "In progress" state the parent (Feature --> Epic --> Story)  status should automatically move to "In progress"

Scenario 2

  • If all subtasks under a story get completed and marked as "Done", the parent (Feature --> Epic --> Story) status should automatically change to "Done"

 

  • When one of the child issued is moved from ON HOLD to IN PROCESS, the parent issue must be moved to IN PROCESS.

 Regards, Sai.

1 vote
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2022

You will need a third-party app such as JMWE or JSU (among others) for that.

Rahul Ingle March 11, 2022

Hi David,

I have JMWE plugin. Can you please share the steps how can configured the post function.

Thanks

Rahul

Rahul Ingle March 11, 2022

@David Fischer 

Hi David,

Thank you response.

I have JMWE plugin. Can you please share the steps how can configured the post function.

Thanks

Rahul

Suggest an answer

Log in or Sign up to answer