The parents task and subtask are using different workflows

Originally asked by smpark on 12 May 2021 (original question)


Hi,

I use the workflow of parents task and subtask differently.
The parents task has different sync values, and the subtask has the same sync values. How can I configure this?

I used the code below, but only the code of Parents Task works.

// Parents Task
if(replica.parentid == null) {
if(replica.status.name == “To Do”){
issue.setStatus(“Open”)
}
if(replica.status.name == “In Progress”){
issue.setStatus(“Work In Progress”)
}
if(replica.status.name == “In Review”){
issue.setStatus(“Work In Progress”)
}
if(replica.status.name == “Done”){
issue.setStatus(“Done”)
}
}

// Sub Task
if(replica.parentid != null) {
if(replica.status.name == “To Do”){
issue.setStatus(“Open”)
}
if(replica.status.name == “Work In Progress”){
issue.setStatus(“Work In Progress”)
}
if(replica.status.name == “In Review”){
issue.setStatus(“In Review”)
}
if(replica.status.name == “Done”){
issue.setStatus(“Done”)
}
}

Also, I am configuring in an on-premise local environment.

Regards,


Answer by Serhiy Onyshchenko on 14 May 2021

Hello, smpark, might I ask you to try changing all references of replica.parentid to be replica.parentId instead ?
Let me know, how it goes.