Skip to content

[Due for payment 2025-03-10] [$250] Android - Workspace - Missing workspace with "Requested" label after joining workspace #53081

Closed

Description

@lanitochka17

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: 9.0.66-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch New Expensify app
  2. [User A] Go to workspace settings > Profile > Share
  3. [User A] Click Copy URL
  4. [User A] Send the invite link to User B
  5. [User B] Open the workspace invite link

Expected Result:

Workspace list will show the joined workspace with a "Requested" label.

Actual Result:

Workspace list does not show the joined workspace with a "Requested" label after opening workspace invite link

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6643451_1729699239013.1729698540172_Screen_Recording_20241023_234720.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021893067912231933563
  • Upwork Job ID: 1893067912231933563
  • Last Price Increase: 2025-02-21
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @slafortune

Activity

  1. added
    Daily
    Bug
    on Nov 25, 2024
  2. melvin-bot commented on Nov 25, 2024

    @melvin-bot

    Triggered auto assignment to @slafortune (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.

  3. Shahidullah-Muffakir commented on Nov 25, 2024

    @Shahidullah-Muffakir
    Contributor

    Already tracked under #52394

  4. bernhardoj commented on Nov 26, 2024

    @bernhardoj
    Contributor

    Proposal

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

    There is no pending requested workspace shown when trying to join the workspace by link.

    What is the root cause of that problem?

    This happens if we previously use a workspace join link. For example, if we use workspace A join link then use workspace B join link, then workspace B join link won't work. It all happens because if at least a join link is used once, then we ignore any other incoming link.

    useEffect(() => {
    if (!isJoinLinkUsed) {
    return;
    }
    navigateAfterJoinRequest();
    }, []);
    useEffect(() => {
    if (isUnmounted.current || isJoinLinkUsed) {
    return;
    }

    let isJoinLinkUsed = false;

    It was added to fix an issue where the invite by link API request is triggered multiple times. I can't seem to repro it anymore even after removing the fix, but it probably happened before because the useEffect depends on the whole policy collection.

    image

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

    We have 2 options to solve it. We want the invite API request to only happen once, but it's possible that the policy onyx data isn't ready yet (especially when we migrate to useOnyx), which could give us a wrong result for the if here.

    if (!isEmptyObject(policy) && !policy?.isJoinRequestPending && !PolicyUtils.isPendingDeletePolicy(policy)) {
    Navigation.isNavigationReady().then(() => {
    Navigation.goBack(undefined, false, true);
    Navigation.navigate(ROUTES.WORKSPACE_INITIAL.getRoute(policyID ?? '-1'));
    });
    return;
    }

    Assuming we migrate to useOnyx

    const [policy, policyResult] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${route?.params?.policyID}`);
    const isPolicyLoading = isLoadingOnyxValue(policyResult);
    

    we can replace all the dependencies here with isPolicyLoading.

    }, [policy, policyID, inviterEmail]);

    Then, in the useEffect, if isPolicyLoading is true, then we return early. Then we can remove the isJoinLinkUsed.

    The 2nd option is to convert isJoinLinkUsed into a ref.

  5. melvin-bot commented on Nov 29, 2024

    @melvin-bot

    @slafortune Whoops! This issue is 2 days overdue. Let's get this updated quick!

  6. melvin-bot commented on Dec 3, 2024

    @melvin-bot

    @slafortune 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  7. slafortune commented on Dec 3, 2024

    @slafortune
    Contributor

    Closing this as a duplicate

  8. bernhardoj commented on Dec 4, 2024

    @bernhardoj
    Contributor

    @slafortune this isn't a dupe of #52394. #52394 is a navigation issue where the workspace list page doesn't open, whereas this issue is that the join request isn't sent to the BE if we use a workspace join link (different link) for the 2nd time.

  9. bernhardoj commented on Dec 10, 2024

    @bernhardoj
    Contributor

    @slafortune hi, can you recheck this one, please?

  10. bernhardoj commented on Dec 18, 2024

    @bernhardoj
    Contributor
  11. 28 remaining items

  12. melvin-bot commented on Mar 3, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Mar 3, 2025

    @melvin-bot

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

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

    • @bernhardoj requires payment through NewDot Manual Requests
    • @eh2077 requires payment through NewDot Manual Requests
  14. melvin-bot commented on Mar 3, 2025

    @melvin-bot

    @eh2077 @slafortune @eh2077 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]

  15. added
    Daily
    and removed
    Weekly
    on Mar 10, 2025
  16. melvin-bot commented on Mar 10, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@slafortune)

    • 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/1893067912231933563/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  17. slafortune commented on Mar 10, 2025

    @slafortune
    Contributor

    @eh2077 can you please complete the checklist?

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  18. eh2077 commented on Mar 10, 2025

    @eh2077
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: https://github.com/Expensify/App/pull/37525/files#r1988148533

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: NA

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    NA

    Test:

    As User B:

    1. Have at least 2 workspaces
    2. Copy each workspace share link

    As User A:

    1. Open any chat and paste both workspace share links
    2. Open each link
    3. Verify that each link will request to join the workspace
    4. You will be navigated to the workspace list page and a new workspace with Requested badge is shown

    Do we agree 👍 or 👎

  19. eh2077 commented on Mar 10, 2025

    @eh2077
    Contributor

    @slafortune Thanks for the reminder. Done

  20. bernhardoj commented on Mar 11, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  21. slafortune commented on Mar 11, 2025

    @slafortune
    Contributor

    Reviewer: Role Contributor @bernhardoj owed $250 via NewDot
    Reviewer: Role C+ @eh2077 owed $250 via NewDot

  22. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Mar 11, 2025
  23. JmillsExpensify commented on Mar 12, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  24. JmillsExpensify commented on Mar 17, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @eh2077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions