diff --git a/app/models/form_profile.rb b/app/models/form_profile.rb index 3035ef5c188..c60806be202 100644 --- a/app/models/form_profile.rb +++ b/app/models/form_profile.rb @@ -285,11 +285,13 @@ def initialize_contact_information Rails.logger.info("User Vet360 Contact Info, Address? #{opt[:address].present?} Email? #{opt[:email].present?}, Phone? #{opt[:home_phone].present?}") - opt[:address] ||= user_address_hash - opt[:email] ||= extract_pciu_data(:pciu_email) - if opt[:home_phone].nil? - opt[:home_phone] = pciu_primary_phone - opt[:us_phone] = pciu_us_phone + unless Flipper.enabled?('remove_pciu_2', user) + opt[:address] ||= user_address_hash + opt[:email] ||= extract_pciu_data(:pciu_email) + if opt[:home_phone].nil? + opt[:home_phone] = pciu_primary_phone + opt[:us_phone] = pciu_us_phone + end end format_for_schema_compatibility(opt) diff --git a/config/features.yml b/config/features.yml index 561628c9f0e..46964bd66b6 100644 --- a/config/features.yml +++ b/config/features.yml @@ -1937,7 +1937,10 @@ features: enabled_in_development: true remove_pciu: actor_type: user - description: If enabled, VA Profile is used to populate contact information- without PCIU calls (status quo) + description: If enabled, VA Profile is used to populate contact information with PCIU backup calls + remove_pciu_2: + actor_type: user + description: If enabled, removes all PCIU requests in form pre-fill. show_yellow_ribbon_table: actor_type: user description: Used to show yellow ribbon table in Comparison Tool @@ -1978,4 +1981,4 @@ features: is_updated_gi: actor_type: user description: If enabled, use updated gi design - + diff --git a/spec/models/form_profile_spec.rb b/spec/models/form_profile_spec.rb index 49ed7533aab..89435c7758d 100644 --- a/spec/models/form_profile_spec.rb +++ b/spec/models/form_profile_spec.rb @@ -13,6 +13,9 @@ before do stub_evss_pciu(user) described_class.instance_variable_set(:@mappings, nil) + Flipper.disable(:va_v3_contact_information_service) + Flipper.disable(:remove_pciu) + Flipper.disable('remove_pciu_2') Flipper.disable(:disability_526_toxic_exposure) Flipper.disable(ApiProviderFactory::FEATURE_TOGGLE_PPIU_DIRECT_DEPOSIT) end