Skip to content

Commit 080bc0c

Browse files
authored
DEMOS-1815-missing-column (#1461)
Forgot the primary policy technical director for this report, fixing that
1 parent f745e8e commit 080bc0c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

server/src/onDemandReports/configs/demonstrationOverviewReportConfig.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ type DemonstrationOverviewReportColumn =
2929
| "approved_amendment_applications"
3030
| "primary_project_officer"
3131
| "project_officers"
32+
| "primary_policy_tech_director"
3233
| "primary_ddme_analyst"
3334
| "ddme_analysts"
3435
| "primary_state_poc"
@@ -53,6 +54,7 @@ export const demonstrationOverviewReportSchema = z
5354
approved_amendment_applications: z.int(),
5455
primary_project_officer: z.string(),
5556
project_officers: z.string(),
57+
primary_policy_tech_director: z.string(),
5658
primary_ddme_analyst: z.string(),
5759
ddme_analysts: z.string(),
5860
primary_state_poc: z.string(),
@@ -78,6 +80,7 @@ export const demonstrationOverviewReportColumnHeaders = {
7880
approved_amendment_applications: "Approved Amendment Applications",
7981
primary_project_officer: "Primary Project Officer",
8082
project_officers: "Project Officers",
83+
primary_policy_tech_director: "Primary Policy Technical Director",
8184
primary_ddme_analyst: "Primary DDME Analyst",
8285
ddme_analysts: "DDME Analysts",
8386
primary_state_poc: "Primary State POC",

server/src/onDemandReports/configs/demonstrationOverviewReportQueries.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ SELECT
7777
coalesce(active_approved_amendments.approved_amendment_applications::INT, 0) AS approved_amendment_applications,
7878
primary_project_officer.full_name AS primary_project_officer,
7979
coalesce(project_officers.people_assigned, '-') AS project_officers,
80+
coalesce(primary_policy_tech_director.full_name, '-') AS primary_policy_tech_director,
8081
coalesce(primary_ddme_analyst.full_name, '-') AS primary_ddme_analyst,
8182
coalesce(ddme_analysts.people_assigned, '-') AS ddme_analysts,
8283
coalesce(primary_state_poc.full_name, '-') AS primary_state_poc,
@@ -121,6 +122,14 @@ LEFT JOIN
121122
demo.id = project_officers.demonstration_id
122123
AND project_officers.role_id = 'Project Officer'
123124
125+
-- Not all demonstrations have a primary policy technical director
126+
LEFT JOIN
127+
role_assignments AS primary_policy_tech_director
128+
ON
129+
demo.id = primary_policy_tech_director.demonstration_id
130+
AND primary_policy_tech_director.role_id = 'Policy Technical Director'
131+
AND primary_policy_tech_director.is_primary
132+
124133
-- Not all demonstrations have a primary DDME Analyst
125134
-- However, only ever one primary at a time
126135
LEFT JOIN

0 commit comments

Comments
 (0)