I need a sub-task to transition to a certain state on creation IF the parent issue is not in the Status of Open. I'm using the "Transition issue" post function but need to wrap it round a conditional Groovy expression that gets the Status of the Parent and returns True if it is not Open.
See https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/validators/simple-scripted-validators.html#_subtask_relationships - towards the end of the section there are examples on checking parent status
On the initial creation of both Parent and Sub Tasks they are set to the status of "OPEN". When the Parent is worked on someone moves it into "IN PROGRESS" on the sprint board and the post function on the Parent to transition all the Sub Tasks to "IN PROGRESS" works fine.
However, If another Sub Task is created I want the newly created Sub Task to transition to "IN PROGRESS" and not remain as "OPEN".
I have tried the suggested conditional transition post function issue.parentObject.statusObject.name != "OPEN"
on the Sub Task to transition it to the "IN PROGRESS" step but that does not work and the new Sub Task is created as "OPEN".
The Sub Task must either transition to "IN PROGRESS" on creation if the Parent is not "OPEN" or must inherit the status of the Parent. It doesn't matter which so any working solution would be welcome.
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.