Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change story status to done if all tasks in this story is done

Nikola
March 13, 2018

Hi Community,

I have to write my first groovy script for jira and my issue is how to change story status to done if all tasks in this story is done.

I appreciate all the help!

Nikola

1 answer

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 13, 2018

If you have the ScriptRunner add-on and tasks are actually sub-tasks, then better use the built in function, called Transition parent when all subtasks are resolved

https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_transition_parent_when_all_subtasks_are_resolved

If tasks are not subtasks then it will not be a simple script.

Nikola
March 13, 2018

Thanks for answer Alexey!

I'll look your link, but in mine case jira's issues are epics, storie, tasks... not tasks and sub-tasks.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 14, 2018

In this case you have to write a script yourself. First of all, epics, stories and tasks are connected by links. You can get all linked issues to an issue. You can find more info here:

https://community.atlassian.com/t5/Jira-questions/Linking-Issues-in-jira-using-groovy/qaq-p/98301

Then you need to check the statuses of all linked issues and transition the parent issue, if all the linked issues are in the required status. You can find more info here:

https://community.atlassian.com/t5/Marketplace-Apps-questions/Groovy-Script-for-Linked-Issue-Transition/qaq-p/17706

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events