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

kobotoolbox / kpi / 14889650028 / 2
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1453-run-external-process
DEFAULT BRANCH: master
Ran 07 May 2025 06:12PM UTC
Files 654
Run time 18s
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

07 May 2025 05:34PM UTC coverage: 80.832% (+0.02%) from 80.816%
14889650028.2

push

github

web-flow
fix(massEmails): fix 500 from usage queries (#5740)

### 📣 Summary
Fixes a 500 error when trying to add usage-query-dependent emails to the
daily send.


### 💭 Notes
The usage queries were returning a list of uids rather than a list of
users. We didn't catch this earlier because we usually tested with the
inactive user query, which was easier to manipulate and returned a list
of users. The unit tests also focused on the base method,
`get_users_within_range_of_usage_limit`, where most of the logic
actually happened.


### 👀 Preview steps


Bug template:
1. ℹ️ have 2 user accounts each with a project with an audio question
2. ℹ️ make sure stripe is enabled. Both users should be on the community
plan
3.  ℹ️ enable NLP
4. You may want to configure your environment to use `EMAIL_BACKEND:
'django.core.mail.backends.filebased.EmailBackend'` to more easily see
which emails are sent
5. set MASS_EMAILS_CONDENSE_SEND to True either by configuring your
build environment or manually updating kobo/settings/base.py locally
6. In django admin, update the Community product metadata with
`"submission_limit": "10", "nlp_character_limit": "10",
"storage_bytes_limit": "1030700"`
7. In django admin, create a MassEmailConfig for each query *except*
users_inactive_for_365_days
8. For user1/project1, create 9 submissions using
[sample-6s-14_44_13.zip](https://github.com/user-attachments/files/20071865/sample-6s-14_44_13.zip)
as the audio sample (unzipped)
9. For one of these submissions, add a 9-letter word as a transcription
(eg "pineapple") and get an automated translation into whatever language
10. For user2/project2, create 10 submissions using the same sample
11. For one of these submissions, add a 9-letter word as a transcription
(eg "manticores") and get an automated translation into whatever
language
12. In django admin, add each MassEmailConfig to the daily send (go one
by one rather than in bulk)
13. :red_circle: [on main] Each attempt will result in a 500
14. :gree... (continued)

6240 of 9916 branches covered (62.93%)

23658 of 29268 relevant lines covered (80.83%)

0.81 hits per line

Source Files on job 14889650028.2
  • Tree
  • List 654
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 14889650028
  • 0ce3758a on github
  • Prev Job for on main (#14886885491.2)
  • Next Job for on main (#14913522443.2)
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

© 2026 Coveralls, Inc