Help with dueDateCalculation() Groovy code.

1
0
-1

I have been trying to customize the due date of a task using a groovy script.

This is my code:

long totalSLA

if (requestContract.fileType == "Audio" && requestContract.scale == "Major"){
totalSLA = 432000000L
} else if (requestContract.fileType == "Audio" && requestContract.scale == "Minor"){
totalSLA = 259200000L

}

return totalSLA

I also tried this code:

if (requestContract.fileType == "Audio" && requestContract.scale == "Major"){
return 432000000L
} else if (requestContract.fileType == "Audio" && requestContract.scale == "Minor"){
return 259200000L

}

The due date for both of my codes are wrong.

I would appreciate any help. Thanks.

1 answer

1
0
-1
This one is the BEST answer!

Sorry, my mistake was actually the value of requestContract.scale. The only possible values for it is either "Major Note" or "Minor Note".

Thanks, it is working now.

Notifications