migration for faa applicant immigration information into top level model#6114
Open
satish2025-crew wants to merge 5 commits intotrunkfrom
Open
migration for faa applicant immigration information into top level model#6114satish2025-crew wants to merge 5 commits intotrunkfrom
satish2025-crew wants to merge 5 commits intotrunkfrom
Conversation
vkghub
requested changes
Mar 27, 2026
...grations/handlers/fa_application/fetch_applications_with_unpopulated_immigration_evidence.rb
Outdated
Show resolved
Hide resolved
...grations/handlers/fa_application/fetch_applications_with_unpopulated_immigration_evidence.rb
Outdated
Show resolved
Hide resolved
.../async_migrations/handlers/fa_application/populate_immigration_evidence_from_vlp_response.rb
Show resolved
Hide resolved
.../async_migrations/handlers/fa_application/populate_immigration_evidence_from_vlp_response.rb
Outdated
Show resolved
Hide resolved
...ync_migrations/handlers/fa_application/fetch_applications_without_immigration_information.rb
Outdated
Show resolved
Hide resolved
...grations/handlers/fa_application/fetch_applications_with_unpopulated_immigration_evidence.rb
Outdated
Show resolved
Hide resolved
...omain/operations/async_migrations/handlers/fa_application/migrate_immigration_information.rb
Show resolved
Hide resolved
...omain/operations/async_migrations/handlers/fa_application/migrate_immigration_information.rb
Outdated
Show resolved
Hide resolved
...omain/operations/async_migrations/handlers/fa_application/migrate_immigration_information.rb
Show resolved
Hide resolved
|
|
||
| applicant.build_immigration_information(attrs) | ||
| end | ||
|
|
Contributor
There was a problem hiding this comment.
can you compare migrated values here and push the status to CSV for reporting purposes? That way we can log or track what changed for each applicant (e.g., old_value -> new_value) rather than just that a change occurred — would make debugging and auditing easier.
Contributor
Author
There was a problem hiding this comment.
but here immigration information old value will be always nil as it is new model. Do we really need it?
vkghub
reviewed
Mar 27, 2026
|
|
||
| def publish(row) | ||
| csv_headers = [ | ||
| "Application HBX ID", |
Contributor
There was a problem hiding this comment.
can you also add application assistance year and application type, compared status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
lethelpers andbeforeblocks..html_safe.PR Type
What kind of change does this PR introduce?:
What is the ticket # detailing the issue?
Ticket: https://app.clickup.com/t/868hw0mvb
A brief description of the changes:
Current behavior: Immigration information present in FAA applicant
New behavior:
Adds new immigration_information model as part of the VLP upgrade to V37.1.2 project for separating immigration related information into a separate model for both Financial Assistance and Individual Market Applications.
Script 1: Migrate FAA flat fields → ImmigrationInformation
Copies vlp_subject, alien_number, i94_number, etc. from FAA applicants into the embedded top level ImmigrationInformation document.
bundle exec rails runner script/migrations/migrate_fa_applicant_immigration_information.rb 500 2025
Arg 1: batch_size (default 3000)
Arg 2: assistance_year (optional)
Script 2: Populate ImmigrationEvidence from VLP responses
Parses VLP JSON from request_results.raw_payload and writes response_code, lawful_presence_verified_code, five_year_bar_apply_code, etc. into ImmigrationEvidence fields.
For FAA applications
bundle exec rails runner script/migrations/populate_immigration_evidence_from_vlp_response.rb faa 500 2025
For QHP applications
bundle exec rails runner script/migrations/populate_immigration_evidence_from_vlp_response.rb qhp 500 2025
Arg 1: app_type — faa or qhp (default faa)
Arg 2: batch_size (default 3000)
Arg 3: assistance_year (optional)
Feature Flag
For all new feature development, a feature flag is required to control the exposure of the feature to our end users. A feature flag needs a corresponding environment variable to initialize the state of the flag. Please share the name of the environment variable below that would enable/disable the feature and indicate which client(s) it applies to.
Variable name:
Additional Context
Include any additional context that may be relevant to the peer review process.