• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 15303188704
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1257-remove-v1-forms-endpoint
DEFAULT BRANCH: master
Ran 28 May 2025 03:21PM UTC
Jobs 2
Files 653
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 May 2025 02:43PM UTC coverage: 81.072% (+0.009%) from 81.063%
15303188704

push

github

web-flow
feat(massEmails): enable recurring sends TASK-1693 (#5796)

### đŸ“Ŗ Summary
Turn on new process for recurring mass emails.



### 📖 Description
Allows the creation of regularly recurring emails for certain
conditions. Instead of just creating email configs and sending them the
next day with 'Add to daily send,' superusers specify a frequency for
how often a given individual should receive the email. One time sends
are still possible with a frequency of -1. Once a recurring email is
added to the daily send, beginning the next day, users matching the
query will be calculated every day and emails sent, filtering out those
who received the same email too recently.


### 💭 Notes
This PR does a lot of things at once, by necessity. 
1. Show 'frequency' and 'live' fields in admin
2. Update 'Add to daily send' to just toggle the 'live' field, doing
some additional checking to make sure we are not re-sending a one-time
send
3. Enables the new email send process, where one job calculates all the
users who will receive emails and the other actually sends them
4. Fix a bug where the process that actually sends emails would not run
if there were emails that were live but had no recipients that day
5. Update `generate_mass_email_user_lists` to make use of
`MASS_EMAILS_CONDENSE_SEND` for easier testing
6. Schedule the task that sends the emails to start a minute after the
task that enqueues them, otherwise the first run will always exit early
because no records will have been enqueued by then



### 👀 Preview steps
Use mailhog or file-backed email send for easier testing.

1. â„šī¸ have at least superuser account (other accounts may be useful as
well)
7. Make sure MASS_EMAILS_CONDENSE_SEND is True
8. In admin, add user emails to Constance > Config >
MASS_EMAIL_TEST_EMAILS
9. Create 3 new MassEmailConfigs, with the 'test_users' query and
frequencies of -1, 1, and 2. Don't check 'live'
10. Add all configs to the daily send
11. đŸŸĸ All 3 MassEmailConfigs should now show as liv... (continued)

6265 of 9927 branches covered (63.11%)

34 of 38 new or added lines in 4 files covered. (89.47%)

1 existing line in 1 file now uncovered.

23896 of 29475 relevant lines covered (81.07%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
76.33
-0.2% kobo/settings/base.py
3
94.03
-0.87% kobo/apps/mass_emails/tasks.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.03
-0.87% kobo/apps/mass_emails/tasks.py
Jobs
ID Job ID Ran Files Coverage
1 15303188704.1 28 May 2025 03:21PM UTC 653
78.97
2 15303188704.2 28 May 2025 03:22PM UTC 653
81.05
Source Files on build 15303188704
  • Tree
  • List 653
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 4e06f221 on github
  • Prev Build on main (#15281393857)
  • Next Build on main (#15308977247)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc