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

[C+ Checklist Needs Completion] [$500] Workspace - Unable to select members after adding them to the workspace #34828

Closed
2 of 6 tasks
lanitochka17 opened this issue Jan 19, 2024 · 50 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 19, 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: 1.4.28-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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

1,Navigate to Settings > Profile > Contact Method > New Contact Method > Add Email
2, change the new email as the default contact
3, Copy the main email and remove it
4, Go to Settings > Workspace > Members > click on Invite> then paste the main email or search for the email used to create the account
5, Add the email, click on the checkbox, and observe that it remains unselected

Expected Result:

After changing the default email and removing the main contact email (used to create the Expensify account), adding the main contact address to the workspace as a member should either be selected or not allowed

Actual Result:

After changing the default email and removing the main contact email, attempting to select the main contact address as a member in the workspace by clicking on the checkbox is not work

Workaround:

Unknown

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

Add any screenshot/video evidence

Bug6347877_1705685205802.Contact.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01285e5476dd516a43
  • Upwork Job ID: 1748410004851982336
  • Last Price Increase: 2024-01-26
  • Automatic offers:
    • tienifr | Contributor | 0
@lanitochka17 lanitochka17 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 Jan 19, 2024
@melvin-bot melvin-bot bot changed the title Workspace - -Unable to select members after adding them to the workspace [$500] Workspace - -Unable to select members after adding them to the workspace Jan 19, 2024
Copy link

melvin-bot bot commented Jan 19, 2024

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

Copy link

melvin-bot bot commented Jan 19, 2024

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

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

melvin-bot bot commented Jan 19, 2024

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave 8.
CC @zanyrenney

@tienifr
Copy link
Contributor

tienifr commented Jan 20, 2024

Proposal

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

After changing the default email and removing the main contact email, attempting to select the main contact address as a member in the workspace by clicking on the checkbox is not work

What is the root cause of that problem?

In here, we still use the policy.owner, we should use policy.ownerAccountID instead.

When the user changes the default contact method, the policy.owner is currently not changed to the new default contact method. So when selecting member in WorkspaceMembersPage, it will be disabled because the login of the email, that the account is created from, is still the policy.owner.

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

Comparing logins is not a good way to check if 2 users are the same, we should compare by accountID instead, because 1 user can have multiple contact methods, but only have 1 single accountID.

We should compare accountID and policy.ownerAccountID here instead.

accountID === props.policy.ownerAccountID ||

We can also consider replacing the usage of policy.owner throughout that page (or elsewhere in the app) by policy.ownerAccountID. Some extra places and what we should do with them have been identified here. By the way, when creating the workspace, we need to set the ownerAccountID optimistically (currently we don't).

We've already moved to use accountID similarly throughout the app so we should do it here as well.

What alternative solutions did you explore? (Optional)

We can also fix by updating the policy.owner optimistically to the primary user's email when setting another contact method as default, and make sure it's also updated similarly in the back-end.

@tienifr
Copy link
Contributor

tienifr commented Jan 20, 2024

Proposal updated

@melvin-bot melvin-bot bot added the Overdue label Jan 22, 2024
@greg-schroeder
Copy link
Contributor

Awaiting proposal review @0xmiroslav

@melvin-bot melvin-bot bot removed the Overdue label Jan 22, 2024
@mallenexpensify mallenexpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Jan 24, 2024
Copy link

melvin-bot bot commented Jan 24, 2024

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

@mallenexpensify
Copy link
Contributor

@sobitneupane reassigning, please take over as C+. If you don't have bandwidth, unassign yourself. Thanks

Copy link

melvin-bot bot commented Jan 26, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Jan 26, 2024
@kbecciv kbecciv changed the title [$500] Workspace - -Unable to select members after adding them to the workspace [$500] Workspace - Unable to select members after adding them to the workspace Jan 26, 2024
@greg-schroeder
Copy link
Contributor

@sobitneupane said he's working partially this week, let's try to get this one reviewed ASAP once you're back though!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 26, 2024
@DylanDylann
Copy link
Contributor

I can take over this issue as C+ contributor if @sobitneupane didn't start on it

@sobitneupane
Copy link
Contributor

I am back and will review the proposal by EOD tomorrow.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Mar 6, 2024
@melvin-bot melvin-bot bot changed the title [HOLD react-native-onyx/#482] [$500] Workspace - Unable to select members after adding them to the workspace [HOLD for payment 2024-03-13] [HOLD react-native-onyx/#482] [$500] Workspace - Unable to select members after adding them to the workspace Mar 6, 2024
Copy link

melvin-bot bot commented Mar 6, 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 Mar 6, 2024
Copy link

melvin-bot bot commented Mar 6, 2024

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

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

Copy link

melvin-bot bot commented Mar 6, 2024

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] 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:
  • [@sobitneupane] 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:
  • [@sobitneupane] Determine if we should create a regression test for this bug.
  • [@sobitneupane] 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.
  • [@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@tienifr
Copy link
Contributor

tienifr commented Mar 7, 2024

@youssef-lr I think the PR fix on react-native-onyx here would be out of the original scope. Can I get the bonus for that fix? The same situation is in here cc @sobitneupane @greg-schroeder

@youssef-lr
Copy link
Contributor

@tienifr I think $500 is still a fair price given that the original change was straightforward.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 13, 2024
@greg-schroeder
Copy link
Contributor

Processing

@melvin-bot melvin-bot bot removed the Overdue label Mar 13, 2024
@greg-schroeder
Copy link
Contributor

@sobitneupane $500 (manual request)
@tienifr $500 (paid)

Next up is the checklist!

@greg-schroeder greg-schroeder changed the title [HOLD for payment 2024-03-13] [HOLD react-native-onyx/#482] [$500] Workspace - Unable to select members after adding them to the workspace [C+ Checklist Needs Completion] [$500] Workspace - Unable to select members after adding them to the workspace Mar 13, 2024
@greg-schroeder greg-schroeder removed the Awaiting Payment Auto-added when associated PR is deployed to production label Mar 13, 2024
@greg-schroeder
Copy link
Contributor

@sobitneupane quick bump on the checklist so we can close this out!

@melvin-bot melvin-bot bot added the Overdue label Mar 18, 2024
Copy link

melvin-bot bot commented Mar 18, 2024

@youssef-lr, @sobitneupane, @greg-schroeder, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@youssef-lr
Copy link
Contributor

Waiting on @sobitneupane

@melvin-bot melvin-bot bot removed the Overdue label Mar 18, 2024
@sobitneupane
Copy link
Contributor

sobitneupane commented Mar 20, 2024

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

I guess it was missed while refactoring to use accountID.

  • [@sobitneupane] 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:

N/A

  • [@sobitneupane] 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:

N/A It is an edge case which could be easily missed. Regression Tests should be enough.

  • [@sobitneupane] Determine if we should create a regression test for this bug.

The issue was reported by internal team so I am not sure if regression test is required.

  • [@sobitneupane] 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.

#34828 (comment)

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Navigate to Settings > Profile > Contact Method > New Contact Method > Add Email
  2. Change the new email as the default contact
  3. Copy the main email and remove it
  4. Go to Settings > Workspace > Members > click on Invite> then paste the main email or search for the email used to create the account
  5. Add the email, click on the checkbox, and verify that it's selected

Do we agree 👍 or 👎

@sobitneupane
Copy link
Contributor

Requested payment in newDot.

Payment Summary: #34828 (comment)

@JmillsExpensify
Copy link

$500 approved for @sobitneupane based on summary.

@melvin-bot melvin-bot bot added the Overdue label Mar 25, 2024
@greg-schroeder
Copy link
Contributor

Filed test, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

9 participants