Skip to content

Commit

Permalink
dbex/97956-separation-location-string: temporary - turn separation lo…
Browse files Browse the repository at this point in the history
…ccation code into string for saved claim (#19632)

* dbex/97956-separation-location-string: temporary - turn separation location code into string for saved claim

* dbex/97956-separation-location-string: temporary - turn separation location code into string for saved claim

* dbex/97956-separation-location-string: temporary - turn separation location code into string for saved claim

* dbex/97956-separation-location-string: temporary - turn separation location code into string for saved claim

* dbex/97956-separation-location-string: enter flipper flag: disability_compensation_temp_separation_location_code_string

* dbex/97956-separation-location-string: enter flipper flag: disability_compensation_temp_separation_location_code_string

* dbex/97956-separation-location-string: enter flipper flag: disability_compensation_temp_separation_location_code_string

* dbex/97956-separation-location-string: enter flipper flag: disability_compensation_temp_separation_location_code_string

* dbex/97956-separation-location-string: enter flipper flag: disability_compensation_temp_separation_location_code_string
  • Loading branch information
aurora-a-k-a-lightning authored Nov 27, 2024
1 parent 9a4c388 commit 4b8a7d8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/controllers/v0/disability_compensation_forms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def suggested_conditions
end

def submit_all_claim
temp_separation_location_fix if Flipper.enabled?(:disability_compensation_temp_separation_location_code_string,
@current_user)

saved_claim = SavedClaim::DisabilityCompensation::Form526AllClaim.from_hash(form_content)
saved_claim.save ? log_success(saved_claim) : log_failure(saved_claim)
submission = create_submission(saved_claim)
Expand Down Expand Up @@ -172,5 +175,20 @@ def missing_disabilities?(submission)
end
false
end

# TEMPORARY
# Turn separation location into string
# 11/18/2024 BRD EVSS -> Lighthouse migration caused separation location to turn into an integer,
# while SavedClaim (vets-json-schema) is expecting a string
def temp_separation_location_fix
if form_content.is_a?(Hash) && form_content['form526'].is_a?(Hash)
separation_location_code = form_content.dig('form526', 'serviceInformation', 'separationLocation')
unless separation_location_code.nil?
form_content['form526']['serviceInformation']['separationLocation']['separationLocationCode'] =
separation_location_code.to_s
end
end
end
# END TEMPORARY
end
end
3 changes: 3 additions & 0 deletions config/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,9 @@ features:
actor_type: user
description: enables sending flashes to BGS for disability_compensation submissions.
enable_in_development: true
disability_compensation_temp_separation_location_code_string:
actor_type: user
description: enables forcing separation location code to be a string in submit_all_claim endpoint.
disability_compensation_form4142_supplemental:
actor_type: user
description: Use Lighthouse API to submit supplemental Form 21-4142 from Form 526EZ submissions
Expand Down

0 comments on commit 4b8a7d8

Please sign in to comment.