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

[$1000] [HOLD for payment 2023-06-21] [HOLD for payment 2023-06-19] Web - New Group - Wrong user details page opens on clicking at display names #20583

Closed
1 of 6 tasks
kbecciv opened this issue Jun 12, 2023 · 34 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 Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Jun 12, 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!


Action Performed:

  1. Click on fab icon
  2. Create a new group
  3. Refresh the page
  4. Click on each display name and check if the user details are correct

Expected Result:

Correct user details should open

Actual Result:

The user details aren't of the clicked user

Workaround:

Unknown

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: 1.3.26.1

Reproducible in staging?: Yes

Reproducible in production?: No

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: Any additional supporting documentation

Screen.Recording.2023-06-12.at.2.21.12.PM.mov
Recording.3075.mp4

Expensify/Expensify Issue URL:

Issue reported by: @Puneet-here

**Slack conversation:**https://expensify.slack.com/archives/C049HHMV9SM/p1686560410530529

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010a5aeee05bd7da3a
  • Upwork Job ID: 1671541422809731072
  • Last Price Increase: 2023-06-21
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Jun 12, 2023
@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 Jun 12, 2023

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

@BhuvaneshPatil
Copy link
Contributor

Proposal

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

Wrong user details page opens on clicking at display names

What is the root cause of that problem?

The root cause of this problem is that, the accountIDs and the participant emails are not matched in correct order.
This is the screen shot of accountIDs and their emails in ReportScreen
image

And here are the details of those users -
Control-V(10)

If we pay close attention for first two users in the first picture IDs are interchanged, That's why opening the user details were taking on wrong page.
This is the issue video -

7.New.Expensify.Mozilla.Firefox.2023-06-12.19-00-08.mp4

Here we are using index to navigate -

<Text>
<Text>{props.translate('reportActionsView.beginningOfChatHistory')}</Text>
{_.map(displayNamesWithTooltips, ({displayName, pronouns, tooltip}, index) => (
<Text key={`${displayName}${pronouns}${index}`}>
<Tooltip text={tooltip}>
<Text
style={[styles.textStrong]}
onPress={() => Navigation.navigate(ROUTES.getProfileRoute(participantAccountIDs[index]))}
>
{displayName}
</Text>
</Tooltip>
{!_.isEmpty(pronouns) && <Text>{` (${pronouns})`}</Text>}
{index === displayNamesWithTooltips.length - 1 && <Text>.</Text>}
{index === displayNamesWithTooltips.length - 2 && <Text>{` ${props.translate('common.and')} `}</Text>}
{index < displayNamesWithTooltips.length - 2 && <Text>, </Text>}
</Text>
))}
</Text>

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

Instead of using index we can create the object, that will map the participant emails to their accountID
We can use personalDetails for that, this will ensure we are navigating with proper accountID each time.

What alternative solutions did you explore? (Optional)

None

@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Jun 12, 2023
@PauloGasparSv
Copy link
Contributor

I think I may use @BhuvaneshPatil solution but implement it myself!

I'm checking if personalDetails will always have the accountID, if that's not the case we can also search for the participant's actual index searching the email from displayNamesWithTooltips in participants. I like the proposed solution much better than doing this but it's an alternative : )

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Jun 12, 2023

Note: Also test what happens if an account has a displayName and sms/phoneNumber accounts

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Jun 12, 2023

Using personalDetails works fine when accounts have a Display Name but not so much for SMS based accounts, I'm thinking of a way to make that work : ) (it has to do with the login param and how each object/list is generating theirs)

Using the participants list has the same problem where the domain is stripped and we need that to find the account btw
I don't want to simply use an include() to check if the email matches so I'm still investigating

Edit: Oh I think I can just use addSMSDomainIfPhoneNumber with the tooltip content!

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jun 12, 2023
@PauloGasparSv PauloGasparSv added the Bug Something is broken. Auto assigns a BugZero manager. label Jun 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 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

@PauloGasparSv
Copy link
Contributor

hey @johncschuster can you give me a hand in this blocker/regression?

I used @BhuvaneshPatil's proposal to create the fix P.R. so should there be compensation here?

@BhuvaneshPatil
Copy link
Contributor

thank you for mention @PauloGasparSv , appreciate it.

@aimane-chnaif
Copy link
Contributor

As this is deploy blocker, there should be recent PR which caused this regression.
@BhuvaneshPatil it would be helpful if you can figure it out sooner.

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Jun 12, 2023

I think it was introduced in #20144 @aimane-chnaif

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Jun 12, 2023

PR - #20144
Commit - 249369e

Yes, previously it was using

ROUTES.getDetailsRoute(participants[index]))

for onPress handler.
As we were using participants array both for rendering the list and finding the URL to navigate, everything was in order.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 13, 2023
@melvin-bot melvin-bot bot changed the title Web - New Group - Wrong user details page opens on clicking at display names [HOLD for payment 2023-06-19] Web - New Group - Wrong user details page opens on clicking at display names Jun 13, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 13, 2023
@AndrewGable AndrewGable removed the DeployBlockerCash This issue or pull request should block deployment label Jun 13, 2023
@PauloGasparSv
Copy link
Contributor

Bump @johncschuster on this to help with compensation here!

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 14, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-06-19] Web - New Group - Wrong user details page opens on clicking at display names [HOLD for payment 2023-06-21] [HOLD for payment 2023-06-19] Web - New Group - Wrong user details page opens on clicking at display names Jun 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 14, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.27-7 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-06-21. 🎊

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.

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 Jun 14, 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:

  • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] Determine if we should create a regression test for this bug.
  • [@aimane-chnaif] 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.
  • [@johncschuster] 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 Jun 19, 2023
@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Jun 21, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-06-21] [HOLD for payment 2023-06-19] Web - New Group - Wrong user details page opens on clicking at display names [$1000] [HOLD for payment 2023-06-21] [HOLD for payment 2023-06-19] Web - New Group - Wrong user details page opens on clicking at display names Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Job added to Upwork: https://www.upwork.com/jobs/~010a5aeee05bd7da3a

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

melvin-bot bot commented Jun 21, 2023

Current assignee @johncschuster is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Current assignee @aimane-chnaif is eligible for the External assigner, not assigning anyone new.

@johncschuster
Copy link
Contributor

@BhuvaneshPatil and @aimane-chnaif, can you apply to the Upwork job I just created above?

@BhuvaneshPatil
Copy link
Contributor

Applied

@johncschuster
Copy link
Contributor

Thanks! @aimane-chnaif, I've invited you on Upwork as well. Can you accept that invite when you get the chance?

@Puneet-here
Copy link
Contributor

@johncschuster, I have also applied to the job. I am reporter on this.

@johncschuster
Copy link
Contributor

Perfect! Thanks, @Puneet-here!

@johncschuster
Copy link
Contributor

I've sent offers to you both, @aimane-chnaif and @Puneet-here. Please ping me when you've accepted!

@Puneet-here
Copy link
Contributor

@johncschuster accepted, thanks!

@melvin-bot melvin-bot bot added the Overdue label Jun 26, 2023
@PauloGasparSv
Copy link
Contributor

This is not overdue but we still need to fill the bugzero checklist so bump @aimane-chnaif : )

@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2023
@aimane-chnaif
Copy link
Contributor

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:

This bug was introduced while implementing feature of new profile page.
But actually I found that our solution was temporary. (original solution was right but only after migration completed)
The logic on this page (ReportWelcomeText) was refactored again in accountID migration PR.
As the issue caused during migration, no need regression test.

@johncschuster
Copy link
Contributor

Payment has been issued to everyone 🎉

@johncschuster
Copy link
Contributor

I think we can close this one out

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 Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants