diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a49cde5e..55b4b1ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [1.195.1](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.195.0...v1.195.1) (2024-10-01) + # [1.195.0](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.194.2...v1.195.0) (2024-10-01) ### Features diff --git a/app/backend/lib/emails/templates/assessmentAssigneeChange.ts b/app/backend/lib/emails/templates/assessmentAssigneeChange.ts index 1587ebf49..13d9d80aa 100644 --- a/app/backend/lib/emails/templates/assessmentAssigneeChange.ts +++ b/app/backend/lib/emails/templates/assessmentAssigneeChange.ts @@ -84,14 +84,14 @@ const assessmentAssigneeChange: EmailTemplateProvider = async ( }; }); return { - assignors: ccbcAssignorUserList[assignor], + assignors: ccbcAssignorUserList?.[assignor] || 'A CCBC Analyst', alerts, }; } ); // Get the list of assignors for the email const assignorList = Object.keys(assignmentsByAssignor).map( - (key) => ccbcAssignorUserList[key] + (key) => ccbcAssignorUserList?.[key] || 'A CCBC Analyst' ); return { diff --git a/app/components/AnalystDashboard/AssessmentAssignmentTable.tsx b/app/components/AnalystDashboard/AssessmentAssignmentTable.tsx index ecfe6a023..4201189fb 100644 --- a/app/components/AnalystDashboard/AssessmentAssignmentTable.tsx +++ b/app/components/AnalystDashboard/AssessmentAssignmentTable.tsx @@ -467,6 +467,10 @@ const AssessmentAssignmentTable: React.FC = ({ query }) => { application.allAssessments.edges, 'screening' ), + screeningNotification: findNotification( + application.assessmentNotifications.edges, + 'assignment_screening' + ), financialRiskAssessment: findAssessment( application.allAssessments.edges, 'financialRisk' @@ -509,6 +513,7 @@ const AssessmentAssignmentTable: React.FC = ({ query }) => { const assessmentChanged = jsonData?.assignedTo && + jsonData.assignedTo !== 'Unassigned' && jsonData.assignedTo !== notification?.jsonData?.to; if (new Date(updatedAt) >= lastNotificationSentAt && assessmentChanged) { @@ -537,10 +542,12 @@ const AssessmentAssignmentTable: React.FC = ({ query }) => { 'pm', 'projectManagement' ); + const screeningAssignment = createAssignment(application, 'screening'); if (techAssignment) assignmentsList.push(techAssignment); if (financialAssignment) assignmentsList.push(financialAssignment); if (pmAssignment) assignmentsList.push(pmAssignment); + if (screeningAssignment) assignmentsList.push(screeningAssignment); return assignmentsList; }, []); diff --git a/app/tests/backend/lib/emails/templates/assessmentAssigneeChange.test.ts b/app/tests/backend/lib/emails/templates/assessmentAssigneeChange.test.ts index bfa361db3..9ac41f22c 100644 --- a/app/tests/backend/lib/emails/templates/assessmentAssigneeChange.test.ts +++ b/app/tests/backend/lib/emails/templates/assessmentAssigneeChange.test.ts @@ -50,7 +50,7 @@ describe('assessmentAssigneeChange template', () => { }, { applicationId: 2, - assessmentType: 'technical', + assessmentType: 'screening', assignedTo: 'Tester 2', assigneeEmail: 'tester2@mail.com', ccbcNumber: 'CCBC-000002', @@ -106,8 +106,8 @@ describe('assessmentAssigneeChange template', () => { { ccbcNumber: 'CCBC-000002', applicationId: 2, - type: 'Technical assessment', - url: 'http://mock_host.ca/analyst/application/2/assessments/technical', + type: 'Eligibility Screening', + url: 'http://mock_host.ca/analyst/application/2/assessments/screening', }, ], assignors: 'Assignor 2', diff --git a/db/sqitch.plan b/db/sqitch.plan index 7ae0685d2..a537d77be 100644 --- a/db/sqitch.plan +++ b/db/sqitch.plan @@ -691,3 +691,4 @@ computed_columns/cbc_history 2024-09-03T15:16:07Z Anthony Bushara # release v1.194.1 @1.194.2 2024-10-01T17:35:28Z CCBC Service Account # release v1.194.2 @1.195.0 2024-10-01T18:17:16Z CCBC Service Account # release v1.195.0 +@1.195.1 2024-10-01T19:32:15Z CCBC Service Account # release v1.195.1 diff --git a/package.json b/package.json index cec9bfd0f..67eb9134d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "CONN-CCBC-portal", - "version": "1.195.0", + "version": "1.195.1", "main": "index.js", "repository": "https://github.com/bcgov/CONN-CCBC-portal.git", "author": "Romer, Meherzad CITZ:EX ",