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

[$500] Web - Admin room - User doesn't land in admin's room of a policy when navigating from oldDot to newD #33600

Closed
1 of 6 tasks
kbecciv opened this issue Dec 26, 2023 · 12 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Dec 26, 2023

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: v1.4.17-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
Expensify/Expensify Issue URL:
Issue reported by: Applause
Slack conversation:

Action Performed:

  1. Make sure you're logged out of NewDot & make sure your last opened chat is not admins room
  2. Navigate to OldDot and log in with an existing account
  3. Navigate to Settings > Policies > Group and note the number of free policies (or simply delete all of them)
  4. Click on the "New Policy" button
  5. Click on the "Free" option
  6. Verify you're redirected to NewDot, that you're logged in with the same account as in OldDot
  7. Tap on the back button
  8. Web/Desktop - Verify the user lands in the #admin room of the policy

Expected Result:

User should land in admin's room

Actual Result:

User doesn't land in admin's room

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

Screen.Recording.2023-12-26.at.3.19.27.in.the.afternoon.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c2dc89604af58ba3
  • Upwork Job ID: 1739670325091950592
  • Last Price Increase: 2024-01-02
@kbecciv kbecciv 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 Dec 26, 2023
@melvin-bot melvin-bot bot changed the title Web - Admin room - User doesn't land in admin's room of a policy when navigating from oldDot to newD [$500] Web - Admin room - User doesn't land in admin's room of a policy when navigating from oldDot to newD Dec 26, 2023
Copy link

melvin-bot bot commented Dec 26, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01c2dc89604af58ba3

Copy link

melvin-bot bot commented Dec 26, 2023

Triggered auto assignment to @JmillsExpensify (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 Dec 26, 2023
Copy link

melvin-bot bot commented Dec 26, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 26, 2023

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

@hoangzinh
Copy link
Contributor

This issue is not a bug, it's our new expectation since this PR #28573 (comment). Creating a workspace from OD does not open the #admins room in ND. Perhaps, we need to update our test trail

@melvin-bot melvin-bot bot added the Overdue label Dec 28, 2023
@DylanDylann
Copy link
Contributor

DylanDylann commented Dec 29, 2023

Proposal

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

  • Web - Admin room - User doesn't land in admin's room of a policy when navigating from oldDot to newD

What is the root cause of that problem?

  • When we go to ND from OD, it will call:
    App.setUpPoliciesAndNavigate(session);
  • And we do not have logic that navigates user to admin report when navigating from oldDot to newDot

    App/src/libs/actions/App.ts

    Lines 345 to 354 in 5c5c862

    Navigation.isNavigationReady()
    .then(() => {
    if (transitionFromOldDot) {
    // We must call goBack() to remove the /transition route from history
    Navigation.goBack(ROUTES.HOME);
    }
    Navigation.navigate(ROUTES.WORKSPACE_INITIAL.getRoute(policyID));
    })
    .then(endSignOnTransition);
    }

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

  • We should add an additional param, named shouldNavigateToAdminChat, and update the above function to:
function createWorkspaceWithPolicyDraftAndNavigateToIt(policyOwnerEmail = '', policyName = '', transitionFromOldDot = false, makeMeAdmin = false, shouldNavigateToAdminChat) {
    const policyID = Policy.generatePolicyID();
    Policy.createDraftInitialWorkspace(policyOwnerEmail, policyName, policyID, makeMeAdmin);
+  const adminsChatReportID = Policy.createWorkspace(policyOwnerEmail, makeMeAdmin, policyName, policyID);
    Navigation.isNavigationReady()
        .then(() => {
            if (transitionFromOldDot) {
                // We must call goBack() to remove the /transition route from history
                Navigation.goBack(ROUTES.HOME);
            }
+            if (shouldNavigateToAdminChat) {
+                Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(adminsChatReportID));
+           }
            Navigation.navigate(ROUTES.WORKSPACE_INITIAL.getRoute(policyID));
        })
        .then(endSignOnTransition);
}

What alternative solutions did you explore? (Optional)

  • NA

@DylanDylann
Copy link
Contributor

DylanDylann commented Dec 29, 2023

@JmillsExpensify Can you confirm the expected behavior here? (Should we navigate the user to the admin report in this case?)

Copy link

melvin-bot bot commented Jan 1, 2024

@JmillsExpensify, @allroundexperts Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Jan 2, 2024

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

Copy link

melvin-bot bot commented Jan 2, 2024

@JmillsExpensify, @allroundexperts Still overdue 6 days?! Let's take care of this!

@JmillsExpensify
Copy link

I agree that this isn't a bug.

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 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

6 participants