Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-11-20] [$250] Only show the "Request early cancelation" button on Subscription to users that have been billed #51892

Closed
MitchExpensify opened this issue Nov 1, 2024 · 40 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@MitchExpensify
Copy link
Contributor

MitchExpensify commented Nov 1, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue reported by: @trjExpensify
Slack conversation (Internal): https://expensify.slack.com/archives/C07HPDRELLD/p1730254508322699

Action Performed:

  1. Create your first workspace
  2. Go to Settings
  3. Go to subscriptions

Expected Result:

We need the "Request early cancelation" option under "Payment card" to only show once you have been billed at least once

Actual Result:

The "Request early cancelation" option shows as soon as you create a workspace and before your subscription has started with its first billing

image

Workaround:

NA

Platforms:

All

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021852437879061502559
  • Upwork Job ID: 1852437879061502559
  • Last Price Increase: 2024-11-08
Issue OwnerCurrent Issue Owner: @puneetlath
@MitchExpensify MitchExpensify added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff NewFeature Something to build that is a new item. labels Nov 1, 2024
Copy link

melvin-bot bot commented Nov 1, 2024

Triggered auto assignment to @puneetlath (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Nov 1, 2024
Copy link

melvin-bot bot commented Nov 1, 2024

⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

Copy link

melvin-bot bot commented Nov 1, 2024

Triggered auto assignment to Design team member for new feature review - @shawnborton (NewFeature)

@MitchExpensify
Copy link
Contributor Author

Assuming this needs to be internal as it touches billing, labelling as such

@puneetlath
Copy link
Contributor

Hmm, I think this should be able to handle externally. The client should already have all the information it needs to decide whether or not to show that option. Making external.

@puneetlath puneetlath added External Added to denote the issue can be worked on by a contributor and removed Internal Requires API changes or must be handled by Expensify staff labels Nov 1, 2024
@melvin-bot melvin-bot bot changed the title Only show the "Request early cancelation" button on Subscription to users that have been billed [$250] Only show the "Request early cancelation" button on Subscription to users that have been billed Nov 1, 2024
Copy link

melvin-bot bot commented Nov 1, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021852437879061502559

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 1, 2024
Copy link

melvin-bot bot commented Nov 1, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 1, 2024
@Shahidullah-Muffakir
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Show the "Request early cancelation" only if user is billed

What is the root cause of that problem?

New feature

What changes do you think we should make in order to solve the problem?

add this check here: account.hasPurchases &&

{privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && <RequestEarlyCancellationMenuItem />}

@twilight2294
Copy link
Contributor

twilight2294 commented Nov 1, 2024

Edited by proposal-police: This proposal was edited at 2024-11-01 20:34:19 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Only show the "Request early cancelation" button on Subscription to users that have been billed

What is the root cause of that problem?

Feature request we need to hide the Request early cancelation button when the user has not been billed.

Currently we only check privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL to show the button. and hence it is visible

What changes do you think we should make in order to solve the problem?

We can use the hasPurchases value of ACCOUNT onyx key which Indicates whether the user has at least one previous purchase, with that we still need to check privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL because there won't be any early cancelation for pay-as-you-go:
Screenshot 2024-11-02 at 2 03 34 AM

/** Indicates whether the user has at least one previous purchase */
hasPurchases?: boolean;

{account?.hasPurchases && privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && <RequestEarlyCancellationMenuItem />} 

What alternative solutions did you explore? (Optional)

@twilight2294
Copy link
Contributor

Updated proposal

Updated to more correct solution (We would still need to hide the button if the subscription type if pay-as-you-go, the button should only be visible in case the user has previous purchase as well as the plan is annual

@ShridharGoel
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

We need to only show the "Request early cancelation" button on Subscription to users that have been billed.

What is the root cause of that problem?

We don't have any check on the billing status when showing the early cancellation option.

{privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && <RequestEarlyCancellationMenuItem />}

What changes do you think we should make in order to solve the problem?

Update it to the below to show the option only when there's a billing status available:

{billingStatus && privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && <RequestEarlyCancellationMenuItem />}

We can also add some checks like not showing the option when the billing status in an error etc.

@devKid88
Copy link

devKid88 commented Nov 3, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

We need the "Request early cancelation" option under "Payment card" to only show once you have been billed at least once

What is the root cause of that problem?

When we validate should we show a "Request early cancelation" option, we currently only checking for the type of subscription, not checking if the user has any payments before.

image

What changes do you think we should make to solve the problem?

We can check if the user has any payments, but also we possibly have to check is eligible for a refund (both checks are available in the account data), if so it will indicate that we can proceed with rendering the 'Request early cancelation" option. I am new to the platform, but maybe isEligibleForRefund will be enough to check this. Definitely, the fix is here, and we can easily refine the approach and fix it.

Copy link

melvin-bot bot commented Nov 3, 2024

📣 @devKid88! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@devKid88
Copy link

devKid88 commented Nov 3, 2024

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~0113d60b2da9445a4d

Copy link

melvin-bot bot commented Nov 3, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

Copy link

melvin-bot bot commented Nov 5, 2024

@puneetlath, @shawnborton, @parasharrajat Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@blimpich
Copy link
Contributor

blimpich commented Nov 8, 2024

@ShridharGoel billingStatus can exist and the user can still not have been billed. For example, it can be "failed," in which case a user has not been billed successfully, whereas hasPurchases will only be true if we have actually gotten money from the user. I think honestly we could make it work with billingStatus but I think hasPurchases is simpler and more straightforward.

@Shahidullah-Muffakir
Copy link
Contributor

Thank you for accepting my proposal! I'll have the PR ready for review within 24 hours.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Nov 8, 2024
@melvin-bot melvin-bot bot changed the title [$250] Only show the "Request early cancelation" button on Subscription to users that have been billed [HOLD for payment 2024-11-20] [$250] Only show the "Request early cancelation" button on Subscription to users that have been billed Nov 13, 2024
Copy link

melvin-bot bot commented Nov 13, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 13, 2024
Copy link

melvin-bot bot commented Nov 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.60-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-11-20. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 13, 2024

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@parasharrajat] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 19, 2024
Copy link

melvin-bot bot commented Nov 20, 2024

Payment Summary

Upwork Job

BugZero Checklist (@puneetlath)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1852437879061502559/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@parasharrajat
Copy link
Member

Regression Test Steps

  1. Create a new workspace
  2. Navigate to Settings > Subscriptions.
  3. Verify that the Request early cancellation option is not displayed

Do you agree 👍 or 👎 ?

@melvin-bot melvin-bot bot added the Overdue label Nov 21, 2024
Copy link

melvin-bot bot commented Nov 22, 2024

@puneetlath, @shawnborton, @blimpich, @parasharrajat, @Shahidullah-Muffakir Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@Shahidullah-Muffakir
Copy link
Contributor

Shahidullah-Muffakir commented Nov 22, 2024

@blimpich Friendly bump for payment, Thanks.

@puneetlath
Copy link
Contributor

Hmm, @Shahidullah-Muffakir looks like an upwork offer wasn't automatically created for you for some reason. I've sent you one here. Can you ping me on this issue when you've accepted?

@melvin-bot melvin-bot bot removed the Overdue label Nov 25, 2024
@Shahidullah-Muffakir
Copy link
Contributor

Hmm, @Shahidullah-Muffakir looks like an upwork offer wasn't automatically created for you for some reason. I've sent you one here. Can you ping me on this issue when you've accepted?

@puneetlath , Offer accepted, Thanks.

@puneetlath
Copy link
Contributor

Regression test issue: https://github.com/Expensify/Expensify/issues/447720

Payment summary:

Thanks everyone!

@parasharrajat
Copy link
Member

payment requested as per #51892 (comment)

@JmillsExpensify
Copy link

$250 approved for @parasharrajat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
Status: Done
Development

No branches or pull requests

10 participants