pyAgeByWorkQueue is not calculating correctly
I'm running pyAgeByWorkQueue report definition on Pega 8.5 and it's not calculating the Past Goal count correctly. The SQL generated by the function appears to be correct, but the database is returning "1" for CASE WHEN (("PC0"."pxgoalexecute"::TIMESTAMP IS NOT NULL) AND ("PC0"."pxdeadlineexecute"::TIMESTAMP IS NULL)) even when pxgoalexecute is NULL.
Any clue is appreciated.