Hi ,
I want to implement that when parent task dudate has changed the sub-task duedate change to blank. Can anyone help me. I want to use sil scrpt to implement it.
Thanks,
Mandia
Hello,
Your code would be like this:
JFieldChange [] changes = lastIssueChanges(key);boolean flag = false;for(number i = 0; i < size(changes); i++) { if (changes[i].field == "duedate") { flag = true; }}if (flag) { string [] subtaskArray = subtasks(key); for (string subKey in subtaskArray) { %subKey%.dueDate = ""; }}
Hi @Alexey Matveev
if("Task" == issueType){ JFieldChange [] changes = lastIssueChanges(key); boolean flag = false; for(number i = 0; i < size(changes); i++) { if (changes[i].field == dueDate) { flag = true; } } if (flag) { string [] subtaskArray = subtasks(key); for (string subKey in subtaskArray) { if(%subKey%.status != "Closed" && %subKey%.status != "Cancelled") { %subKey%.dueDate = ""; } } }}
I have updated my code but it doesn't work
You should change:
if (changes[i].field == dueDate)
to
if (changes[i].field == "duedate") {
I have updated my code, but it still doesn't work. I find a issue. When I update other fields in parent task, the subtask due date will auto change.
It looks like you're new here. Sign in or register to get started.