Hello Community,
So much for the Basics.
Within the SubTask WF, in the transition from Open to Tuned (ID 131), I added the Transition parent issue (JMWE add-on) function with the following condition:
Transition parent to Task WF Status Tuned (ID 71) when all subtasks are in Status Tuned (ID 131).
def subtasks = issue.subTaskObjects
boolean subtaskStatus = 0
boolean allSubsSameStatus = 0
def subtaskList = []
for (subtask in subtasks){
if (subtask.status.name == "Tuned"){
subtaskStatus = 1
log.info "Set True. Status Subtask is ${subtask.status.name}"}
else{
subtaskStatus = 0
log.info "Set False. Status Subtask is ${subtask.status.name}"}
subtaskList.add(subtaskStatus)
}
def size = subtaskList.size()
log.info "ListSize ${size}"
log.info "List Content: Has each Subtask status tuned? ${subtaskList}"
if(subtaskList.contains(false)){
allSubsSameStatus=0}
else{
allSubsSameStatus=1}
log.info "Are all Subtasks Tuned? ${allSubsSameStatus}"
allSubsSameStatus
At the end it triggers "true" and the parent should be moved. I put the Action at the end of the transitioning process (after fire Event). While moving the subtask now, i got:
Error:
Error occurred while storing issue.
Unable to move issues at this time. Please refresh your browser and try again.
Any ideas? (Btw. I got the same issue with script runner (groovy))
Hi Marie,
do you know that you could achieve the same without any conditional execution script? Just add a "Sub-task blocking" condition to the parent transition from Implemented to Tuned.
And if you really want to use conditional execution instead (because you still want to allow manual Task transition to Tuned even when not all sub-tasks are Tuned), your code is incorrect because the current issue (in the issue variable) is the sub-task being transitioned, not the parent Task. The code you need is:
parentIssue.subTaskObjects.every {it.status.name == "Tuned"}
Hi David,
thanks for the fast reply. The "Sub-task-blocking" condition still requires a Manual movement of the parent Task, right? I like to have the following:
While moving the last subtask to tuned, it shall automatically move the parent to tuned.
For the scripted condition I'm now able to move 4 of 5 subtasks to the Status Tuned. When I move the 5th one, the parent goes to Status Tuned, but the 5th subtask got the same error as before and is not able to be transitioned.
parentIssue.subTaskObjects.every {it.status.name == "Tuned"}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marie,
I suggested replacing the conditional execution script with the Sub-task blocking condition - not replacing the Transition Parent Issue post-function.
As for the error you're getting, make sure you move the Transition Parent Issue post-function to the bottom of the list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sadly the behaviour stayed the same :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marie,
can you open a support request at https://innovalog.atlassian.net/servicedesk/customer/portal/8 ? We'll need to look into your Jira logs, which you might not want to share publicly here...
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.