Skip to content

Commit

Permalink
Merge pull request #1771 from bcgov/feature/ALCS-2013
Browse files Browse the repository at this point in the history
Fix notification trigger statuses
  • Loading branch information
trslater authored Jun 25, 2024
2 parents 4bd93a9 + d08d08f commit 39d0455
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ export class NotificationSubmissionService {
subject: `Agricultural Land Commission SRW${submission.fileNumber} (${submission.applicant})`,
parentType: PARENT_TYPE.NOTIFICATION,
parentId: templateData.parentId,
triggerStatus: NOTIFICATION_STATUS.SUBMITTED_TO_ALC,
cc: templateData.cc,
attachments: [document.document],
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddNotificationTriggerStatuses1719348665533
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
queryRunner.query(`
UPDATE alcs.email_status es
SET trigger_status = 'SUBM'
WHERE es.parent_type = 'notification'
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
// N/A
}
}

0 comments on commit 39d0455

Please sign in to comment.