Skip to content

Update script to handle beta testing users and update opted in logic#681

Merged
erikh360 merged 1 commit intodevelopfrom
update-migration-script
Feb 25, 2026
Merged

Update script to handle beta testing users and update opted in logic#681
erikh360 merged 1 commit intodevelopfrom
update-migration-script

Conversation

@erikh360
Copy link
Contributor

This pull request introduces support for importing beta testing users as opted out during the migration process and adds a migration key to identify the batch of migrated users. The changes ensure that the opt-in status can be overridden for specific migrations and that tests cover this new behavior.

Migration logic enhancements:

  • Added IMPORT_AS_OPTED_OUT and MIGRATION_KEY flags in fetch_rapidpro_contacts.py to allow importing users as opted out and tagging them with a migration batch key.
  • Modified the process_opted_in function to accept an override parameter, ensuring users are imported as opted out when required.
  • Updated the contact field processing logic to use the override flag and include the migration key in user data. [1] [2]

Testing improvements:

  • Added and updated tests in test_fetch_rapidpro_contacts.py to verify that the opt-in override and migration key are correctly applied and exported. [1] [2] [3] [4] [5]
  • Added a test in test_process_fields.py to confirm that the override always sets opted_in to false, regardless of input.

@erikh360 erikh360 merged commit 86c7aeb into develop Feb 25, 2026
2 checks passed
@erikh360 erikh360 deleted the update-migration-script branch February 25, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants