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

Unable to delete a contact method including capital letters #19080

Closed
6 tasks done
trjExpensify opened this issue May 16, 2023 · 36 comments
Closed
6 tasks done

Unable to delete a contact method including capital letters #19080

trjExpensify opened this issue May 16, 2023 · 36 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 Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@trjExpensify
Copy link
Contributor

trjExpensify commented May 16, 2023

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


Action Performed:

  1. Launch the app -> Login in account
  2. Navigate to Avatar > Profile > contact method
  3. Add a new contact email including capital letters i.e [email protected]
  4. Delete the contact method you just added

Expected Result:

You should be able to delete the contact method

Actual Result:

Attempting to delete the contact method results in this error: Auth DeleteLogin returned an error

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.14-14
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_20230509_000311_New.Expensify.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhairyasenjaliya
Slack conversation: #18301 (comment)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c866a623249c0072
  • Upwork Job ID: 1658592013696098304
  • Last Price Increase: 2023-05-16
@trjExpensify trjExpensify added Engineering Internal Requires API changes or must be handled by Expensify staff Bug Something is broken. Auto assigns a BugZero manager. labels May 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 16, 2023

Current assignee @Beamanator is eligible for the Engineering assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 16, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 16, 2023

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

@melvin-bot melvin-bot bot added the Daily KSv2 label May 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 16, 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

@melvin-bot
Copy link

melvin-bot bot commented May 16, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @rushatgabhane (Internal)

@trjExpensify
Copy link
Contributor Author

Removing C+ given that it's a backend issue.

@Beamanator
Copy link
Contributor

Dropping to weekly priority b/c there's soooo many irons in the fire, but I'll def get to this soon 😅

@dhairyasenjaliya
Copy link
Contributor

dhairyasenjaliya commented May 17, 2023

Hehe @Beamanator do we need to anything at front end then i can help since i found this bug during adding forms to new contact method

@Beamanator
Copy link
Contributor

Gooooooood question @dhairyasenjaliya , I will do some investigation soon, most likely it's just a backend change though

@Beamanator
Copy link
Contributor

Beamanator commented May 22, 2023

Alright so specifically with DeleteLogin, we do convert the email to lowercase when searching for the login to delete :D

I believe this also happens when requesting a new magic code for an email with capital letters (not sure if this has been reported yet?)

So this will require some back-end & some front end changes, both should lowercase new logins when:

  1. Adding new contact methods
    • OldDot already lowercases new contact methods here
  2. Sending magic codes / validating magic codes
  3. Deleting contact methods

(Note: I confirmed in OldDot we lowercase new contact methods, so we should do the same here - I don't see any reason why we'd keep them multi-case)

@dhairyasenjaliya
Copy link
Contributor

hm @Beamanator alright so I guess from the front end we just convert all emails to lowercase while submitting/deleting on a new contact so let me know once you change from the backend and we have probably 2 ways to change

Solution - 1 -> Pass lowerCase() when requesting to create a new acc, add a new contact method, delete the contact method

Solution - 2 -> We should modify EMAIL_BASE_REGEX to limit the capital letter from expensify-common library

@Beamanator
Copy link
Contributor

It could be a good idea to prevent users from entering capital letters in emails in the front end, but this will be the last step so I'm planning to worry about this later - but I'll come back to your thoughts for sure @dhairyasenjaliya - thanks for your ideas!

FYI I started an internal discussion here to think about a migration we might have to run, making existing contact methods lowercase in the database & Onyx

@Beamanator
Copy link
Contributor

@trjExpensify since there is a front-end component to this issue (noted & agreed upon in this thread) should we open this up by adding the External label? There's definitely a backend component (PR already linked above this comment) but we'll need some front end change too

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label May 24, 2023
@trjExpensify
Copy link
Contributor Author

Sure, I think that's reasonable. @dhairyasenjaliya you seem interested, right?

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.19-7 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-06-05. 🎊

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

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 May 29, 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:

@Beamanator Beamanator mentioned this issue May 30, 2023
54 tasks
@Beamanator
Copy link
Contributor

@trjExpensify added notes above 👍

@Beamanator Beamanator changed the title [HOLD for payment 2023-06-05] Unable to delete a contact method including capital letters Unable to delete a contact method including capital letters May 30, 2023
@Beamanator
Copy link
Contributor

FYI there was no payment needed, it was resolved internally

@Beamanator
Copy link
Contributor

Beamanator commented May 30, 2023

Finally - I plan to keep this open b/c we still want to get a Web-E PR merged - https://github.com/Expensify/Web-Expensify/pull/37561

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

@Beamanator @trjExpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 30, 2023
@trjExpensify
Copy link
Contributor Author

Yes I think it's smart to have QA test that adding mixed-case contact methods only actually creates lowercased contact methods 👍

Did you update the script somewhere for the new contact methods rollout or something?

@trjExpensify trjExpensify added the Reviewing Has a PR in review label May 30, 2023
@Beamanator
Copy link
Contributor

@trjExpensify we've been doing testrail updates throughout the rollout, we don't have 1 giant script anywhere sadly

@trjExpensify
Copy link
Contributor Author

Okay, but same same.. are you saying the regression test update or that has been accounted for?

@Beamanator
Copy link
Contributor

Oh oh like do I think we should add something to the regression tests for this? I think yes! We definitely don't want to be able to add mixed-case logins (primary or secondary) anywhere at the moment 👍

@trjExpensify
Copy link
Contributor Author

Kewl, so can yah do this step or have you somewhere else? (I see it checked off).

@Beamanator] 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.

@Beamanator
Copy link
Contributor

Oh ya sure, sorry I thought the steps would be pretty obvious :D I'm thinking something like:

  1. Add a new contact method with some uppercase and some lowercase letters (example: [email protected])
  2. Verify the contact method gets added in the "Contact Methods" page, in all lowercase letters ([email protected])
  3. Try removing that newly added contact method
  4. Verify everything works as intended

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Jun 5, 2023
@trjExpensify
Copy link
Contributor Author

Great, amended a touch and created the issue for Applause.

Presuming as well with the Web-E issue merged and on prod we can close. Reopen if I missed something!

@dhairyasenjaliya
Copy link
Contributor

Hey @trjExpensify am im eligible for reporting this bug 🐛

@trjExpensify
Copy link
Contributor Author

Ah, sorry man. @Beamanator throwing me off! 😆

FYI there was no payment needed, it was resolved internally

Sent you a contract on this job.

@trjExpensify trjExpensify reopened this Jun 7, 2023
@Beamanator
Copy link
Contributor

Oh shit that's totally my bad 🙃

@dhairyasenjaliya
Copy link
Contributor

no issue 😅

@trjExpensify
Copy link
Contributor Author

Paid!

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 Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

5 participants