Hi All,
I have written a post function script to read the data form the linked ticket and then add the required data in to the current ticket. So, there is a need to update the due date of the current ticket form linked issue only if the due date of the current ticket is empty. I have written a block to check if the due date is null or not but this block is failing
if - will run if the due date is null or empty
else- will run if the due date is not empty
I have set the logs , the logs are saying the value of due Date is null but still the code is not triggering the if block
if(String_dueDate.isEmpty() == true || String_dueDate == null ||String_dueDate.length() == 0)
{
log.debug("In If And Parent Due is "+ issue2.getDueDate())
log.debug("Current Due is"+ issue1.getDueDate() )
issue1.setDueDate(due_Date_2_value);
}
else
{
log.debug("In Else And Parent Due is "+ issue2.getDueDate())
log.debug("Current Due is"+ issue1.getDueDate() )
}
I don't under stand what's wrong in the code.
I have converted the due date outcome to string as well and then I am comparing
def due_Date_1_value = issue1.getDueDate()
String String_dueDate = due_Date_1_value.toString()
Please help me to understand and fix this.
Thanks,
Rohit