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-10-02] [CVP] Private domain email is being prompted to "Add work email" in the VBBA flow and then redirecting to OldDot settings when clicked #48420

Closed
6 tasks done
trjExpensify opened this issue Sep 2, 2024 · 29 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

@trjExpensify
Copy link
Contributor

trjExpensify commented Sep 2, 2024

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


Version Number: v9.0.27-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): tom+manual1@trj.chat
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @trjExpensify
Slack conversation:

Action Performed:

  1. Create a workspace
  2. Go to More features
  3. Enable Workflows
  4. Go to Workflows page, enable Payments
  5. Click Connect bank account
  6. Add a VBBA (Instructions here)
  7. Go through the steps to completion
  8. Observe the "One more thing!" step to Add work email
  9. Click the Add work email button
  10. Observe the redirect to OldDot settings

Expected Result:

  1. tom+manual1@trj.chat is a private domain email, I shouldn't have to add a work email address as a secondary login
  2. If we do need to show the "Add work email" step, clicking the button should redirect to NewDot settings here: https://new.expensify.com/settings/profile/contact-methods/new

Actual Result:

  1. I was prompted to "Add work email" despite my account being a private domain
  2. When clicked, I was redirected to OldDot settings to add a secondary login.

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

image image

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @JmillsExpensify
@trjExpensify trjExpensify added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 2, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 2, 2024
Copy link

melvin-bot bot commented Sep 2, 2024

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

Copy link

melvin-bot bot commented Sep 2, 2024

Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@abzokhattab
Copy link
Contributor

abzokhattab commented Sep 2, 2024

Edited by proposal-police: This proposal was edited at 2024-09-02 18:03:52 UTC.

Proposal

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

Private domain email users are being prompted to "Add work email" in the VBBA flow, which redirects them to the OldDot settings when clicked.

What is the root cause of that problem?

The user is redirected to the old settings here:

onPress={() => {
Link.openOldDotLink(CONST.ADD_SECONDARY_LOGIN_URL);
}}

and also here:
onPress={() => {
Link.openOldDotLink(CONST.ADD_SECONDARY_LOGIN_URL);
}}

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

  • We should change the onPress behavior here and here to navigate to ROUTES.SETTINGS_NEW_CONTACT_METHOD instead.
  • Additionally, we can pass the current route as the backTo argument in both, so that the modal returns to the correct page on clicking the back button:
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.getRoute(Navigation.getActiveRoute()));

then add the navigateBackTo to the goBack fallback route in the ContactMethodsPage

  • We shoule also remove the ADD_SECONDARY_LOGIN_URL from the CONST file, as it will no longer be used anywhere else.

POC

Screen.Recording.2024-09-02.at.8.43.47.PM.mov

What alternative solutions did you explore? (Optional)

N/A

@trjExpensify
Copy link
Contributor Author

trjExpensify commented Sep 4, 2024

@abzokhattab that sounds like it addressing the part of redirecting to the right place, but what about why I'm being asked to Add work email when the account I'm using is a private domain email already?

@abzokhattab
Copy link
Contributor

abzokhattab commented Sep 4, 2024

in this case i think we should add a condition to show the add Work Email only if the domain is public, meaning use
&& isEmailPublicDomain(session?.email ?? '') here and here

@trjExpensify
Copy link
Contributor Author

trjExpensify commented Sep 4, 2024

only if the domain is not a private one

Right?

@abzokhattab
Copy link
Contributor

correct .. my bad 😅

@shubham1206agra
Copy link
Contributor

Proposal

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

Private domain email users are being prompted to "Add work email" in the VBBA flow, which redirects them to the OldDot settings when clicked.

What is the root cause of that problem?

There are two problems.

  1. Showing the Add work email option on private domain email (another case is public email where secondary private email is added).

This is happening because the conditional logic is not related to private email at all. The condition depends on the status of the Expensify card feature.

const isUsingExpensifyCard = user?.isUsingExpensifyCard;

  1. Redirecting to OldDot Link to add contacts.

This was made as a conscious choice when we were refactoring VBBA.

