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

Respect survey schedules before sending SMS #2380

Merged
merged 8 commits into from
Mar 26, 2025

Conversation

mverzilli
Copy link
Contributor

@mverzilli mverzilli commented Mar 5, 2025

Fixes #2283

The fix involves adding not_before and not_after fields to ChannelBroker.ask (aka, sms, btw why don't we rename this??), and honoring them (it was only sent with ChannelBroker.setup (aka, 'ivr', ditto).

The way to honor those fields involves:

  • Making sure they get also saved in the queue (previously only for IVR, nil for SMS)
  • Add expiration checks for SMS when ChannelBroker dequeues
  • Mark contact attempts as expired accordingly (so it gets picked up the next day)

Pending work:

  • Make it work
  • Make it nice (aka refactor)
  • Future proof (add some more test cases)
  • Update docs with new behaviors

Updated wiki:

https://github.com/instedd/surveda/wiki/Chart:-Start-Survey-(with-Channel-Broker)/565d79ddc3ac0b23f322a6584eac6604b533793e

Copy link
Member

@matiasgarciaisaia matiasgarciaisaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@mverzilli mverzilli merged commit 83f8f28 into main Mar 26, 2025
2 checks passed
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.

Respect Survey schedule when sending SMS messages
2 participants