Currently I found a way in the forum to prevent closing of epic if stories linked to it aren't closed. I'm trying to achieve the same but "Task" instead of stories linked to an epic must close for the epic to transit to closed status, using script runner.
Answers are welcome, even If it's possible using automation for JIRA.
Hi @Hema,
You probably refer to the solution described in e.g. this related question, where issues.stories.length is uses to check for open issues in the epic.
It also mentions that issues.stories refers to all issues at the level below an Epic:
// The stories paramater returns all the issues below the Epic issue to allow there status to be checked.
In other words, this already includes tasks by default and probably covers your use case where you don't want to close an Epic if any open issues are still in it.
Should you specifically want to only check on tasks, you should be able to add an additional condition along these lines:
issue.issueType.name.match('^(Task)$')
For more information, have a look at some code snippets over here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Hema @Walter Buggenhout ,
How did you resolve this Jira expression?
My scenario is similar: I have an Epic that can have 04 types of child issues: Story, Task, Bug and Artifact.
I'm trying to create an expression in Epic's "Done" transition that checks if all my child issues are completed, if yes, it lets follow, if not, returns error.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.