[PM-38567] Migration Renewal Copy Dynamic Update#7921
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the addition of conditional proactive-discount copy to the No blocking or actionable findings. Code Review DetailsNo findings. Logic is correct across the resolved edge cases (null/empty coupon code, unresolvable coupon, coupons with neither |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7921 +/- ##
=======================================
Coverage 61.35% 61.36%
=======================================
Files 2236 2236
Lines 98547 98555 +8
Branches 8911 8914 +3
=======================================
+ Hits 60468 60476 +8
+ Misses 35943 35942 -1
- Partials 2136 2137 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38567
📔 Objective
The migration renewal email (
BusinessPlanRenewal2020MigrationMail, from PM-37070) already lists a cohort's proactive discount in its summary of charges, but nothing explains why the customer is seeing it. Per marketing's request, this adds a dynamically-inserted sentence that calls out the loyalty discount only when the cohort provides a proactive discount.Implementation notes:
Discountrecord resolved inUpcomingInvoiceHandlernow carries itsCouponIdandMonths(DurationInMonths), populated from the coupon already fetched during discount resolution — no extra Stripe call. The email path filters the resolved discounts for the cohort's proactive coupon to get its month span.ProactiveDiscountMonths,ShowProactiveDiscountCopy(gate, true only for a positive month span), andProactiveDiscountDurationPhrase("next month"/"next N months").business-plan-renewal-2020-migration.mjml), regenerated the.html.hbsvianpm run build:minify, and updated the hand-authored.text.hbs. The conditional sentence (and its punctuation) lives inline in the always-rendered notice paragraph.Tests: Added handler coverage for the
repeating/once/forever/ unresolved / no-coupon cases, and view-model tests for the gate and phrase.📸 Screenshots
Annual Teams Subscription with 12 Month Cohort Coupon
Monthly Teams Subscription with 6 Month Cohort Coupon