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] [HOLD for payment 2024-01-18] Web - Double <Payer:> for IOU report preview in Search #33760

Closed
1 of 6 tasks
kbecciv opened this issue Dec 29, 2023 · 36 comments
Closed
1 of 6 tasks
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

Comments

@kbecciv
Copy link

kbecciv commented Dec 29, 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.19-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:

  1. [User A] Request money from User B.
  2. [User B] Pay the request.
  3. [User A] Click on the IOU preview to open IOU report.
  4. [User A] Click Search icon.
  5. Note that the IOU report shows double Payer: in the preview in Search list.

Expected Result:

Single Payer: for IOU report preview in Search

Actual Result:

Double Payer: for IOU report preview in Search

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

Screenshot 2023-12-29 at 22 37 08

20231229_223646.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016165d0cee06c5ac9
  • Upwork Job ID: 1748381394601844736
  • Last Price Increase: 2024-01-19
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Dec 29, 2023
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.

Copy link

melvin-bot bot commented Dec 29, 2023

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

@kbecciv
Copy link
Author

kbecciv commented Dec 29, 2023

Issue is not Reproduced on production

Screenshot 2023-12-29 at 22 44 08

@paultsimura
Copy link
Contributor

paultsimura commented Dec 29, 2023

Proposal

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

What is the root cause of that problem?

We prepend the payer name twice:

App/src/libs/ReportUtils.ts

Lines 2029 to 2032 in 8432563

const actualPayerName = report.managerID === currentUserAccountID ? '' : `${getDisplayNameForParticipant(report.managerID, true)}:`;
const payerDisplayName = isPreviewMessageForParentChatReport ? payerName : actualPayerName;
return Localize.translateLocal(translatePhraseKey, {amount: formattedAmount, payer: payerDisplayName ?? ''});

And:

const lastMessageTextFromReport = getLastMessageTextForReport(report);
const lastActorDetails = personalDetailMap[report.lastActorAccountID] || null;
const lastActorDisplayName =
hasMultipleParticipants && lastActorDetails && lastActorDetails.accountID !== currentUserAccountID ? lastActorDetails.firstName || lastActorDetails.displayName : '';
let lastMessageText = lastActorDisplayName ? `${lastActorDisplayName}: ${lastMessageTextFromReport}` : lastMessageTextFromReport;

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

Since the lastMessageTextFromReport has changed for the money reports to include the payer name, we should handle this case and set result.alternateText to only lastMessageTextFromReport, not lastMessageText for such options.

We currently do similar thing for tasks:

} else if (result.isTaskReport) {
result.alternateText = showChatPreviewLine && lastMessageText ? lastMessageTextFromReport : Localize.translate(preferredLocale, 'report.noActivityYet');
} else {

What alternative solutions did you explore? (Optional)

@mountiny
Copy link
Contributor

I think this was known and wanted to address in a follow up @koko57

@koko57
Copy link
Contributor

koko57 commented Dec 29, 2023

It was occuring long before the merge and I found it while I was working on it (it was spotted by me on staging) #30042 (comment)

it displayed [firstName lastName]: [firstName]: but after my changes I had to make for LHN it displays firstName doubled. We agreed that it will be fixed in a separate PR

@mountiny mountiny assigned mountiny and koko57 and unassigned cead22 Dec 29, 2023
@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Dec 29, 2023
@mountiny
Copy link
Contributor

Yep its been listed in the issue already as a follow up, i think that this is not a blocker as it only appears in the search page and we will address this in New Year

@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
Copy link

melvin-bot bot commented Jan 1, 2024

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

@koko57
Copy link
Contributor

koko57 commented Jan 2, 2024

Will take care of it this week 🙂

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
@koko57
Copy link
Contributor

koko57 commented Jan 2, 2024

@mountiny one question - should the previews in the SearchPage be 1:1 similar to LHN previews? If yes I'd use the same logic as in the LHN previews and maybe create a separate function out of it.

I've spotted another weird thing here - for some of the chats I have a strange fallback message
Screenshot 2024-01-02 at 13 46 31
Screenshot 2024-01-02 at 13 51 53
Screenshot 2024-01-02 at 13 52 08

@mountiny
Copy link
Contributor

mountiny commented Jan 2, 2024

Yeah i think we can make it 1:1 to the lhn if possible

@koko57
Copy link
Contributor

koko57 commented Jan 3, 2024

@mountiny I started working on a refactor but it would require a lot of changes. I want to move the logic for creating alternative text out of the getOptionData from SidebarUtils and use the same logic in createOption OptionListUtils.
But as I wanted to avoid potential regressions and the problems we had with the first PR for LHN previews, maybe I could fix it more simply?

I copied the part of logic that displays the lastActorDisplayName only for certain types of the reportAction and pasted it in the createOption function. It's less invasive - so less regression-prone.
We could fix it this way now and then I could work on the refactor. WDYT? 🙂

@mountiny
Copy link
Contributor

mountiny commented Jan 4, 2024

I think that ideally we do abstract away code to avoid duplication, but if you feel like this is not worth at this point, we could go this way too for now and refactor once more changes will be required

@koko57
Copy link
Contributor

koko57 commented Jan 4, 2024

@mountiny I think it is not necessary to extract this logic now, I'd rather do this in this major refactor and extracting all the logic for getting alternateText later 🙂

@mountiny
Copy link
Contributor

mountiny commented Jan 4, 2024

Ok then!

@mountiny mountiny added the Reviewing Has a PR in review label Jan 9, 2024
@mountiny
Copy link
Contributor

mountiny commented Jan 9, 2024

PR merged

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jan 11, 2024
@melvin-bot melvin-bot bot changed the title Web - Double <Payer:> for IOU report preview in Search [HOLD for payment 2024-01-18] Web - Double <Payer:> for IOU report preview in Search Jan 11, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 11, 2024
Copy link

melvin-bot bot commented Jan 11, 2024

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

Copy link

melvin-bot bot commented Jan 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.24-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 2024-01-18. 🎊

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

  • @koko57 does not require payment (Contractor)
  • @situchan requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jan 11, 2024

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:

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

Copy link

melvin-bot bot commented Jan 18, 2024

Payment Summary

Upwork Job

  • Contributor: @koko57 is from an agency-contributor and not due payment
  • ROLE: @situchan paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@michaelhaxhiu)

  • 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//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@mountiny
Copy link
Contributor

@situchan Can you complete the checklist here? this was a simple follow up to previou PR, I feel like the reward should be $250 for this one

@situchan
Copy link
Contributor

situchan commented Jan 18, 2024

BZ Checklist:
Offending PR: #33346, though the root cause already existed - #33760 (comment)
As this was caught during staging regression testing, no need new regression test.
To prevent such bugs further, we decided to make LHN and search logic consistent as follow-up here


@situchan Can you complete the checklist here? this was a simple follow up to previou PR, I feel like the reward should be $250 for this one

I'm fine with any reward change but does that mean that now we have the right to request bounty increase for reviewing large PRs? For me, some PRs took several days to complete review.
I thought they were flatten no matter small or large PR, as they're balanced eventually.

PS: #33371 was just console log change PR and fully rewarded here

@mountiny
Copy link
Contributor

I'm fine with any reward change but does that mean that now we have the right to request bounty increase for reviewing large PRs? For me, some PRs took several days to complete review. I thought they were flatten no matter small or large PR, as they're balanced eventually.

PS: #33371 was just console log change PR and fully rewarded #33478 (comment)

Yeah I see your point, lets keep it $500 then.

I think the root cause is that we should get the same C+ review the clean up PRs too as in this case it was a regression from PR reviewed by another C+ so then we end up paying more in total for one task

@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented Jan 19, 2024

Yeah I see your point, lets keep it $500 then.

Sounds like we arrived at $500 standard rate for this PR review! I will make an upwork job now for it.

I thought they were flatten no matter small or large PR, as they're balanced eventually.

FWIW -- what you described here is indeed the core idea at play for the bounty methodology. It's a pay rate that is intended to be more than fair in the grand scheme of being a C+, unless a specific PR is a HUGE deviation from the typical workload and deserves a one-off consideration.

@michaelhaxhiu michaelhaxhiu added the External Added to denote the issue can be worked on by a contributor label Jan 19, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-01-18] Web - Double <Payer:> for IOU report preview in Search [$500] [HOLD for payment 2024-01-18] Web - Double <Payer:> for IOU report preview in Search Jan 19, 2024
Copy link

melvin-bot bot commented Jan 19, 2024

Job added to Upwork: https://www.upwork.com/jobs/~016165d0cee06c5ac9

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 19, 2024
@michaelhaxhiu michaelhaxhiu removed 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 labels Jan 19, 2024
Copy link

melvin-bot bot commented Jan 19, 2024

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

@situchan
Copy link
Contributor

situchan commented Jan 19, 2024

@michaelhaxhiu after making External, if you unassign me and reassign, I will get offer

@michaelhaxhiu
Copy link
Contributor

I just sent you an offer actually. But that's a good reminder of how to use the automation

@michaelhaxhiu
Copy link
Contributor

paid

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
Projects
No open projects
Development

No branches or pull requests

8 participants