Skip to content

Conversation

djsmith85
Copy link
Contributor

@djsmith85 djsmith85 commented May 25, 2022

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fixes an issue where reverting a subscription update would fail.

Props to @MGibson1 for pairing and supporting on this!!

Code changes

  • src/Core/Models/Business/SubscriptionUpdate.cs:
    • Save previousSeats during a seat expansion subscription update to decide in case of a revert to either update the existing subscription item (Teams/Enterprise) or delete it.
    • Save previousStorage during a storage expansion subscription update to decide in case of a revert to either update the existing subscription item (storage-gb-XXX) or delete it.
  • src/Core/Services/Implementations/StripePaymentService.cs:
    • Adding a try catch around the Subscription-Update/-Revert as the revert previously threw but was swallowed

Before you submit

  • I have checked for formatting errors (dotnet tool run dotnet-format --check) (required)
  • If making database changes - I have also updated Entity Framework queries and/or migrations
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@djsmith85 djsmith85 requested a review from a team May 25, 2022 15:21
MGibson1
MGibson1 previously approved these changes May 25, 2022
Copy link
Member

@MGibson1 MGibson1 left a comment

Choose a reason for hiding this comment

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

Since we paired on this, feel free to ask for more reviews, but I'll go ahead and approve.

Also, nice job on the QA test notes (I know most people here can't read them since we moved them to jira, but trust me, they're thorough)

Copy link
Member

@justindbaur justindbaur left a comment

Choose a reason for hiding this comment

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

Just one question.

Copy link
Member

@justindbaur justindbaur left a comment

Choose a reason for hiding this comment

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

Looks great!

@djsmith85 djsmith85 merged commit 610be2c into master May 31, 2022
@djsmith85 djsmith85 deleted the fix/stripe-revert-logic branch May 31, 2022 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants