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 2023-10-10] [$500] Settings - Profile - User is able to delete default contact method, result in error #26773

Closed
1 of 6 tasks
izarutskaya opened this issue Sep 5, 2023 · 30 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Sep 5, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Login with any account in 2 tabs.
  2. From first tab, open settings => profile => contact methods, choose the secondary contact method, press Delete.
  3. From second tab, open settings => profile => contact methods, choose the secondary contact method, press Set As Default.
  4. From the first tab, press Delete.
  5. Observer the contact method field.

Expected Result:

User shouldn't be able to delete default contact method.

Actual Result:

User is able to delete default contact method, result in error

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.63-0

Reproducible in staging?: Y

Reproducible in production?: Y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-08-29.At.11.27.20.mp4
Recording.1449.mp4

Expensify/Expensify Issue URL:

Issue reported by: @hungvu193

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693283217118959

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011a89cd5b6cb92262
  • Upwork Job ID: 1699163308725714944
  • Last Price Increase: 2023-09-12
  • Automatic offers:
    • Ollyws | Reviewer | 26653028
    • hungvu193 | Reporter | 26653029
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@izarutskaya
Copy link
Author

izarutskaya commented Sep 5, 2023

Proposal from @hungvu193

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

User is able to delete default contact method, result in error

What is the root cause of that problem?

In current ContactMethodDetailsPage, we don't a have logic to hide the delete modal or prevent user from deleting the current contact method even it's default contact methods once modal is opened.

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

Solution 1:
Add an useEffect inside ContactMethodDetailsPage, if current contact method is default contact method and Confirm Modal is opened, we should hide the modal.
Solution 2:
Disabled the Yes, continue button if current contact method is default contact method.

What alternative solutions did you explore? (Optional)

N/A

@s-alves10
Copy link
Contributor

I think this issue is related to both backend and frontend
The backend should return error when a user tries to delete his default contact method. This is possible for sure
The frontend should show error message like "You can't delete your default contact method" when press Yes button

@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label Sep 5, 2023
@melvin-bot melvin-bot bot changed the title Settings - Profile - User is able to delete default contact method, result in error [$500] Settings - Profile - User is able to delete default contact method, result in error Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Current assignee @abekkala is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@hungvu193
Copy link
Contributor

@izarutskaya Can you update the reporter and proposal, it was actually me. Sorry for this inconvenient.

@Ollyws
Copy link
Contributor

Ollyws commented Sep 9, 2023

The frontend should show error message like "You can't delete your default contact method" when press Yes button

I think this is a better solution than hiding the modal or disabling the button.

@melvin-bot melvin-bot bot added the Overdue label Sep 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

@Ollyws, @abekkala Whoops! This issue is 2 days overdue. Let's get this updated quick!

@lukemorawski
Copy link
Contributor

this is Lucas from Callstack. Happy to work on that!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

📣 @Ollyws 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Sep 13, 2023

📣 @hungvu193 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@abekkala
Copy link
Contributor

@Ollyws I didn't see any movement on this since last week so I pulled in someone to get this one fixed and finished.

@melvin-bot melvin-bot bot removed the Overdue label Sep 13, 2023
@hungvu193
Copy link
Contributor

The frontend should show error message like "You can't delete your default contact method" when press Yes button

I think this is a better solution than hiding the modal or disabling the button.

I saw a very similar issue and it was decided to disable the button, why don't we jusst do it here?
#23472

@lukemorawski
Copy link
Contributor

lukemorawski commented Sep 14, 2023

@abekkala @izarutskaya Can't reproduce the bug anymore. Looks like there were some changes on the BE. The state of the contact list is now synchronised using WS/Onyx. After deleting the contact method from step 1., it disappears on the second device. This is actually what it was supposed to be :) Please check.

@izarutskaya
Copy link
Author

@lukemorawski I can still reproduce it.
Build v1.3.70-5

Recording.1535.mp4

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@lukemorawski
Copy link
Contributor

@izarutskaya ok, will have a look again in moment :)

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@lukemorawski
Copy link
Contributor

Think I got it working. Preparing the PR today.

@melvin-bot
Copy link

melvin-bot bot commented Sep 19, 2023

@Ollyws @abekkala @lukemorawski this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

Triggered auto assignment to @amyevans, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 3, 2023
@melvin-bot melvin-bot bot changed the title [$500] Settings - Profile - User is able to delete default contact method, result in error [HOLD for payment 2023-10-10] [$500] Settings - Profile - User is able to delete default contact method, result in error Oct 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.76-6 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 2023-10-10. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

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

  • [@Ollyws] The PR that introduced the bug has been identified. Link to the PR: N/A
  • [@Ollyws] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@Ollyws] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@Ollyws] Determine if we should create a regression test for this bug.
  • [@Ollyws] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@abekkala] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@abekkala
Copy link
Contributor

abekkala commented Oct 4, 2023

PAYMENTS FOR OCT 10

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 10, 2023
@Ollyws
Copy link
Contributor

Ollyws commented Oct 10, 2023

BugZero Checklist:
I don't think we can say any PR caused this issue, it's just not something we considered to check for when implementing.
This is pretty edge case and not really related to any important user flow, it's also not that easy to test for so I don't think a regression test is useful here.

@abekkala
Copy link
Contributor

@hungvu193 payment made [$50] and contract ended - thank you! 🎉

@abekkala
Copy link
Contributor

@Ollyws payment made [$500] and contract ended - thank you! 🎉

@abekkala
Copy link
Contributor

closing

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants