From e87ac15cc1d92bab378cf5704ef930abb7787be0 Mon Sep 17 00:00:00 2001 From: aditya Date: Tue, 19 Sep 2023 14:38:50 -0400 Subject: [PATCH] fix: ensure archive_date is captured always (#1942) most grants have a pre-determined archive date and having this be behind a filter that enforces the date has to be <= today eliminates any ability of us to capture these dates --- packages/server/src/lib/grants-ingest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/lib/grants-ingest.js b/packages/server/src/lib/grants-ingest.js index 2b216368c..14ed7cabf 100644 --- a/packages/server/src/lib/grants-ingest.js +++ b/packages/server/src/lib/grants-ingest.js @@ -50,9 +50,9 @@ function mapSourceDataToGrant(source) { grant.open_date = milestones.post_date; grant.close_date = milestones.close && milestones.close.date ? milestones.close.date : '2100-01-01'; + grant.archive_date = milestones.archive_date; const today = moment().startOf('day'); if (milestones.archive_date && today.isSameOrAfter(moment(milestones.archive_date), 'date')) { - grant.archive_date = milestones.archive_date; grant.opportunity_status = 'archived'; } else if (today.isSameOrAfter(moment(grant.close_date), 'date')) { grant.opportunity_status = 'closed';