Insights are showing multiple persons with 'is_organization_first_user' as true within the same organization
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Description
Bug description
I have an insight where I have filtered to show only the first users from an organization:
However, the insight results will show me multiple users from that organization. And when you click into the person, they are marked as first user despite there being multiple team members in their account (weird screenshots for privacy):
More context in this thread from @tiina303 and @marcushyett-ph.
The problem seems to be that we're sending the wrong value here.
Expected behavior
Only the first user to sign up in an organization is included.
How to reproduce
- See this insight for an example, where multiple users from the same organization are marked as the 'first' user
Environment
- PostHog Cloud
- self-hosted PostHog (ClickHouse-based), version/commit: please provide
- self-hosted PostHog (Postgres-based, legacy), version/commit: please provide
Additional context
Thank you for your bug report – we love squashing them!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in posthog/api/signup.py at the linked line 419 and inspect the value sent for is_organization_first_user. Reproduce the behavior with the linked insight and verify that filtering for true includes only the first user who signed up in an organization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100