-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] [MEDIUM] Workspace - When adding a member to WS fails, a "Chat Report" conversation is created #34056
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01ff2d94edb1b3acf6 |
Triggered auto assignment to @kadiealexander ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.If we add a WS member and it fails, closing/clearing the error doesn't remove the expense chat. What is the root cause of that problem?When we press the clear/close error message, we only remove them from POLICY_MEMBERS and PERSONAL_DETAILS_LIST onyx App/src/libs/actions/Policy.js Lines 997 to 1004 in f5a3c02
but we never clear the optimistic expense chat that we add when adding the member. What changes do you think we should make in order to solve the problem?Remove the optimistic expense chat in (we can iterate over all reports that is a policy expense chat with a policy ID of What alternative solutions did you explore? (Optional)Or immediately clear the report if the request fails in the App/src/libs/actions/Policy.js Lines 527 to 534 in f5a3c02
(easier and no need to iterate over all reports every time clearing an error) |
ProposalPlease re-state the problem that we are trying to solve in this issue.When removing the error of adding a member to WS, the "Chat Report" conversation remains What is the root cause of that problem?In here, we're not removing the expense that if the members fails to be added. And we also don't clear them when we close the error message, so it remains in Onyx. What changes do you think we should make in order to solve the problem?We have a complication here where when adding multiple members, it's possible that some members were added successfully, and some members failed to be added (like the case of
For the members that truly failed to be added, we can remove the expense chat for them here as well. Because if the member failed to be added, it doesn't make sense to keep the expense chat. In case we don't want to remove the expense chat at this step, we should update
What alternative solutions did you explore? (Optional)NA |
@jjcoffee bump to review these proposals please! |
Reviewing tomorrow! |
I'm leaning towards the alternative solution in @bernhardoj's proposal, as it sounds like it would be a nice straightforward solution. I am a bit unsure on the exact expected result here, however. It looks like the report does actually get created on the BE, at least for the emails I tested. Can you confirm @bernhardoj? |
I tested by inviting a VoIP phone number and after relogin, the policy expense chat is not available anymore, indicating it's not created on the BE. |
Hmm what error do you get when inviting that number? For an "incorrect" email (e.g. When logging out and back in and opening the Workspace members list I also get a 404 error and an endless loader (even if I previously dismissed the initial error on adding the member). The workspace-member chat also persists, and shows up in search, so I suspect we may need some BE changes here too to actually remove the report for this case. That is if this is actually a case we need to handle! I've also tried an invalid number This behaves more as you describe, with the chat disappearing on relogin (and it's not accessible via deeplink). @tienifr's proposal is correct though in that for multiple members the whole |
@jjcoffee I think this is not ideal UX and should be fixed, imagine if I add 10 users, one of them has issue (eg invalid number). Then all 10 failed and I'd have to add again one by one. Only the user with error should have error, the rest should be added normally. |
Confirmed that this only happens for emails (
Hmm so it looks like it actually depends on the order in which you invite people, so if the first invite is to a "real" email (that succeeds), followed by any number of fake/bad numbers, then the real email will get added (appears on oldDot, and the report persists after relogin). Another BE fix required there! In summary, I'm wondering if it might be best to go with a fully BE fix here where the BE returns the relevant Onyx data to remove the optimistically created reports (since there are a couple BE changes required anyway). If we want a faster fix I'm good with going with the alt. solution in @bernhardoj's proposal which doesn't require any BE changes to work, but with the caveat that it will remove optimistically created expense chats for all invited members if the request fails (even if some of the members did get added). It's not perfect, but it's better than before and those chats would re-appear after relogin! 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@jjcoffee This might get reported as another bug later. I think we should go with a solution that doesn't lead to another bug if that's possible. Would you mind giving some feedback on my proposal? Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Taking over from Joel |
@luacmartins, @jjcoffee, @kadiealexander Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@luacmartins, @jjcoffee, @kadiealexander Eep! 4 days overdue now. Issues have feelings too... |
@luacmartins, @jjcoffee, @kadiealexander Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
Cleaning up Wave 6 issues (there are hundreds) - adding users to a Workspace is an admin-only action, so setting this to Wave 8. Will let you decide on priority @zanyrenney! |
@luacmartins, @jjcoffee, @kadiealexander 10 days overdue. Is anyone even seeing these? Hello? |
@luacmartins, @jjcoffee, @kadiealexander 12 days overdue. Walking. Toward. The. Light... |
This issue has not been updated in over 14 days. @luacmartins, @jjcoffee, @kadiealexander eroding to Weekly issue. |
Hi there - can we merge this issue into this job? It seems like both GHs involve the 'Auth GetRestrictedAuthTokenByEmail returned an error' error. |
@luacmartins / @jjcoffee could you please check the issue linked above and see if it would have the same fix? |
That issue doesn't appear to be related, the error isn't the same and it's an entirely different flow. cc @Christinadobrzyn |
#25592 seems to be related, I think we can either hold on that or ask Applause for a retest cc @kadiealexander |
Have asked Applause to retest! |
@kadiealexander Now the error does not appear. Recording.37.mp4 |
This issue has not been updated in over 15 days. @luacmartins, @jjcoffee, @kadiealexander 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! |
@kavimuru could you please retest this issue? |
Not reproducible now Recording.184.mp4 |
Cool, seems like we can close this issue then. Thank you! |
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: 1.4.22-0
Reproducible in staging?: Y
Reproducible in production?: N
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:
Expected Result:
If an error occurs in adding a participant to WS, the created conversation must be deleted from LHN or archived, preserving its original form
Actual Result:
When removing the error of adding a member to WS, the "Chat Report" conversation remains
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6333446_1704482464611.Recording__1042.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @AndrewGableThe text was updated successfully, but these errors were encountered: