Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbex/97956-separation-location-string: temporary - turn separation loccation code into string for saved claim #19632

Merged
merged 9 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -530,6 +530,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
Loading