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

kobotoolbox / kpi / 14889650028
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1452-new_action
DEFAULT BRANCH: master
Ran 07 May 2025 06:10PM UTC
Jobs 2
Files 654
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

07 May 2025 05:34PM UTC coverage: 80.853% (+0.02%) from 80.836%
14889650028

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)

6194 of 9859 branches covered (62.83%)

6 of 12 new or added lines in 1 file covered. (50.0%)

23664 of 29268 relevant lines covered (80.85%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
48.33
4.39% kobo/apps/mass_emails/user_queries.py
Jobs
ID Job ID Ran Files Coverage
1 14889650028.1 07 May 2025 06:10PM UTC 654
78.73
2 14889650028.2 07 May 2025 06:12PM UTC 654
80.83
Source Files on build 14889650028
  • 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 Repo
  • 0ce3758a on github
  • Prev Build on main (#14886885491)
  • Next Build on main (#14913522443)
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