Hi community i struggled a lot to try to find a root cause with no success. I try to count number of test failed , number of test succees for requirements.
I m using table transfomer to do some sl request on a table
I have the following request :SELECT T1.'Requirement',
SELECT T1.'Requirement',
COUNT(DISTINCT 'Tests') AS 'Number of Tests',
COUNT(DISTINCT('Bugs')) AS 'NbBugs',
COUNT(DISTINCT CASE WHEN COALESCE('T1.TestStatut','' ) AND INSTR('T1.TestStatut', "FAIL")>0 then 'T1.TestStatut' END) AS 'Failed' // i m searching for (FAIL TEST-ID string) to count number of distinct failed tests
FROM T1
GROUP BY T1.'Requirement'
If i have the and clause then i 'm facing athis error : TypeError: Cannot read properties of undefined (reading 'indexOf').
So i thought it was due to the fact that sometimes TestStatus can we empty (or null) reason why i added the COALESCE('T1.TestStatut','' ) clause to have always something not empty in th teststaus .
Now if i remove the INSTR() function i don't have the error ...
original table looks like this
Requirement, Bug-ID, Tests,Bugs ,TestStatus (FAIL/PASS/TODO)