Skip to content

feat: set organisation_plan flagsmith trait on login and org switch#7786

Open
Zaimwa9 wants to merge 3 commits into
mainfrom
feat/organisation-plan-trait-main
Open

feat: set organisation_plan flagsmith trait on login and org switch#7786
Zaimwa9 wants to merge 3 commits into
mainfrom
feat/organisation-plan-trait-main

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Changes

Closes #7783

Adds a Flagsmith organisation_plan trait so flags can be segmented by an org's plan.

  • Set on login and on organisation switch.
  • Normalised to plan family (free/startup/scale-up/enterprise) so segments use exact IN/equals

How did you test this code?

Manually: logged in and switched orgs, confirmed organisation_plan matches the selected org and flags re-fetch on switch.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Jun 16, 2026 4:19pm
flagsmith-frontend-staging Ready Ready Preview, Comment Jun 16, 2026 4:19pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jun 16, 2026 4:19pm

Request Review

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner June 15, 2026 13:48
@Zaimwa9 Zaimwa9 requested review from talissoncosta and removed request for a team June 15, 2026 13:48
@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Jun 15, 2026
@github-actions github-actions Bot added the feature New feature or request label Jun 15, 2026
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-7786 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-7786 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-7786 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7786 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7786 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-7786 Finished ✅ Results

@Zaimwa9 Zaimwa9 force-pushed the feat/organisation-plan-trait-main branch from 803d146 to 32f7d5d Compare June 15, 2026 13:55
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  31.9 seconds
commit  803d146
info  🔄 Run: #17505 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.8 seconds
commit  803d146
info  🔄 Run: #17505 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  42.5 seconds
commit  803d146
info  🔄 Run: #17505 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  42.6 seconds
commit  803d146
info  🔄 Run: #17505 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.9 seconds
commit  32f7d5d
info  🔄 Run: #17507 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  42 seconds
commit  32f7d5d
info  🔄 Run: #17507 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  42.5 seconds
commit  32f7d5d
info  🔄 Run: #17507 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  53 seconds
commit  32f7d5d
info  🔄 Run: #17507 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.8 seconds
commit  0064145
info  🔄 Run: #17546 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.2 seconds
commit  0064145
info  🔄 Run: #17546 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  56.3 seconds
commit  0064145
info  🔄 Run: #17546 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  44.7 seconds
commit  0064145
info  🔄 Run: #17546 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  38.3 seconds
commit  48026df
info  🔄 Run: #17549 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.2 seconds
commit  48026df
info  🔄 Run: #17549 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 1 suite
duration  11.4 seconds
commit  48026df
info  🔄 Run: #17549 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  57.3 seconds
commit  48026df
info  🔄 Run: #17549 (attempt 1)

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

Comment on lines +49 to +52
<a
href='https://docs.flagsmith.com/experiment-statistics'
target='_blank'
rel='noreferrer'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seized the opportunity to add the link to the doc as it is somehow related to the trait addition

@Zaimwa9 Zaimwa9 requested review from matthewelwell and removed request for matthewelwell June 16, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set user current organisation plan as trait

3 participants