Skip to content

[PM-38951] feat: Add CreationDate to org user detail endpoints#7936

Merged
jrmccannon merged 4 commits into
mainfrom
PM-38951-add-creationdate-to-org-users
Jul 13, 2026
Merged

[PM-38951] feat: Add CreationDate to org user detail endpoints#7936
jrmccannon merged 4 commits into
mainfrom
PM-38951-add-creationdate-to-org-users

Conversation

@jrmccannon

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-38951

📔 Objective

Surface the organization user's CreationDate (when the member was first invited to the organization) on the two Admin Console read endpoints:

  • GET /organizations/{orgId}/users — GetAll, via OrganizationUserUserDetailsResponseModel
  • GET /organizations/{orgId}/users/{id} — Get by id, via OrganizationUserDetailsResponseModel

The column already exists on the OrganizationUser table, so no schema migration is required. This threads the field through the OrganizationUserUserDetails data class, both response models, the OrganizationUserUserDetailsView (SSDT view + dated CREATE OR ALTER VIEW migration), and both EF projections. The Dapper read path auto-maps by column name off the view. The member-visible mini-details model and the public API MemberResponseModel are intentionally left unchanged. Unit tests assert CreationDate flows into both response models.

Surface the OrganizationUser CreationDate on the "GET org user by id" and
"GET all org users" Admin Console endpoints. The column already exists on
the OrganizationUser table, so this threads it through the
OrganizationUserUserDetails data class, both response models, the
OrganizationUserUserDetailsView (SSDT + dated migration), and the EF
projections. Dapper auto-maps by column name off the view.
@jrmccannon jrmccannon added the t:feature Change Type - Feature Development label Jul 7, 2026
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.02%. Comparing base (ea00c46) to head (3318953).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7936      +/-   ##
==========================================
+ Coverage   61.49%   66.02%   +4.52%     
==========================================
  Files        2249     2249              
  Lines       99057    99065       +8     
  Branches     8959     8959              
==========================================
+ Hits        60917    65406    +4489     
+ Misses      35989    31407    -4582     
- Partials     2151     2252     +101     

☔ View full report in Codecov by Harness.
📢 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.

@jrmccannon jrmccannon marked this pull request as ready for review July 7, 2026 21:34
@jrmccannon jrmccannon requested review from a team as code owners July 7, 2026 21:34
@jrmccannon jrmccannon requested a review from eliykat July 7, 2026 21:34
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: REQUEST CHANGES

Reviewed the threading of OrganizationUser.CreationDate through the two Admin Console read endpoints. The change is consistent across the data class, both response models, both EF projections, the SSDT view, and the dated migration, and it includes unit tests for the response models. One database-migration issue prevents the new column from reliably surfacing on the Dapper read path in already-deployed environments.

Code Review Details
  • ⚠️ : View migration does not refresh the six dependent SELECT * stored procedures, so CreationDate may not surface on the Dapper read path until modules are refreshed (precedent: 2023-02-22_FixOrganizationUserUserDetailsViewOutOfSync.sql).
    • util/Migrator/DbScripts/2026-07-07_00_AddCreationDateToOrganizationUserUserDetailsView.sql:29

@eliykat eliykat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, however I think the Claude feedback about refreshing dependent views is correct.

@jrmccannon jrmccannon requested a review from eliykat July 8, 2026 11:53

@mkincaid-bw mkincaid-bw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@jrmccannon jrmccannon merged commit 6ff65b9 into main Jul 13, 2026
72 of 73 checks passed
@jrmccannon jrmccannon deleted the PM-38951-add-creationdate-to-org-users branch July 13, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants