Hi Goran,



Thanks for the suggestion, for some strange reason the Closed Cancelled value is set to 4 but the script doesn't take it in consideration, it is defaulting to Open, the solution I found was to create another choice on the task table with the same name "Closed Cancelled" and then added the value 25 then changed the   script to gr.state = '25';, and it worked.



Best regards,


Bogdan