Fix measure count queries missing category column
CountByRiskID and CountByControlID CTEs did not include m.category in their SELECT lists, causing "column category does not exist" errors when MeasureFilter applied category constraints. Added m.category to both CTEs. Also add comprehensive e2e tests for measure filtering by category at organization, risk, and control levels. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -84,7 +84,8 @@ WITH msrs AS (
|
||||
m.id,
|
||||
m.tenant_id,
|
||||
m.search_vector,
|
||||
m.state
|
||||
m.state,
|
||||
m.category
|
||||
FROM
|
||||
measures m
|
||||
INNER JOIN
|
||||
@@ -195,7 +196,8 @@ WITH mtgtns AS (
|
||||
m.id,
|
||||
m.tenant_id,
|
||||
m.search_vector,
|
||||
m.state
|
||||
m.state,
|
||||
m.category
|
||||
FROM
|
||||
measures m
|
||||
INNER JOIN
|
||||
|
||||
Reference in New Issue
Block a user