Code links

onPress={() => {
Link.openOldDotLink(CONST.ADD_SECONDARY_LOGIN_URL);
}}

onPress={() => {
Link.openOldDotLink(CONST.ADD_SECONDARY_LOGIN_URL);
}}

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

To solve the first problem, we can iterate through Onyx key loginList and find if there exists any private email which is validated instead of user?.isUsingExpensifyCard.

To solve the 2nd problem, we will use ROUTES.SETTINGS_NEW_CONTACT_METHOD route instead.

Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD.getRoute(Navigation.getActiveRoute()));

What alternative solutions did you explore? (Optional)

Kill this entire logic as Workspace feeds is about to be released making it not required.

@trjExpensify
Copy link
Contributor Author

Kill this entire logic as Workspace feeds is about to be released making it not required.

Yeah, on reflection, this is the right course of action here. It's a redundant step with workspace feeds, we don't need you to add a privateEmail any more. CC: @JmillsExpensify @mountiny agree? 🪓

@mountiny
Copy link
Contributor

mountiny commented Sep 4, 2024

I agree to remove this, its been confusing for the users too

@JmillsExpensify
Copy link

Yeah, great point that this is another simplification we get with going with the superior design of workspace feeds. These kinds of unnecessary steps can be removed.

@trjExpensify
Copy link
Contributor Author

Okay, great! @shubham1206agra let's do that then.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 4, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 4, 2024
@shubham1206agra
Copy link
Contributor

PR is up for review.

Copy link

melvin-bot bot commented Sep 4, 2024

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

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

This issue has not been updated in over 15 days. @JmillsExpensify, @mountiny, @shubham1206agra, @aimane-chnaif eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@shubham1206agra
Copy link
Contributor

@JmillsExpensify This is ready for payment btw.

@mountiny mountiny added Daily KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review Monthly KSv2 labels Oct 2, 2024
@mountiny mountiny changed the title [CVP] Private domain email is being prompted to "Add work email" in the VBBA flow and then redirecting to OldDot settings when clicked [HOLD for payment 2024-10-02] [CVP] Private domain email is being prompted to "Add work email" in the VBBA flow and then redirecting to OldDot settings when clicked Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

Payment Summary

Upwork Job

BugZero Checklist (@JmillsExpensify)

  • 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//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label Oct 4, 2024
Copy link

melvin-bot bot commented Oct 7, 2024

@JmillsExpensify, @mountiny, @shubham1206agra, @aimane-chnaif Eep! 4 days overdue now. Issues have feelings too...

@aimane-chnaif
Copy link
Contributor

I am using upwork

@JmillsExpensify
Copy link

Payment summary:

@melvin-bot melvin-bot bot removed the Overdue label Oct 7, 2024
@shubham1206agra
Copy link
Contributor

@JmillsExpensify Can you send the offers please?

@JmillsExpensify
Copy link

Offers sent to both.

@JmillsExpensify
Copy link

@aimane-chnaif for yours, please complete the BZ checklist beforehand.

@shubham1206agra
Copy link
Contributor

@JmillsExpensify Accepted offer

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Oct 8, 2024
@aimane-chnaif
Copy link
Contributor

We updated the flow by removing private domain email step. I don't think there was a specific regression which caused this bug.

Regression Test Proposal

  1. Create a new workspace
  2. Go to More features
  3. Enable Workflows
  4. Go to Workflows page, enable Payments
  5. Click Connect bank account
  6. Add a VBBA (Instructions here)
  7. Go through the steps to completion
  8. Verify that "All set" is shown

@melvin-bot melvin-bot bot added the Overdue label Oct 10, 2024
Copy link

melvin-bot bot commented Oct 11, 2024

@JmillsExpensify, @mountiny, @shubham1206agra, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Oct 15, 2024

@JmillsExpensify, @mountiny, @shubham1206agra, @aimane-chnaif 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@JmillsExpensify
Copy link

All paid out. Thanks for the regression test. I'll get one created.

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
Development

No branches or pull requests

7 participants