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-07-10] [$1000] PrimayLogin is displayed on the ReportPreview message when a displayName has been set. #19301

Closed
1 of 6 tasks
kavimuru opened this issue May 19, 2023 · 53 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 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented May 19, 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:

Prerequisite: AccountB must have a displayName set in Avatar > Profile > Display Name

  1. Request money from accountA to accountB
  2. In the DM between A:B observe that the report preview displays as: "[account B's primaryLogin] owes [amount]"
  3. In the LHN preview line, observe that the report preview also displays as: "[account B's primaryLogin] owes [amount]"

Expected Result:

When a displayName has been set, the report preview message should use the displayName of the person that owes. I.e "Tom Jones owes $50.00". Only if one hasn't been set should we fall back on using the primaryLogin.

Actual Result:

The primaryLogin is displayed on the report preview message even though a displayName has been set.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.18
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
image
Untitled

TRJ:
image

Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684312014916939

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019dd2a8bc7f62d54a
  • Upwork Job ID: 1660911889282371584
  • Last Price Increase: 2023-05-31
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 19, 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 melvin-bot bot added the Overdue label May 22, 2023
@trjExpensify
Copy link
Contributor

Pretty sure this was intentional, and @Julesssss was looking at the handling of this.

@melvin-bot melvin-bot bot removed the Overdue label May 22, 2023
@Julesssss Julesssss self-assigned this May 23, 2023
@Julesssss
Copy link
Contributor

We planned to ignore the 'jules > you' case temporarily to speed things up, but this seems like a different issues. The LHN message should be consistent, and the screenshots show us using two different formats.

@Julesssss Julesssss added the Internal Requires API changes or must be handled by Expensify staff label May 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

Job added to Upwork: https://www.upwork.com/jobs/~019dd2a8bc7f62d54a

@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @thesahindia (Internal)

@Julesssss
Copy link
Contributor

Let's keep internal for now though. A combination of backend and frontend data builds this string.

@trjExpensify
Copy link
Contributor

but this seems like a different issues. The LHN message should be consistent, and the screenshots show us using two different formats.

Ah, I get it now. The preview and in the chat for the report preview we're displaying primaryLogin, when there's a displayName set. Yeah, I agree that's incorrect and good polish for manual requests.

I can reproduce this on the latest staging:
image

@trjExpensify trjExpensify changed the title Inconsistent "owes you" message in LHN PrimayLogin is displayed on the ReportPreview message when a displayName has been set. May 25, 2023
@trjExpensify
Copy link
Contributor

Updated the OP and issue title a little to make this clearer.

@melvin-bot melvin-bot bot added the Overdue label May 29, 2023
@trjExpensify
Copy link
Contributor

@Julesssss are you taking this on?

@melvin-bot melvin-bot bot removed the Overdue label May 30, 2023
@Julesssss Julesssss added External Added to denote the issue can be worked on by a contributor and removed Internal Requires API changes or must be handled by Expensify staff labels May 31, 2023
@melvin-bot melvin-bot bot changed the title PrimayLogin is displayed on the ReportPreview message when a displayName has been set. [$1000] PrimayLogin is displayed on the ReportPreview message when a displayName has been set. May 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

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

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

melvin-bot bot commented May 31, 2023

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

@Julesssss
Copy link
Contributor

I forgot about this one, let's make it external.

@hoangzinh
Copy link
Contributor

hoangzinh commented May 31, 2023

Proposal

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

PrimayLogin is displayed on the ReportPreview message when a displayName has been set.

What is the root cause of that problem?

  1. In the chatReport:
    There is a change recently in this commit 4d41619. Which prefers to get the static html text of reportPreview action and displaying in chatReport to fix a bug that "Make sure there is no settled 0 messages showing"

  2. In the LHN:
    Because BE returns the lastMessageText including primaryLogin so it displays primaryLogin instead of displayName in LHN
    Screenshot 2023-05-31 at 17 43 16

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

  1. In chatReport
    I think we can fix it by checking if the amount greater than 0, we use previous logic which mean build the message in FE side by displayNames + amount. If amount is 0, we can use static html to display.

  2. In LHN
    When we build lastMessageTextFromReport to show in LHN here, we can detect if the lastMessageText is having format of ReportReview and its last visible action (the visibleReportActionItems[reportID]) is a REPORTPREVIEW => we will find and replace primaryLogin by displayName (if it's exist).

What alternative solutions did you explore? (Optional)

Alternative solution 1
We can find and replace primaryLogin by displayName (if it's exist) in the action.message.html if it's a reportPreview actionReport in both LHN & chatReport.

Alternative solution 2

  • Because it seems BE already returned total amount in the OpenApp API. If it's correct, I think we can revert to previous logic
    Screenshot 2023-05-31 at 17 37 20
  • In LHN, we can build the lastMessageText same as previous logic in chatReport so it will ensure we can dynamic translate the text.

@trjExpensify
Copy link
Contributor

@mountiny @Julesssss @thesahindia ^^ bump on the above question.

@hoangzinh
Copy link
Contributor

@trjExpensify the PR is under review #20446

@Julesssss
Copy link
Contributor

@trjExpensify we have been making progress and are close to merging

@mountiny
Copy link
Contributor

yep we have been updating in the pr

@trjExpensify
Copy link
Contributor

Great!

@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 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 @hoangzinh got assigned: 2023-06-07 15:23:48 Z
  • when the PR got merged: 2023-06-28 19:22:51 UTC
  • days elapsed: 15

On to the next one 🚀

@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2023

@hoangzinh, @Julesssss, @trjExpensify, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@Julesssss
Copy link
Contributor

Deployed to staging, not yet deployed to prod

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 3, 2023
@melvin-bot melvin-bot bot changed the title [$1000] PrimayLogin is displayed on the ReportPreview message when a displayName has been set. [HOLD for payment 2023-07-10] [$1000] PrimayLogin is displayed on the ReportPreview message when a displayName has been set. Jul 3, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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

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

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 Jul 3, 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:

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

@trjExpensify
Copy link
Contributor

👋 Confirming payments as follows:

$1,000 to @hoangzinh for the fix
$1,000 to @thesahindia for C+
$250 to @Nathan-Mulugeta for the bug report.

Offers have been sent on this job here. Before I proceed with payments, @thesahindia can you address the checklist please? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Jul 12, 2023
@thesahindia
Copy link
Member

As mentioned in the proposal. We were just rendering the message we were getting from BE to fix another bug.

  1. In the chatReport:
    There is a change recently in this commit 4d41619. Which prefers to get the static html text of reportPreview action and displaying in chatReport to fix a bug that "Make sure there is no settled 0 messages showing"
  2. In the LHN:
    Because BE returns the lastMessageText including primaryLogin so it displays primaryLogin instead of displayName in LHN
    Screenshot 2023-05-31 at 17 43 16

Not sure if we should call this a regression. I don't think we need to follow the checklist on this. Also the PR author and reviewers already know about this.

We can add a test case if we want. Steps:-

Prerequisite: AccountB must have a displayName set in Avatar > Profile > Display Name

  1. Sign in to accountA, ensure the current language is English
  2. Request money from accountA to accountB
  3. Verify that, In the DM between A:B and LHN, the latest message displays as: "[account B's firstName] owes [amount]"
  4. Go to Preferences -> Language, change to Spanish
  5. Verify that, In the DM between A:B and LHN, the latest message displays as: "[account B's firstName] debe [amount]"
  6. In accountB, click "Pay elsewhere" button
  7. Back to account A
  8. Verify that, In the DM between A:B and LHN, the latest message displays as: "pagó [amount] de otra forma"
  9. Go to Preferences -> Language, change to English
  10. Verify that, In the DM between A:B and LHN, the latest message displays as: "paid [amount] elsewhere"
  11. Sign out and sign in again to account A
  12. Verify that in DM and LHN, it shows as "paid [amount] elsewhere"

@thesahindia
Copy link
Member

@trjExpensify, no need to pay me on upwork. I will use new dot to request money.

@melvin-bot melvin-bot bot added the Overdue label Jul 17, 2023
@trjExpensify
Copy link
Contributor

Thanks for the added context, @thesahindia. We have IOU related test cases!

I've gone ahead and paid out @hoangzinh & @Nathan-Mulugeta, so we can close this one out.

@JmillsExpensify
Copy link

$1,000 payment approved for @thesahindia based on BZ 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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants