Skip to content

[PM-37593] Add OrganizationUserStatusTypeNew - 🪓 Revoked#7666

Open
sven-bitwarden wants to merge 3 commits into
mainfrom
ac/pm-37593/add-status-new-columns
Open

[PM-37593] Add OrganizationUserStatusTypeNew - 🪓 Revoked#7666
sven-bitwarden wants to merge 3 commits into
mainfrom
ac/pm-37593/add-status-new-columns

Conversation

@sven-bitwarden
Copy link
Copy Markdown
Contributor

@sven-bitwarden sven-bitwarden commented May 18, 2026

🎟️ Tracking

PM-37593

📔 Objective

This PR implements part of Phase 1 of the initiative to separate Revoked from OrganizationUserStatusType.

The overall initiative will have us creating a new home for OrganizationUserStatusType (sans Revoked), populating it for revokes and checking it first for restores, moving all organization user status type checks to account for revoked now being a separate field, and then cleaning up.

@sven-bitwarden sven-bitwarden requested review from a team as code owners May 18, 2026 21:59
@sven-bitwarden sven-bitwarden added needs-qa ai-review-vnext Request a Claude code review using the vNext workflow labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR is Phase 1 scaffolding for the initiative to separate Revoked from OrganizationUserStatusType. It adds a nullable StatusNew SMALLINT column to [dbo].[OrganizationUser], a corresponding nullable OrganizationUserStatusTypeNew? property on the entity, updates all seven OrganizationUser_* stored procedures to pass the column through with safe defaults, and ships parity EF migrations for SQL Server, MySQL, Postgres, and Sqlite. The migration script also refreshes the five views that reference OrganizationUser so SQL metadata stays consistent. No behavior reads or writes the new column yet — that arrives in subsequent phases.

Code Review Details

No findings. Reviewer feedback from mkincaid-bw on column ordering and view refresh has been addressed in the latest revision; the stored proc parameter defaults (@StatusNew SMALLINT = NULL) preserve backward compatibility for existing callers.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.54%. Comparing base (4224933) to head (c6004d5).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7666      +/-   ##
==========================================
+ Coverage   59.98%   64.54%   +4.55%     
==========================================
  Files        2121     2132      +11     
  Lines       93543    93905     +362     
  Branches     8301     8341      +40     
==========================================
+ Hits        56113    60611    +4498     
+ Misses      35450    31219    -4231     
- Partials     1980     2075      +95     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@mkincaid-bw mkincaid-bw left a comment

Choose a reason for hiding this comment

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

Couple minor changes

Comment thread src/Sql/dbo/Tables/OrganizationUser.sql Outdated
JaredScar
JaredScar previously approved these changes May 19, 2026
Copy link
Copy Markdown
Contributor

@JaredScar JaredScar left a comment

Choose a reason for hiding this comment

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

Admin Console changes seem fine (only 2 files)

@sven-bitwarden
Copy link
Copy Markdown
Contributor Author

@mkincaid-bw updated - thanks for the reminder especially on the views ✌️

@sven-bitwarden sven-bitwarden requested a review from JaredScar May 20, 2026 14:48
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@mkincaid-bw mkincaid-bw left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

ai-review-vnext Request a Claude code review using the vNext workflow needs-qa

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants