From 004f2a07b352928e7d4a1584ef25e290774cd699 Mon Sep 17 00:00:00 2001 From: Jonathan Hooper Date: Wed, 20 Nov 2024 12:32:49 -0500 Subject: [PATCH] Start logging year-of-birth in biographical info hash In #11267 we quit logging the user's year-of-birth while we waited for additional security and privacy review. We received approval to start logging this attribute. This commit undoes the changes in #11267 so the year-of-birth is now logged [skip changelog] --- app/services/proofing/resolution/result_adjudicator.rb | 1 + spec/features/idv/analytics_spec.rb | 2 ++ spec/jobs/socure_shadow_mode_proofing_job_spec.rb | 2 ++ spec/services/proofing/resolution/result_adjudicator_spec.rb | 2 ++ 4 files changed, 7 insertions(+) diff --git a/app/services/proofing/resolution/result_adjudicator.rb b/app/services/proofing/resolution/result_adjudicator.rb index 09053d21216..908327ac585 100644 --- a/app/services/proofing/resolution/result_adjudicator.rb +++ b/app/services/proofing/resolution/result_adjudicator.rb @@ -123,6 +123,7 @@ def biographical_info StringRedacter.redact_alphanumeric(state_id_number) end { + birth_year: applicant_pii[:dob]&.to_date&.year, state: applicant_pii[:state], identity_doc_address_state: applicant_pii[:identity_doc_address_state], state_id_jurisdiction: applicant_pii[:state_id_jurisdiction], diff --git a/spec/features/idv/analytics_spec.rb b/spec/features/idv/analytics_spec.rb index dbe44ada457..b224ab7321e 100644 --- a/spec/features/idv/analytics_spec.rb +++ b/spec/features/idv/analytics_spec.rb @@ -116,6 +116,7 @@ }, }, biographical_info: { + birth_year: 1938, identity_doc_address_state: nil, state: 'MT', state_id_jurisdiction: 'ND', @@ -158,6 +159,7 @@ }, }, biographical_info: { + birth_year: 1938, identity_doc_address_state: 'ND', state: 'MT', state_id_jurisdiction: 'ND', diff --git a/spec/jobs/socure_shadow_mode_proofing_job_spec.rb b/spec/jobs/socure_shadow_mode_proofing_job_spec.rb index 9416a03e907..92e93072894 100644 --- a/spec/jobs/socure_shadow_mode_proofing_job_spec.rb +++ b/spec/jobs/socure_shadow_mode_proofing_job_spec.rb @@ -106,6 +106,7 @@ }, }, biographical_info: { + birth_year: 1938, identity_doc_address_state: nil, same_address_as_id: nil, state: 'MT', @@ -257,6 +258,7 @@ threatmetrix_review_status: 'pass', timed_out: false, biographical_info: { + birth_year: 1938, identity_doc_address_state: nil, same_address_as_id: nil, state: 'MT', diff --git a/spec/services/proofing/resolution/result_adjudicator_spec.rb b/spec/services/proofing/resolution/result_adjudicator_spec.rb index c63a10e4c0a..6e8aba8bbfb 100644 --- a/spec/services/proofing/resolution/result_adjudicator_spec.rb +++ b/spec/services/proofing/resolution/result_adjudicator_spec.rb @@ -102,6 +102,7 @@ result = subject.adjudicated_result expect(result.extra[:biographical_info]).to eq( + birth_year: 1938, state: 'MT', identity_doc_address_state: nil, state_id_jurisdiction: 'ND', @@ -118,6 +119,7 @@ result = subject.adjudicated_result expect(result.extra[:biographical_info]).to eq( + birth_year: 1938, state: 'MT', identity_doc_address_state: 'MT', state_id_jurisdiction: 'ND',