Skip to content

Commit

Permalink
namepace update from CentralMail to BenefitsIntake (#19595)
Browse files Browse the repository at this point in the history
* namepace update from CentralMail to BenefitsIntake

* updated remaining CentralMail items

* fixed linting

* removes rubocop disable from monitor spec

* removed rubocop disable
  • Loading branch information
mreed101 authored Dec 27, 2024
1 parent 21d25ec commit 055dac4
Show file tree
Hide file tree
Showing 14 changed files with 358 additions and 308 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ app/serializers/async_transaction @department-of-veterans-affairs/vfs-authentica
app/serializers/async_transaction/base_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/attachment_serializer.rb @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
app/serializers/backend_statuses_serializer.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/benefits_intake_submission_serializer.rb @department-of-veterans-affairs/backend-review-group
app/serializers/category_serializer.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/cemetery_serializer.rb @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/central_mail_submission_serializer.rb @department-of-veterans-affairs/backend-review-group
app/serializers/communication_groups_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/contact_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/vfs-mhv-integration @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/decision_review_evidence_attachment_serializer.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -618,7 +618,6 @@ app/sidekiq/benefits_intake_remediation_status_job.rb @department-of-veterans-af
app/sidekiq/benefits_intake_status_job.rb @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/bgs @department-of-veterans-affairs/benefits-dependents-management @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/central_mail/submit_form4142_job.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/central_mail/submit_central_form686c_job.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-dependents-management
app/sidekiq/copay_notifications @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group
app/sidekiq/cypress_viewport_updater @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
app/sidekiq/decision_review @department-of-veterans-affairs/benefits-decision-reviews-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1762,6 +1761,7 @@ spec/serializers/appointment_serializer_spec.rb @department-of-veterans-affairs/
spec/serializers/async_transaction/base_serializer_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/attachment_serializer_spec.rb @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
spec/serializers/backend_statuses_serializer_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/benefits_intake_submission_serializer_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/benefits-dependents-management
spec/serializers/category_serializer_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/central_mail_submission_serializer_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/cemetery_serializer_spec.rb @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/claims_base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create

def show
submission = CentralMailSubmission.joins(:central_mail_claim).find_by(saved_claims: { guid: params[:id] })
render json: CentralMailSubmissionSerializer.new(submission)
render json: BenefitsIntakeSubmissionSerializer.new(submission)
end

private
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class CentralMailSubmissionSerializer
class BenefitsIntakeSubmissionSerializer
include JSONAPI::Serializer

attribute :state
Expand Down
8 changes: 5 additions & 3 deletions app/services/bgs/dependent_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ def submit_to_central_service(claim:)
vet_info = JSON.parse(claim.form)['dependents_application']

user = BGS::SubmitForm686cJob.generate_user_struct(vet_info)
CentralMail::SubmitCentralForm686cJob.perform_async(claim.id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json))
Lighthouse::BenefitsIntake::SubmitCentralForm686cJob.perform_async(
claim.id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json)
)
end

def external_key
Expand Down
19 changes: 14 additions & 5 deletions app/sidekiq/bgs/submit_form674_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,22 @@ def self.generate_user_struct(encrypted_user_struct, vet_info)

def self.send_backup_submission(encrypted_user_struct_hash, vet_info, saved_claim_id, user_uuid)
user = generate_user_struct(encrypted_user_struct_hash, vet_info)
CentralMail::SubmitCentralForm686cJob.perform_async(saved_claim_id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json))
Lighthouse::BenefitsIntake::SubmitCentralForm686cJob.perform_async(
saved_claim_id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json)
)
InProgressForm.destroy_by(form_id: FORM_ID, user_uuid:)
rescue => e
Rails.logger.warn('BGS::SubmitForm674Job backup submission failed...',
{ user_uuid:, saved_claim_id:, error: e.message, nested_error: e.cause&.message })
Rails.logger.warn(
'BGS::SubmitForm674Job backup submission failed...',
{
user_uuid: user_uuid,
saved_claim_id: saved_claim_id,
error: e.message,
nested_error: e.cause&.message
}
)
InProgressForm.find_by(form_id: FORM_ID, user_uuid:)&.submission_pending!
end

Expand Down
8 changes: 5 additions & 3 deletions app/sidekiq/bgs/submit_form686c_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ def self.generate_user_struct(vet_info)

def self.send_backup_submission(vet_info, saved_claim_id, user_uuid)
user = generate_user_struct(vet_info)
CentralMail::SubmitCentralForm686cJob.perform_async(saved_claim_id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json))
Lighthouse::BenefitsIntake::SubmitCentralForm686cJob.perform_async(
saved_claim_id,
KmsEncrypted::Box.new.encrypt(vet_info.to_json),
KmsEncrypted::Box.new.encrypt(user.to_h.to_json)
)
InProgressForm.destroy_by(form_id: FORM_ID, user_uuid:)
rescue => e
Rails.logger.warn('BGS::SubmitForm686cJob backup submission failed...',
Expand Down
278 changes: 0 additions & 278 deletions app/sidekiq/central_mail/submit_central_form686c_job.rb

This file was deleted.

Loading

0 comments on commit 055dac4

Please sign in to comment.