Hi All,
Q.) for Task issue type while moving to close transition in workflow:
Error would be displayed if the task have any open subtasks. (open meaning issue not in any done status category)
Error Message: "All open subtasks needs to be closed"
> I have written this script , but it is not working.
import com.opensymphony.workflow.InvalidInputException;
if (issue.getSubTaskObjects().any { subtask -> subtask.getIssueType().getName() == 'Task' && subtask.getStatus().getName() != 'Done' })
{
throw new InvalidInputException("All subtasks need to be closed");
}
Where we need to change?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.