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
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.
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.
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
It looks like you're new here. Sign in or register to get started.