Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

[MM-36235] - Do not allow to downgrade cloud plans #8268

Merged
merged 6 commits into from
Jul 13, 2021
Merged

Conversation

AGMETEOR
Copy link
Contributor

@AGMETEOR AGMETEOR commented Jun 14, 2021

Summary

Currently, if the user is subscribed in the Starter or Professional, when the admin clicks the "Upgrade" button the purchase modal shows all options. They should only be presented with the higher options to upgrade (and the current plan for comparison)

Ticket Link

MM-36235

Related PRs

webapp

Release Note

none

@AGMETEOR AGMETEOR requested review from marianunez and pvev June 14, 2021 18:18
@AGMETEOR AGMETEOR self-assigned this Jun 14, 2021
@AGMETEOR AGMETEOR added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester 1: UX Review Requires review by a UX Designer labels Jun 14, 2021
@AGMETEOR AGMETEOR requested review from nickmisasi and removed request for pvev June 14, 2021 18:27
@AGMETEOR AGMETEOR added the Do Not Merge Should not be merged until this label is removed label Jun 16, 2021
Comment on lines 194 to 197
const options = Object.keys(products).map((key: string) => {
return {key: products[key].name, value: products[key].id};
return {key: products[key].name, value: products[key].id, price: products[key].price_per_seat};
}).sort((a, b) => a.price - b.price).filter((option) => {
return option.price >= this.state.currentProduct!.price_per_seat;
Copy link
Member

Choose a reason for hiding this comment

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

@AGMETEOR this code has now changed to consider the flat_fee subscriptions in this PR: https://github.com/mattermost/mattermost-webapp/pull/8341/files#diff-acb502910cc86e76a73b356eba7ef5024d0db3aaa31441bbe70ff3c83dc164beR193-R206

We can now update this PR and consider not allowing them to downgrade but ONLY when you are upgrading (not the initial purchase from trial given that they may be in Enterprise and can select Starter to subscribe)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have updated the code

@marianunez marianunez requested a review from nickmisasi July 7, 2021 20:18
@AGMETEOR AGMETEOR requested review from marianunez and pvev and removed request for nickmisasi July 9, 2021 12:35
@AGMETEOR AGMETEOR removed the Do Not Merge Should not be merged until this label is removed label Jul 9, 2021
@marianunez marianunez removed their request for review July 9, 2021 15:05
Copy link
Contributor

@pvev pvev left a comment

Choose a reason for hiding this comment

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

LGTM!

@AGMETEOR AGMETEOR requested a review from stevemudie July 12, 2021 13:29
@AGMETEOR
Copy link
Contributor Author

@stevemudie I think this is a post merge QA review candidate

Copy link
Contributor

@stevemudie stevemudie left a comment

Choose a reason for hiding this comment

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

Will test post merge

@stevemudie stevemudie added QA Deferred Agreement with QA that these changes will be tested post-merge and removed 3: QA Review Requires review by a QA tester labels Jul 12, 2021
@AGMETEOR AGMETEOR requested a review from marianunez July 12, 2021 16:08
Copy link
Member

@marianunez marianunez left a comment

Choose a reason for hiding this comment

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

Great work @AGMETEOR!

Comment on lines +203 to +204
const flatFeeProducts: ProductOptions = [];
const userBasedProducts: ProductOptions = [];
Copy link
Member

Choose a reason for hiding this comment

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

Nice 👍

@marianunez marianunez removed the 2: Dev Review Requires review by a core commiter label Jul 13, 2021
@AGMETEOR AGMETEOR merged commit 9585d86 into master Jul 13, 2021
@AGMETEOR AGMETEOR deleted the MM-36235 branch July 13, 2021 14:43
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Jul 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1: UX Review Requires review by a UX Designer Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation QA Deferred Agreement with QA that these changes will be tested post-merge release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants