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-05] [Payment due Oct 2 2023 $500] Search - The avatars order are different in LHN and RHN. #27537

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

Comments

@izarutskaya
Copy link

izarutskaya commented Sep 15, 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. Open search RHN.
  2. Observe the avatar order in LHN and RHN.

Expected Result:

The avatars order should not be different.

Actual Result:

The avatars order are different.

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: v1.3.70-2

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

2023-08-23 191124

2023-09-15.14.06.30.mov

Expensify/Expensify Issue URL:

Issue reported by: @oleksandr-pantsyr

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692809283563059

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f2234c9135bc93ec
  • Upwork Job ID: 1702693333674766336
  • Last Price Increase: 2023-09-15
  • Automatic offers:
    • hoangzinh | Contributor | 26788701
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 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

@izarutskaya izarutskaya added the External Added to denote the issue can be worked on by a contributor label Sep 15, 2023
@melvin-bot melvin-bot bot changed the title Search - The avatars order are different in LHN and RHN. [$500] Search - The avatars order are different in LHN and RHN. Sep 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

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

melvin-bot bot commented Sep 15, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

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

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 15, 2023

Screenshot 2023-09-15 at 8 22 47 PM

Not able to repro.

@hoangzinh
Copy link
Contributor

hoangzinh commented Sep 15, 2023

Proposal

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

Search - The avatars order are different in LHN and RHN.

What is the root cause of that problem?

There is inconsistency between LHN and Search when calling ReportUtils.getIcons to get icons for a report
Search:

result.icons = ReportUtils.getIcons(report, personalDetails, UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), false, personalDetail.login, personalDetail.accountID);

LHN:

result.icons = ReportUtils.getIcons(report, personalDetails, UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), true, '', -1, policy);

The 4th param isPayer of Search is false while LHN is true, it leads to the inconsistency with the order here

return isPayer ? [managerIcon, ownerIcon] : [ownerIcon, managerIcon];

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

I think we don't really need to render different order between payer and payee here

return isPayer ? [managerIcon, ownerIcon] : [ownerIcon, managerIcon];

Just render either [managerIcon, ownerIcon] or [ownerIcon, managerIcon] for all access users

The param isPayer is introduced by this PR https://github.com/Expensify/App/pull/19392/files, but at this time, we only render 1 avatar for either Payer or Payee. Now, since this change 55e4f06#diff-65c096044d5f69b35bcdec14c99c4fda4580759df9b1a7c36650d58eea276f1dR845, we render both avatars of Payer and Payee, so IMO, I think we don't need the isPayer param anymore.

What alternative solutions did you explore? (Optional)

In this place

return isPayer ? [managerIcon, ownerIcon] : [ownerIcon, managerIcon];

Instead of basing on the input isPayer, because we already passed the report object into this util, we can use it to check if the current user is report.managerID, so current user is Payer, then we can continuous to return ordering base on this value.

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@allroundexperts
Copy link
Contributor

allroundexperts commented Sep 18, 2023

I would agree that App/src/libs/ReportUtils.js condition is redundant. I'd still confirm this in the open source channel. @hoangzinh Can you please write up a post and tag me and @michaelhaxhiu so we can get some more eyes?

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@hoangzinh
Copy link
Contributor

sure @allroundexperts I'm getting thoughts in this thread https://expensify.slack.com/archives/C01GTK53T8Q/p1695088612139029

@allroundexperts
Copy link
Contributor

OK as per the above discussion, it seems like adding the isPayee condition was intentional. I think @hoangzinh's alternate solution would work well.

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 19, 2023

Triggered auto assignment to @mountiny, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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

melvin-bot bot commented Sep 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 21, 2023

📣 @hoangzinh 🎉 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 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

🎯 ⚡️ Woah @hoangzinh / @allroundexperts / @hoangzinh, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @hoangzinh got assigned: 2023-09-21 02:50:09 Z
  • when the PR got merged: 2023-09-25 01:59:02 UTC

On to the next one 🚀

@michaelhaxhiu michaelhaxhiu added the Awaiting Payment Auto-added when associated PR is deployed to production label Sep 28, 2023
@michaelhaxhiu michaelhaxhiu changed the title [$500] Search - The avatars order are different in LHN and RHN. [Payment due Oct 2 2023 $500] Search - The avatars order are different in LHN and RHN. Sep 28, 2023
@michaelhaxhiu michaelhaxhiu removed their assignment Sep 28, 2023
@michaelhaxhiu michaelhaxhiu added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 28, 2023
@michaelhaxhiu
Copy link
Contributor

I'm re-assigning this to another BZ as part of my preparation for Sabbatical (starting Friday).

Next steps:

  • Wait till 7 days after PR is merged to pay
  • Then, payout the following amounts (assuming no regressions):

Payment amounts:

Job: https://www.upwork.com/jobs/~01f2234c9135bc93ec

@Expensify Expensify deleted a comment from melvin-bot bot Sep 28, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Sep 28, 2023
@melvin-bot melvin-bot bot changed the title [Payment due Oct 2 2023 $500] Search - The avatars order are different in LHN and RHN. [HOLD for payment 2023-10-05] [Payment due Oct 2 2023 $500] Search - The avatars order are different in LHN and RHN. Sep 28, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.74-3 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-05. 🎊

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 Sep 28, 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:

  • [@hoangzinh / @allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@hoangzinh / @allroundexperts] 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:
  • [@hoangzinh / @allroundexperts] 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:
  • [@hoangzinh / @allroundexperts] Determine if we should create a regression test for this bug.
  • [@hoangzinh / @allroundexperts] 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.
  • [@sophiepintoraetz] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@sophiepintoraetz
Copy link
Contributor

@michaelhaxhiu was incorrect with his bug payment - it's $50 for reports, not $250.

@sophiepintoraetz
Copy link
Contributor

@allroundexperts please request $750 once the BZ checklist is completed!
@oleksandr-pantsyr - an offer should be with you now!

@allroundexperts
Copy link
Contributor

Reviewer Checklist

  1. I think this was a missed case with our original implementation. As such, there isn't any PR that caused this.
  2. N/A
  3. N/A
  4. A regression test would be helpful.

Regression Test Steps

  1. Login as User A and request money from User B.
  2. Login as User B and request money from User C.
  3. Open the New chat search RHN.

Verify that the avatars order of IOU report of User A to User B is userB-userA in both LHN and Search page
Verify that the avatars order of IOU report of User B to User C is userB-userC in both LHN and Search page

Do we 👍 or 👎 ?

@JmillsExpensify
Copy link

$750 payment approved for @allroundexperts based on BZ summary.

@JmillsExpensify
Copy link

Re-opening for regression test.

@melvin-bot melvin-bot bot added the Overdue label Oct 16, 2023
@mountiny
Copy link
Contributor

https://github.com/Expensify/Expensify/issues/326434

@melvin-bot melvin-bot bot removed the Overdue label Oct 16, 2023
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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants