App: [HOLD for payment 2023-10-10] [$500] Settings - Profile - User is able to delete default contact method, result in error
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:
- Login with any account in 2 tabs.
- From first tab, open settings => profile => contact methods, choose the secondary contact method, press Delete.
- From second tab, open settings => profile => contact methods, choose the secondary contact method, press
Set As Default. - From the first tab, press Delete.
- 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
https://github.com/Expensify/App/assets/115492554/80a79d67-da11-45c9-bfca-15570bb94b3c
https://github.com/Expensify/App/assets/115492554/6542239b-16f6-4f14-b47b-a32495e9d421
Expensify/Expensify Issue URL:
Issue reported by: @hungvu193
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693283217118959
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
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 30 (14 by maintainers)
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.
Think I got it working. Preparing the PR today.
@Ollyws I didn’t see any movement on this since last week so I pulled in someone to get this one fixed and finished.
this is Lucas from Callstack. Happy to work on that!
@izarutskaya Can you update the reporter and proposal, it was actually me. Sorry for this inconvenient.
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
useEffectinsideContactMethodDetailsPage, if current contact method is default contact method and Confirm Modal is opened, we should hide the modal. Solution 2: Disabled theYes, continuebutton if current contact method is default contact method.What alternative solutions did you explore? (Optional)
N/A