[PM-31902] Remove m2 flagged logic#7351
Conversation
…rUserAsync Always call AlignPremiumUsersSubscriptionConcernsAsync instead of gating it behind the feature flag.
…tionResponseModel Remove includeMilestone2Discount parameter from both SubscriptionResponseModel constructors. Rename ShouldIncludeMilestone2Discount to ShouldIncludeDiscount and always evaluate the discount (coupon ID match + active check).
Remove feature flag mock setup lines and delete test methods that verified flag-disabled behavior. Rename tests to remove flag references.
Remove includeMilestone2Discount parameter from all constructor calls. Delete tests that verified flag-disabled behavior.
Remove all feature flag mock setup lines for PM23341_Milestone_2.
The constructor parameter became unused after removing the flag check.
|
New Issues (121)Checkmarx found the following issues in this Pull Request
|
After removing the m2 flag guard, AlignPremiumUsersSubscriptionConcernsAsync is always called and needs ListPremiumPlans to return a non-null value. Add a default empty list in the test constructor setup.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7351 +/- ##
=======================================
Coverage 58.22% 58.22%
=======================================
Files 2060 2060
Lines 90951 90945 -6
Branches 8081 8080 -1
=======================================
- Hits 52954 52953 -1
+ Misses 36124 36120 -4
+ Partials 1873 1872 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Resolve conflicts with PM-33891 (Migrate Cancel and Reinstate Paths). Keep IFeatureService in AccountsController constructor since the new reinstate method uses it for PM32645 flag check.
|
Claude finished @cturnbull-bitwarden's task in 1m 42s —— View job Code Review: PM-31902 Remove m2 flagged logic
Review SummaryThis is a clean, mechanical removal of the fully-rolled-out Files reviewed (6):
Result: No issues found. All changes consistently remove the flag-gated code paths and retain the "on" behavior, with tests properly updated to match. |
|






🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-31902
https://bitwarden.atlassian.net/browse/PM-31891
📔 Objective
Remove
pm-23341-milestone-2feature flag logic from the server. The flag is fully rolled out so we keep the "on" path everywhere:AlignPremiumUsersSubscriptionConcernsAsyncinUpcomingInvoiceHandlerincludeMilestone2Discountparameter fromSubscriptionResponseModelconstructors; rename helper toShouldIncludeDiscountIFeatureServicefromAccountsControllerconstructor