You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Hold for payment 03-02-2023] [$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh. #14293
Create a workspace from an account with a domain on the policyExpenseChat beta
Invite a member to the workspace such that a workspace chat is created for them
Write a couple of messages in the chat for good measure
Delete the workspace
Observe that the archiveReason displays: “This chat room has been archived”
Refresh the browser
Observe that the archiveReason updates to the correct message: "This workspace chat is no longer active because %workspaceName% is no longer an active workspace."
Expected Result:
We shouldn't require a refresh to display the correct archiveReason
Actual Result:
Requires a refresh of the browser
Workaround:
Yes, refresh the browser.
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.2.54-1 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:
changed the title [-]When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/-][+][$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/+]on Jan 13, 2023
Proposal
The root cause we don't set optimistic data with the proper reason for report_actions being closed while calling 'DeleteWorkspace' API. As we don't set it, it shows default value of "This chat room was archived" until we get response from onyx pusher. We can set the proper reason based on condition on optimistic data itself. For this instance its mentioned as "policyExpenseChat beta" and i am able find different message reasons as well for 'reportArchiveReasons' on en.js page. We can also add appropriate checks and set the proper message in the optimistic data for all instances.
[CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'This chat room has been archived.',
[CONST.REPORT.ARCHIVE_REASON.ACCOUNT_CLOSED]: ({displayName})=>`This workspace chat is no longer active because ${displayName} closed their account.`,
[CONST.REPORT.ARCHIVE_REASON.ACCOUNT_MERGED]: ({displayName, oldDisplayName})=>`This workspace chat is no longer active because ${oldDisplayName} has merged their account with ${displayName}.`,
[CONST.REPORT.ARCHIVE_REASON.REMOVED_FROM_POLICY]: ({displayName, policyName})=>`This workspace chat is no longer active because ${displayName} is no longer a member of the ${policyName} workspace.`,
[CONST.REPORT.ARCHIVE_REASON.POLICY_DELETED]: ({policyName})=>`This workspace chat is no longer active because ${policyName} is no longer an active workspace.`,
If the reviewer can let me know on what occasions we want to show which archived message, i can add the appropriate messages in optimistic data itself.
@mountiny Would I be compensated as I was the first to root cause the issue and caused it to turn out internal?. I thought the process was to compensate 25% or 50%,100% of original bug, if the bug turns out to be internal depending on the analysis.
@trjExpensify I have finished the PR on this one and its ready for a review. aught one small issue with some race condition I guess, when user clicked on workspace chat which was just archived, there was some time in which it throws error, because the report actions are not loaded correctly (missing to be more specific). I have updated the code to handle that situation better.
changed the title [-][$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/-][+][Awaiting Payment 03-02-2023] [$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/+]on Feb 1, 2023
changed the title [-][Awaiting Payment 03-02-2023] [$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/-][+][Hold for payment 03-02-2023] [$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/+]on Feb 1, 2023
Activity
melvin-bot commentedon Jan 13, 2023
Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new.
[-]When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/-][+][$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/+]melvin-bot commentedon Jan 13, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01878e516117d2102f
melvin-bot commentedon Jan 13, 2023
Current assignee @trjExpensify is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jan 13, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)melvin-bot commentedon Jan 13, 2023
Triggered auto assignment to @AndrewGable (
External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.abdulrahuman5196 commentedon Jan 13, 2023
Proposal
The root cause we don't set optimistic data with the proper reason for report_actions being closed while calling 'DeleteWorkspace' API. As we don't set it, it shows default value of "This chat room was archived" until we get response from onyx pusher. We can set the proper reason based on condition on optimistic data itself. For this instance its mentioned as "policyExpenseChat beta" and i am able find different message reasons as well for 'reportArchiveReasons' on en.js page. We can also add appropriate checks and set the proper message in the optimistic data for all instances.
Code References:
App/src/libs/actions/Policy.js
Lines 63 to 84 in b42a6cb
App/src/languages/en.js
Lines 231 to 237 in b42a6cb
App/src/components/ArchivedReportFooter.js
Line 55 in b42a6cb
If the reviewer can let me know on what occasions we want to show which archived message, i can add the appropriate messages in optimistic data itself.
abdulrahuman5196 commentedon Jan 13, 2023
And to note for member devices i don't think we get the report action message appropriately via pusher resulting in the default action choosen from -
App/src/components/ArchivedReportFooter.js
Line 55 in b42a6cb
19 remaining items
abdulrahuman5196 commentedon Jan 19, 2023
@mountiny Would I be compensated as I was the first to root cause the issue and caused it to turn out internal?. I thought the process was to compensate 25% or 50%,100% of original bug, if the bug turns out to be internal depending on the analysis.
mountiny commentedon Jan 20, 2023
Yes, you will @abdulrahuman5196 :) I think it was 25% but let me or @trjExpensify confirm. This would be paid once the fix is implemented.
Looking into this today, was running out of time the previous days.
abdulrahuman5196 commentedon Jan 20, 2023
Thank you @mountiny
mountiny commentedon Jan 20, 2023
@trjExpensify I have finished the PR on this one and its ready for a review. aught one small issue with some race condition I guess, when user clicked on workspace chat which was just archived, there was some time in which it throws error, because the report actions are not loaded correctly (missing to be more specific). I have updated the code to handle that situation better.
mountiny commentedon Jan 24, 2023
PR merged 🎉
trjExpensify commentedon Jan 26, 2023
Nice one! Okay, so I've sent the following offers on this Upwork job:
@rushatgabhane $1,000 for the C+ internal PR review
@abdulrahuman5196 $250 for helping with identifying the cause after this initially went external.
The countdown will begin 7 days from being deployed to production.
abdulrahuman5196 commentedon Jan 26, 2023
Thank you @trjExpensify & @mountiny.
Accepted.
[-][$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/-][+][Awaiting Payment 03-02-2023] [$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/+][-][Awaiting Payment 03-02-2023] [$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/-][+][Hold for payment 03-02-2023] [$1000] When removing a member from the workspace, the archiveReason displays a “This chat room was archived” placeholder message, only updating to the correct archiveReason after a refresh.[/+]abdulrahuman5196 commentedon Feb 6, 2023
Hi, @trjExpensify Gentle remainder. I suppose this issue is past 7 days regression period and still waiting on payment.
MelvinBot commentedon Feb 6, 2023
@trjExpensify, @rushatgabhane, @mountiny Still overdue 6 days?! Let's take care of this!
MelvinBot commentedon Feb 6, 2023
@trjExpensify, @rushatgabhane, @mountiny Still overdue 6 days?! Let's take care of this!
mountiny commentedon Feb 6, 2023
Yeah sorry, @trjExpensify will be onto this once soon! Thanks for the bump
trjExpensify commentedon Feb 7, 2023
Settled up both contracts, thanks everyone!