Skip to content

Add PlanFilter to Organization admin#659

Open
allanlasser wants to merge 3 commits intomasterfrom
claude/filter-organizations-by-plan-WuadY
Open

Add PlanFilter to Organization admin#659
allanlasser wants to merge 3 commits intomasterfrom
claude/filter-organizations-by-plan-WuadY

Conversation

@allanlasser
Copy link
Copy Markdown
Member

Helps us answer "How many orgs are subscribed to plan X?" with an update to the Django Admin.

Lets staff slice the Organization list view by the Plan an org is subscribed to, plus a "No plan" option for orgs with no Subscription rows. Cancelled subscriptions still count as subscribed, matching the semantics of Organization.plan.

Co-authored with Claude Opus 4.7

Lets staff slice the Organization list view by the Plan an org is
subscribed to, plus a "No plan" option for orgs with no Subscription
rows. Cancelled subscriptions still count as subscribed, matching
the semantics of Organization.plan.

https://claude.ai/code/session_01TMj6rVfo3TL8MwJC5h3enV
@allanlasser allanlasser temporarily deployed to squarelet-pi-claude-fil-tfyo3j April 24, 2026 20:32 Inactive
@allanlasser allanlasser temporarily deployed to squarelet-pi-claude-fil-tfyo3j April 27, 2026 13:46 Inactive
@duckduckgrayduck
Copy link
Copy Markdown
Contributor

Seems to work well- I do feel though that this would be greatly improved if we could mark who is currently subscribed vs. cancelled

@allanlasser
Copy link
Copy Markdown
Member Author

allanlasser commented Apr 28, 2026

I weighed that—orgs in a cancelled state will continue to have access to a plan until their subscription is deleted at the end of the term. It feels more accurate to include cancelled subscriptions in these groups, so they represent active subscriptions.

I think adding a column to this view would be the best way to identify orgs that won't have their subscription renew, and that's a good thing to add here.

@allanlasser allanlasser temporarily deployed to squarelet-pi-claude-fil-tfyo3j April 28, 2026 01:31 Inactive
@allanlasser
Copy link
Copy Markdown
Member Author

Now when filtering by a plan, a column's added to indicate whether the subscription will renew.

@duckduckgrayduck
Copy link
Copy Markdown
Contributor

The number of SQL queries (as viewed in the Django debug toolbar) with this new column in the view radically jumped from ~30ish to ~200. This needs optimization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants