Skip to content

Commit

Permalink
changed flipper name and other style issues reported by the PR linter
Browse files Browse the repository at this point in the history
  • Loading branch information
SloopKoning committed Apr 26, 2024
1 parent 2b3dc71 commit 112ff76
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 84 deletions.
13 changes: 6 additions & 7 deletions app/sidekiq/central_mail/submit_form4142_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CentralMailResponseError < Common::Exceptions::BackendServiceException; e
bgjob_errors: bgjob_errors.merge(new_error)
)

api_statsd_key = if Flipper.enabled?(:disability_compensation_form_4142)
api_statsd_key = if Flipper.enabled?(:disability_compensation_form4142_supplemental)
LIGHTHOUSE_STATSD_KEY_PREFIX
else
CENTRAL_MAIL_STATSD_KEY_PREFIX
Expand Down Expand Up @@ -112,7 +112,7 @@ def processor
end

def upload_to_api
if Flipper.enabled?(:disability_compensation_form_4142)
if Flipper.enabled?(:disability_compensation_form4142_supplemental)
upload_to_lighthouse
else
upload_to_central_mail
Expand Down Expand Up @@ -144,7 +144,7 @@ def generate_metadata
'veteranFirstName' => vet_name[:first],
'veteranLastName' => vet_name[:last],
'zipCode' => determine_zip,
'source' => "Form526Submission va.gov",
'source' => 'Form526Submission va.gov',
'docType' => '4142',
'businessLine' => '',
'fileNumber' => filenumber # wipn8923 TODO: validate that this is correct
Expand All @@ -156,15 +156,14 @@ def generate_metadata

def determine_zip
submission.form.dig('form526', 'form526', 'veteran', 'currentMailingAddress', 'zipFirstFive') ||
submission.form.dig('form526', 'form526', 'veteran', 'mailingAddress', 'zipFirstFive') ||
'00000'
submission.form.dig('form526', 'form526', 'veteran', 'mailingAddress', 'zipFirstFive') ||
'00000'
end

def usa_based?
country = (
country =
submission.form.dig('form526', 'form526', 'veteran', 'currentMailingAddress', 'country') ||
submission.form.dig('form526', 'form526', 'veteran', 'mailingAddress', 'country')
)

%w[USA US].include?(country&.upcase)
end
Expand Down
2 changes: 1 addition & 1 deletion config/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ features:
actor_type: user
description: enables sending flashes to BGS for disability_compensation submissions.
enable_in_development: true
disability_compensation_form_4142:
disability_compensation_form4142_supplemental:
actor_type: user
description: Use Lighthouse API to submit supplemental Form 21-4142 from Form 526EZ submissions
enable_in_development: true
Expand Down
Loading

0 comments on commit 112ff76

Please sign in to comment.