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

[HOLD for payment 2023-10-25] [$500] iOS - WS Invite - Invite message link does not lead to invite message page #29163

Closed
3 of 6 tasks
izarutskaya opened this issue Oct 10, 2023 · 37 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Oct 10, 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!


Issue found when executing PR #25543

Version Number: 1.3.80-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:

Pre-requisite: user must be logged in, must have sent the invite message link to any workspace to any conversation.

  1. Go to the conversation you have sent the invite message link.
  2. Tap on the invite message link.

Expected Result:

Invite message page should be displayed.

Actual Result:

Workspace page is displayed

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

Android: Native
Android: mWeb Chrome
iOS: Native
Bug6231498_1696920012998.Sgjo9409_1_.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0142f9bb42ec3d0112
  • Upwork Job ID: 1711668274402217984
  • Last Price Increase: 2023-10-10
  • Automatic offers:
    • dukenv0307 | Contributor | 27158437
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment 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 Oct 10, 2023
@melvin-bot melvin-bot bot changed the title iOS - WS Invite - Invite message link does not lead to invite message page [$500] iOS - WS Invite - Invite message link does not lead to invite message page Oct 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0142f9bb42ec3d0112

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 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

@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

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

@izarutskaya
Copy link
Author

Not reproduced on Prod. It redirects to browser.

20231010_121241.mp4

@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Oct 10, 2023

Triggered auto assignment to @iwiznia (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@hungvu193
Copy link
Contributor

hungvu193 commented Oct 10, 2023

Proposal

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

Invite message link lead to wrong page.

What is the root cause of that problem?

We had a check here if invitedEmailsToAccountIDsDraft is empty, we will go back to previous page.

if (_.isEmpty(this.props.invitedEmailsToAccountIDsDraft)) {
Navigation.goBack(ROUTES.WORKSPACE_INITIAL.getRoute(this.props.route.params.policyID), true);
return;
}

It was introduced from this PR (#22262)

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

Instead of goBack when invitedEmailsToAccountIDsDraft is empty, we should display FullPageNotFoundView instead.
So we will need to add the condition _.isEmpty(this.props.invitedEmailsToAccountIDsDraft) to our shouldShow props of FullPageNotFoundView:

 <FullPageNotFoundView
      shouldShow={_.isEmpty(this.props.policy) || !PolicyUtils.isPolicyAdmin(this.props.policy) || PolicyUtils.isPendingDeletePolicy(this.props.policy) || _.isEmpty(this.props.invitedEmailsToAccountIDsDraft)}

And remove this block of code

What alternative solutions did you explore? (Optional)

Instead of navigating to InitialPage, we should goBack to WorkspaceInvitePage instead.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Oct 10, 2023

Proposal

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

I think the expectation should be updated, when we navigate to that invite message page via link, we'll not be able to display the invite message page since we didn't select any users to invite yet.

So the best UX here would be for the user to navigate to the Invite new members page to select members to invite and then they can open the invite message page.

This is a regression from this PR refactor change (although not a deploy blocker since it was deployed to prod a long time ago). The refactor has changed the intended behavior from the Workspace Invite page to Workspace Initial page.

What is the root cause of that problem?

Currently we're navigating to the initial workspace page here if the invite members draft is not found.

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

Here, we should update to navigate the "Invite new members" page instead.

Navigation.goBack(ROUTES.WORKSPACE_INVITE.getRoute(this.props.route.params.policyID), true);

When investigating this, I found there's an existing bug here where the lastRoute could be falsy, leading to app crashes, to fix that we should update it to

if (lastRoute.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR && lastRoute && lastRoute.state && lastRoute.state.index > 0) {

What alternative solutions did you explore? (Optional)

In that draft members empty case, we could navigate to the WORKSPACE_MEMBERS page similar to after we send the invitation here.

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Oct 10, 2023

For deploy blocker issues, offending PR should be identified in root cause unless coming from staging backend

@mallenexpensify
Copy link
Contributor

Just seeing this now, sorry I missed it (also weird it's an hourly and hasn't gone overdue in 16 hours).
@sobitneupane , can you review the above? Do you have any processes in place to be notified of hourly issues? We use it internally but I still missed this.

Asking about in #qa here
Also pinging Sobit in #contributor-plus for 👀

@jasperhuangg
Copy link
Contributor

Personally, I think we should just close this out. This doesn't seem like behavior anyone would ever engage in. Even if they were to do this, I think the current behavior makes sense. It wouldn't make sense to take you back to the invite-members flow, since you have technically already exited that flow. Going to close this out.

@sobitneupane
Copy link
Contributor

sobitneupane commented Oct 11, 2023

I don't think it's a deploy blocker. It is reproducible in Prod as well. And the other thing is it is reproducible in all platforms.

We navigate users to Invite Message Page if there are any invited emails present in draft for the workspace. But if there is no invited emails in the draft, we redirect users to Workspace Initial Settings Page. We used to initially redirect it to Workspace Invite Page (implemented by this PR) which was later changed to Workspace Initial Page by this PR which doesn't look like intended change.

@mallenexpensify
Copy link
Contributor

Thanks @jasperhuangg and @sobitneupane !

@dukenv0307
Copy link
Contributor

dukenv0307 commented Oct 11, 2023

@sobitneupane is right that this is a regression from this PR refactor change (although not a deploy blocker since it was deployed to prod a long time ago). The refactor has changed the intended behavior from the Workspace Invite page to Workspace Initial page.

so @jasperhuangg IMO we should reopen this issue

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

📣 @sobitneupane Please request via NewDot manual requests for the Reviewer role ($500)

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@dukenv0307
Copy link
Contributor

@sobitneupane The PR is ready for review.

@tgolen
Copy link
Contributor

tgolen commented Oct 12, 2023

Yes, sorry, this was a regression that was not intended and the constant just needs to be swapped. I had a conflict come up with that constant in the PR and didn't resolve it properly.

@sobitneupane
Copy link
Contributor

When investigating this, I found there's an existing bug here where the lastRoute could be falsy, leading to app crashes, to fix that we should update it to

@dukenv0307 Can you please explain about the issue you are mentioning here. I remember having an issue where app crashes on navigating request money page through link. But I believe it was resolved by some other PR.

@dukenv0307
Copy link
Contributor

@sobitneupane You're right. I've bugged like that in the past and I remember the issue you said, please ignore it and continue reviewing.

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @dukenv0307 got assigned: 2023-10-12 11:00:37 Z
  • when the PR got merged: 2023-10-17 12:46:54 UTC
  • days elapsed: 3

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 18, 2023
@melvin-bot melvin-bot bot changed the title [$500] iOS - WS Invite - Invite message link does not lead to invite message page [HOLD for payment 2023-10-25] [$500] iOS - WS Invite - Invite message link does not lead to invite message page Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

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

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane] 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:
  • [@sobitneupane] A discussion in #expensify-bugs 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:
  • [@sobitneupane / @dukenv0307] Determine if we should create a regression test for this bug.
  • [@sobitneupane / @dukenv0307] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@mallenexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 25, 2023
@mallenexpensify
Copy link
Contributor

Lil confused but ....

Issue reporter: Applause
Contributor: @dukenv0307 paid $750 via Upwork, inc. urgency bonus (it looks like it was technically one hour over 3 days)
Contributor+: @sobitneupane due $750 via NewDot. inc. urgency bonus

I see regression mentioned above, my assumption is that this issue came from another regression, not that there was one here, please correct me if i'm wrong. Unsure if we want a regression test specifically for this if the issue came from another, what cha think @sobitneupane ?

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@sobitneupane
Copy link
Contributor

I see regression mentioned above, my assumption is that this issue came from another regression, not that there was one here, please correct me if i'm wrong.

@mallenexpensify You are right. This issue was regression from #28050. There is no regression from the PR associated with the issue.

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@sobitneupane
Copy link
Contributor

sobitneupane commented Oct 30, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

#28050

  • [@sobitneupane] 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:

#29163 (comment)

  • [@sobitneupane] A discussion in #expensify-bugs 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:

This issue was caused by some merge conflict during a large refactor.

  • Determine if we should create a regression test for this bug.

Yes.

  • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

#29163 (comment)

@sobitneupane
Copy link
Contributor

sobitneupane commented Oct 30, 2023

Regression Test Proposal

  1. Go to Settings > Workspaces > Select any workspace
  2. Go to Members > Invite > Invite message page
  3. Copy the URL
  4. Send this to a report
  5. Logout out and login again
  6. Click on the url sent in step 3.
  7. Verify that the user is redirected to invite page appears

Do we agree 👍 or 👎

@sobitneupane
Copy link
Contributor

#29163 (comment)

Requested payment on newDot.

@mallenexpensify
Copy link
Contributor

Thanks @sobitneupane ! Regression test GH created

Payment breakdown above is up to date.

@JmillsExpensify
Copy link

$750 payment approved for @sobitneupane based on this summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests