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

kobotoolbox / kpi / 21144604344
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: DEV-1636-uuid-constants-for-tests
DEFAULT BRANCH: master
Ran 19 Jan 2026 04:55PM UTC
Jobs 2
Files 881
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

19 Jan 2026 04:20PM UTC coverage: 81.347% (+0.04%) from 81.311%
21144604344

push

github

web-flow
fix(organizations): remove duplicate organizations DEV-1491 (#6610)

### 📣 Summary
A user should only be a member of a single organization. This PR removes
any duplicate organizations associated with a user.


### 📖 Description
Certain accounts were inadvertently associated with multiple
organizations due to historical system behavior. This led to confusion
around ownership, permissions, and subscription management.

This PR introduces a long-running migration that ensures each user
remains part of exactly one organization going forward. When multiple
organizations are found for a user, the system keeps the most
appropriate one based on the following rules:

- Prefer multi-member organizations (MMO)
- If none are MMO, prefer the one with an active subscription
- Otherwise, keep the newest organization (based on creation date)
- Where safe, unused organizations are removed. 

In addition, this migration addresses two consistency issues that were
observed during cleanup:

1. Any projects that were still owned by the user (instead of the
organization) are now transferred to the owner of the kept organization,
aligning with the expected ownership model.

2. Organizations that are effectively multi-member but were not marked
as MMO will now have their `mmo_override` flag updated for consistency
to avoid future ambiguity in membership and billing flows.

After this migration completes, each user will belong to exactly one
organization, shared organizations remain intact, and project ownership
and MMO status are consistent with current system behavior.

7192 of 11272 branches covered (63.8%)

59 of 61 new or added lines in 1 file covered. (96.72%)

27763 of 34129 relevant lines covered (81.35%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
96.72
kobo/apps/long_running_migrations/jobs/0014_fix_duplicate_organizations.py
Jobs
ID Job ID Ran Files Coverage
1 21144604344.1 19 Jan 2026 04:55PM UTC 879
78.98
2 21144604344.2 19 Jan 2026 04:57PM UTC 881
81.31
Source Files on build 21144604344
  • Tree
  • List 881
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 323e0e14 on github
  • Prev Build on release/2.025.47 (#21142698800)
  • Next Build on release/2.025.47 (#21176368231)
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