diff --git a/awx/main/analytics/collectors.py b/awx/main/analytics/collectors.py index ee52dece89..e4ad01f5ec 100644 --- a/awx/main/analytics/collectors.py +++ b/awx/main/analytics/collectors.py @@ -338,6 +338,7 @@ def _events_table(since, full_path, until, tbl, where_column, project_job_create {tbl}.event, task_action, resolved_action, + resolved_role, -- '-' operator listed here: -- https://www.postgresql.org/docs/12/functions-json.html -- note that operator is only supported by jsonb objects @@ -357,7 +358,7 @@ def _events_table(since, full_path, until, tbl, where_column, project_job_create x.duration AS duration, x.res->'warnings' AS warnings, x.res->'deprecations' AS deprecations - FROM {tbl}, jsonb_to_record({event_data}) AS x("res" json, "duration" text, "task_action" text, "resolved_action" text, "start" text, "end" text) + FROM {tbl}, jsonb_to_record({event_data}) AS x("res" json, "duration" text, "task_action" text, "resolved_action" text, "resolved_role" text, "start" text, "end" text) WHERE ({tbl}.{where_column} > '{since.isoformat()}' AND {tbl}.{where_column} <= '{until.isoformat()}')) TO STDOUT WITH CSV HEADER''' return query