I'm trying to trigger a transition of a parent task when all specific subtasks are in a certain status but I'm not familiar with scripting. I've done something similar with the JMWE Transition Issue(s) Post Function when there's one subtask type and separate workflows between the Parent and the subtask. The issue I'm facing is that they share the same workflow and there may be different subtasks types on the parent. This is the specific scenario:
Transition the Parent ticket to the "Feature Review" status via the "Feature Review-auto" transition when all "Dev Task" subtasks are in the "Feature Review" status.
Can anyone assist with the right script for this? Thanks!
you can use the same Transition Issue(s) Post Function on the transition to the "Feature Review" status to trigger the Feature Review-auto transition on the Parent issue, but you need to add a Conditional Execution script as follows:
issue.get("issuetype").name == "Dev Task" && issue.parentObject.subTaskObjects.every {
it == issue || it.get("issuetype").name != "Dev Task" || it.get("status").name == "Feature Review"
}
Thanks for the response! Unfortunately it didn't work for me. This is how I have it configured if I messed something up.
To test the scenario, I moved the only two "Dev Task" subtasks to the "Feature Review" status but the parent didn't also update to the "Feature Review" status at that point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry it didn't work.
First of all, try selecting the "Parent Issue " of the "Issue/subtasks" relationship, not the Portfolio hierarchy. Also, try testing without the conditional execution script to make sure the parent issue is then always transitioned to the Feature Review status.
Let me know how that goes
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.
I'm glad it worked.
Can you please "accept" the answer so others can find it more easily?
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.