Skip to content

[PM-32366] Update UseMyItems to use dedicated plan feature#7101

Open
eliykat wants to merge 1 commit intomainfrom
ac/pm-32366/server-update-references-to-use-plan-feature
Open

[PM-32366] Update UseMyItems to use dedicated plan feature#7101
eliykat wants to merge 1 commit intomainfrom
ac/pm-32366/server-update-references-to-use-plan-feature

Conversation

@eliykat
Copy link
Member

@eliykat eliykat commented Feb 27, 2026

🎟️ Tracking

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

📔 Objective

Billing Team have now added a dedicated HasMyItems plan feature, which can be used to set the UseMyItems organization ability. We were previously using UsePolicies as a proxy.

📸 Screenshots

@eliykat eliykat requested review from a team as code owners February 27, 2026 03:12
@eliykat eliykat added the ai-review Request a Claude code review label Feb 27, 2026
@claude
Copy link
Contributor

claude bot commented Feb 27, 2026

Claude finished @eliykat's task in 1m 20s —— View job


Review Summary

PR: PM-32366 Update UseMyItems to use dedicated plan feature

Verdict: Clean PR -- no issues found.

Overview

This PR completes the follow-up tracked by PM-32366, replacing the temporary proxy plan.HasPolicies with the dedicated plan.HasMyItems feature for setting the UseMyItems organization ability. All 7 code locations where UseMyItems was incorrectly derived from HasPolicies have been updated, the Admin panel now passes HasMyItems in the plan data for the JavaScript form scripts, and all TODO comments have been cleaned up.

Checks Performed

  • Security: No security implications; this is a plan feature mapping change only.
  • Correctness: HasMyItems is properly defined on the Plan model, populated via PlanAdapter.HasFeature("myItems"), and already set in test mock plans. All 7 code paths are updated consistently. Grep confirms zero remaining UseMyItems = HasPolicies references and zero remaining PM-32366 TODOs.
  • Breaking changes: None. The HasMyItems property already exists on the plan model -- this PR simply wires it up.
  • Completeness: All references across sign-up commands, upgrade commands, subscription restart, billing provider services, and admin panel have been addressed.

No inline comments needed.

@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details777e32d5-9061-4b47-bc9a-c0fcb93283b5

Great job! No new security vulnerabilities introduced in this pull request

@eliykat
Copy link
Member Author

eliykat commented Feb 27, 2026

@sbrown-livefront / @amorask-bitwarden Can I please get your help with the test failures here? They are all on integration tests that are (or should be) consuming this new plan value from the Pricing Service. The failures indicate that the UseMyItems value is not being set correctly. The tests all pass locally but not in CI. Is the Pricing Service connection configured differently in CI maybe?

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.70%. Comparing base (4158056) to head (3dd9c3b).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...lling/Providers/Services/ProviderBillingService.cs 0.00% 1 Missing ⚠️
...Admin/AdminConsole/Models/OrganizationEditModel.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7101      +/-   ##
==========================================
- Coverage   56.70%   56.70%   -0.01%     
==========================================
  Files        2013     2013              
  Lines       88191    88192       +1     
  Branches     7861     7861              
==========================================
  Hits        50008    50008              
- Misses      36363    36364       +1     
  Partials     1820     1820              

☔ 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.

@amorask-bitwarden
Copy link
Contributor

@sbrown-livefront / @amorask-bitwarden Can I please get your help with the test failures here? They are all on integration tests that are (or should be) consuming this new plan value from the Pricing Service. The failures indicate that the UseMyItems value is not being set correctly. The tests all pass locally but not in CI. Is the Pricing Service connection configured differently in CI maybe?

@eliykat The wrong branch was deployed to Mothership QA - I've re-deployed and re-ran your tests. You're good to go.

Copy link
Collaborator

@sbrown-livefront sbrown-livefront left a comment

Choose a reason for hiding this comment

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

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

Labels

ai-review Request a Claude code review needs-qa

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants