diff --git a/Gemfile.lock b/Gemfile.lock index be296954a8a..af57e7cd71b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -813,9 +813,9 @@ GEM rchardet (1.8.0) rdoc (6.6.3.1) psych (>= 4.0.0) - redis (5.1.0) - redis-client (>= 0.17.0) - redis-client (0.20.0) + redis (5.2.0) + redis-client (>= 0.22.0) + redis-client (0.22.0) connection_pool redis-namespace (1.11.0) redis (>= 4) diff --git a/config/features.yml b/config/features.yml index 7011dffe9f1..a97c1e93cb7 100644 --- a/config/features.yml +++ b/config/features.yml @@ -152,10 +152,6 @@ features: actor_type: user description: Enables the unified experience version of the landing page. enable_in_development: true - check_in_experience_travel_claim_redis_client_refactor: - actor_type: user - description: Uses the refactored code for Travel Claim Redis client to fetch attributes - enable_in_development: true claim_letters_access: actor_type: user description: Enables users to access the claim letters page diff --git a/modules/check_in/app/services/travel_claim/redis_client.rb b/modules/check_in/app/services/travel_claim/redis_client.rb index 0625182f995..4df98536115 100644 --- a/modules/check_in/app/services/travel_claim/redis_client.rb +++ b/modules/check_in/app/services/travel_claim/redis_client.rb @@ -33,53 +33,23 @@ def save_token(token:) end def icn(uuid:) - if Flipper.enabled?('check_in_experience_travel_claim_redis_client_refactor') - return fetch_attribute(uuid:, attribute: :icn) - end - - return nil if appointment_identifiers(uuid:).nil? - - Oj.load(appointment_identifiers(uuid:)).with_indifferent_access.dig(:data, :attributes, :icn) + fetch_attribute(uuid:, attribute: :icn) end def mobile_phone(uuid:) - if Flipper.enabled?('check_in_experience_travel_claim_redis_client_refactor') - return fetch_attribute(uuid:, attribute: :mobilePhone) - end - - return nil if appointment_identifiers(uuid:).nil? - - Oj.load(appointment_identifiers(uuid:)).with_indifferent_access.dig(:data, :attributes, :mobilePhone) + fetch_attribute(uuid:, attribute: :mobilePhone) end def patient_cell_phone(uuid:) - if Flipper.enabled?('check_in_experience_travel_claim_redis_client_refactor') - return fetch_attribute(uuid:, attribute: :patientCellPhone) - end - - return nil if appointment_identifiers(uuid:).nil? - - Oj.load(appointment_identifiers(uuid:)).with_indifferent_access.dig(:data, :attributes, :patientCellPhone) + fetch_attribute(uuid:, attribute: :patientCellPhone) end def station_number(uuid:) - if Flipper.enabled?('check_in_experience_travel_claim_redis_client_refactor') - return fetch_attribute(uuid:, attribute: :stationNo) - end - - return nil if appointment_identifiers(uuid:).nil? - - Oj.load(appointment_identifiers(uuid:)).with_indifferent_access.dig(:data, :attributes, :stationNo) + fetch_attribute(uuid:, attribute: :stationNo) end def facility_type(uuid:) - if Flipper.enabled?('check_in_experience_travel_claim_redis_client_refactor') - return fetch_attribute(uuid:, attribute: :facilityType) - end - - return nil if appointment_identifiers(uuid:).nil? - - Oj.load(appointment_identifiers(uuid:)).with_indifferent_access.dig(:data, :attributes, :facilityType) + fetch_attribute(uuid:, attribute: :facilityType) end def fetch_attribute(uuid:, attribute:) diff --git a/modules/check_in/spec/services/travel_claim/redis_client_spec.rb b/modules/check_in/spec/services/travel_claim/redis_client_spec.rb index 53a1b5a4d75..9763f2ed55c 100644 --- a/modules/check_in/spec/services/travel_claim/redis_client_spec.rb +++ b/modules/check_in/spec/services/travel_claim/redis_client_spec.rb @@ -30,9 +30,6 @@ before do allow(Rails).to receive(:cache).and_return(memory_store) - allow(Flipper).to receive(:enabled?).with('check_in_experience_travel_claim_redis_client_refactor') - .and_return(false) - Rails.cache.clear end @@ -201,23 +198,7 @@ ) end - context 'when cache exists and refactor feature flag is off' do - before do - allow(Flipper).to receive(:enabled?).with('check_in_experience_travel_claim_redis_client_refactor') - .and_return(false) - end - - it 'returns the cached value' do - expect(redis_client.facility_type(uuid:)).to eq(facility_type) - end - end - - context 'when cache exists and refactor feature flag is on' do - before do - allow(Flipper).to receive(:enabled?).with('check_in_experience_travel_claim_redis_client_refactor') - .and_return(true) - end - + context 'when cache exists' do it 'returns the cached value' do expect(redis_client.facility_type(uuid:)).to eq(facility_type) end diff --git a/modules/simple_forms_api/app/form_mappings/vba_20_10207.json.erb b/modules/simple_forms_api/app/form_mappings/vba_20_10207.json.erb index dcbb0119b2e..776c194bfc3 100644 --- a/modules/simple_forms_api/app/form_mappings/vba_20_10207.json.erb +++ b/modules/simple_forms_api/app/form_mappings/vba_20_10207.json.erb @@ -49,6 +49,7 @@ "form1[0].#subform[3].CheckBox1[1]": "<%= nil %>", "form1[0].#subform[3].Email_Address[3]": "<%= nil %>", "form1[0].#subform[3].VA_File_Number_If_Applicable[1]": "<%= form.data.dig('veteran_id', 'va_file_number') %>", + "form1[0].#subform[3].CurrentlyHomeless[0]": "<%= form.data.dig('living_situation', 'none') ? 1 : 0 %>", "form1[0].#subform[4].I_Live_Or_Sleep_In_A_Place_That_Is_Not_Meant_For_Regular_Sleeping[0]": "<%= form.data.dig('living_situation', 'overnight') ? 1 : 0 %>", "form1[0].#subform[4].I_Live_In_A_Shelter[0]": "<%= form.data.dig('living_situation', 'shelter') ? 1 : 0 %>", @@ -57,10 +58,8 @@ "form1[0].#subform[4].IN_THE_NEXT_30_DAYS_I_WILL_LOSE_MY_HOME[0]": "<%= form.data.dig('living_situation', 'losing_home') ? 1 : 0 %>", "form1[0].#subform[4].NONE_OF_THESE_SITUATIONS_APPLY_TO_ME[0]": "<%= form.data.dig('living_situation', 'none') ? 1 : 0 %>", "form1[0].#subform[4].OTHER_Specify[0]": "<%= form.data.dig('living_situation', 'other_risk') ? 1 : 0 %>", - - "form1[0].#subform[3].CurrentlyHomeless[0]": "<%= form.data.dig('living_situation', 'none') ? 1 : 0 %>", + "form1[0].#subform[4].Other1[0]": "<%= form.data['other_housing_risks'] %>", - "form1[0].#subform[3].Other1[0]": "<%= form.data['other_housing_risks'] %>", "form1[0].#subform[4].Veterans_SocialSecurityNumber_LastFourNumbers[1]": "<%= form.data.dig('veteran_id', 'ssn')&.[](5..8) %>", "form1[0].#subform[4].Veterans_SocialSecurityNumber_SecondTwoNumbers[1]": "<%= form.data.dig('veteran_id', 'ssn')&.[](3..4) %>", "form1[0].#subform[4].Veterans_SocialSecurityNumber_FirstThreeNumbers[1]": "<%= form.data.dig('veteran_id', 'ssn')&.[](0..2) %>", diff --git a/modules/simple_forms_api/app/services/simple_forms_api/pdf_stamper.rb b/modules/simple_forms_api/app/services/simple_forms_api/pdf_stamper.rb index c2e708d80cc..02988c59632 100644 --- a/modules/simple_forms_api/app/services/simple_forms_api/pdf_stamper.rb +++ b/modules/simple_forms_api/app/services/simple_forms_api/pdf_stamper.rb @@ -37,8 +37,7 @@ def self.stamp_auth_text(stamped_template_path, current_loa) end coords = [10, 10] text = SUBMISSION_TEXT + current_time - page = 0 - desired_stamp = { coords:, text:, page: } + desired_stamp = { coords:, text: } verify(stamped_template_path) do stamp(desired_stamp, stamped_template_path, append_to_stamp: auth_text, text_only: false) end diff --git a/modules/simple_forms_api/spec/fixtures/form_json/vba_20_10207-veteran.json b/modules/simple_forms_api/spec/fixtures/form_json/vba_20_10207-veteran.json index 05ec5f3be90..dde9552118f 100644 --- a/modules/simple_forms_api/spec/fixtures/form_json/vba_20_10207-veteran.json +++ b/modules/simple_forms_api/spec/fixtures/form_json/vba_20_10207-veteran.json @@ -11,7 +11,8 @@ }, "living_situation": { "overnight": true, - "losing_home": true + "losing_home": true, + "other_risk": true }, "other_housing_risks": "Other housing risks", "mailing_address_yes_no": true,