-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-03-31] [$250] Workspace - Incorrect members number when import spreadsheet #56941
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
Comments
Triggered auto assignment to @OfstadC ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-02-17 13:55:30 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace - Incorrect members number when import spreadsheet What is the root cause of that problem?When downloaded csv the owner was added and then we are re-importing all members/rows from the csv and notifying with that number without checking if some of the members are already member of the policy App/src/libs/actions/Policy/Member.ts Lines 760 to 767 in 84885ab
What changes do you think we should make in order to solve the problem?We should exclude emails that are already members of a policy by filtering out members emails that are already member of the policy here
BTW there are some exceptions or edge cases to this case because even if there is a member with that email the data in the csv might have different fields like What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?assert importPolicyMembers excludes already existing members of a workspace What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Incorrect numbers of members added when importing workspace members. What is the root cause of that problem?When we download the CSV of the workspace members, it includes all of the members. When we import it, we get the length of the member rows and use it to show how many members are added. App/src/libs/actions/Policy/Member.ts Lines 759 to 760 in b22da34
App/src/libs/actions/Policy/Member.ts Line 210 in b22da34
It's not accurate because there can be an existing member already. What changes do you think we should make in order to solve the problem?We first need to filter out the imported member if the member already exists on the workspace members.
However, if the filtered result is 0, the modal will still show "1 member has been added". Line 823 in b22da34
Also, it's possible that we import an existing member, but with an updated role (we don't need to care for other properties for now because they are all ignored). To make the message more useful, I think we should add a case where there is no member added and there is one or more members updated. For example, when there is no member added/updated, we can say: "No member has been added/updated" To get how many member has been updated and added, we can use this logic.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?We can test |
Job added to Upwork: https://www.upwork.com/jobs/~021891920662582766128 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov ( |
Thank you @FitseTLT for proposal, RCA is correct. While your solution is correct I really think @bernhardoj 's proposal is more fit for our situation since it provides a better way to handle updated members while correctly ignoring the same members. |
I think we can go with @bernhardoj 's proposal which suggests to better show how many imported members were added and how many were actually updated. C+ reviewed 🎀 👀 🎀 P. S: The expected result does not provide clear explanation on how to handle existing members with different roles from spreadsheet. If we just want to show how many members were added not regarding if they were added or updated then we can go with first proposal. But still selected proposal makes more sense to me |
Triggered auto assignment to @jasperhuangg, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@OfstadC, @jasperhuangg, @alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Can someone from the team check/create the copy first? We don't have this yet on the App and this is the one that I propose in the proposal.
|
Triggered auto assignment to @LLPeckham ( |
Just looking at the pop up as a whole:
Import successful
Import successful
Import successful Thoughts cc @jasperhuangg @bernhardoj @jjcoffee |
That looks good. Thanks! |
@LLPeckham Oh wait, the existing copy for member added is:
But the copy for member updated above is
Do you think we should add
|
Ah good catch - sure let's do the following:
Import successful
Import successful
Import successful
|
Thanks @LLPeckham, @bernhardoj let me know if this new copy makes sense, let's get this done! |
Thanks! Preparing the PR... |
PR is ready cc: @alitoshmatov |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.17-1 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 2025-03-31. 🎊 For reference, here are some details about the assignees on this issue:
|
@alitoshmatov @OfstadC @alitoshmatov The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
@alitoshmatov Please complete BZ checklist prior to the payment date. Thanks! 😃 |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalPrecondition:
Test:
Do we agree 👍 or 👎 |
Completed checklist and requested payment in ND |
Requested in ND. |
Payment Summary
BugZero Checklist (@OfstadC)
|
$250 approved for @alitoshmatov |
$250 approved for @bernhardoj |
Uh oh!
There was an error while loading. Please reload this page.
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v9.0.99-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5599527&group_by=cases:section_id&group_id=229065&group_order=asc
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Lenovo 80ES / Windows 10 Pro
App Component: Workspace Settings
Action Performed:
Expected Result:
Import successful modal should display the correct number of imported members
Actual Result:
Import successful modal does not display the correct number of imported members
When import 2 members - Import successful modal displays 3 members
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6745694_1739797104103.Recording__5074.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @OfstadCThe text was updated successfully, but these errors were encountered: