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 2024-03-29] [LOW] [Splits] [$500] IOU - IOU description can't be seen on the LHN reports #31859

Closed
6 tasks done
kbecciv opened this issue Nov 24, 2023 · 99 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

@kbecciv
Copy link

kbecciv commented Nov 24, 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: 1.4.3.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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Start a manual IOU with the FAB button
  3. Split with members you didn't have contact before
  4. Add any description
  5. Finalise the split

Expected Result:

IOU description should be seen on the LHN reports.

Actual Result:

IOU description can't be seen on the LHN reports. It shows at the group chat.

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

Bug6289857_1700859344332.bandicam_2023-11-24_21-43-49-528.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f2930f214fff4630
  • Upwork Job ID: 1728156217838292992
  • Last Price Increase: 2024-01-06
Issue OwnerCurrent Issue Owner: @tobyjsullivan
@kbecciv kbecciv added 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 Nov 24, 2023
@melvin-bot melvin-bot bot changed the title IOU - IOU description can't be seen on the LHN reports [$500] IOU - IOU description can't be seen on the LHN reports Nov 24, 2023
Copy link

melvin-bot bot commented Nov 24, 2023

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

Copy link

melvin-bot bot commented Nov 24, 2023

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

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

melvin-bot bot commented Nov 24, 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

Copy link

melvin-bot bot commented Nov 24, 2023

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

@tobyjsullivan
Copy link
Contributor

tobyjsullivan commented Nov 24, 2023

Proposal

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

The report name is incomplete when splitting a money request between people. It is expected that the report name will take the form ${payer} owes {amount} for {description}; however, the description is currently excluded.

What is the root cause of that problem?

The translation used in getReportPreviewMessage (ReportUtils.js) does not include a comment part.

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

Add a new translation, iou.payerOwesAmountFor of the form ({payer, amount, comment}: PayerOwesAmountForParams) => `${payer} owes ${amount} for ${comment}` and provide the comment from the linked transaction.

What alternative solutions did you explore? (Optional)

@tobyjsullivan
Copy link
Contributor

Note: the original report also highlighted issues with "requested {amount}" reports. However, these seem to have been removed with #31860

@a67586646
Copy link

Proposal

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

After splitting with members who have not contact before, IOU description should be seen on the LHN reports, and report name should be formatted as ${payer} owes ${amount} for ${comment}, but now it is formatted as ${payer} owes ${amount}.

What is the root cause of that problem?

The translation iou.payerOwesAmount don't include the part of comment, which is used as report name.

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

  1. Insert a new optional property called comment in PayerOwesAmountParams:
type PayerOwesAmountParams = {payer: string; amount: number; comment?: string};
  1. Update the translation iou.payerOwesAmount to
({payer, amount, comment}: PayerOwesAmountParams) => `${payer} owes ${amount}${comment ? ` for ${comment}` : ''}`
  1. Export a new function for getting description from report action:
function getCommentOfMoneyRequest(reportAction: OnyxEntry<ReportAction>): string | void {
    return reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU ? reportAction?.originalMessage?.comment : undefined
}
  1. Use getCommentOfMoneyRequest in getReportPreviewMessage of ReportUtils.js to get description, and put it in parameters of iou.payerOwesAmount:
const comment = getCommentOfMoneyRequest(reportAction);
return Localize.translateLocal(containsNonReimbursable ? 'iou.payerSpentAmount' : 'iou.payerOwesAmount', {payer: payerName, amount: formattedAmount, comment});

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

Copy link

melvin-bot bot commented Nov 25, 2023

📣 @a67586646! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@a67586646
Copy link

Contributor details
Your Expensify account email: 969502650@qq.com
Upwork Profile Link: https://www.upwork.com/freelancers/~011d63f7ce68a2aa54

Copy link

melvin-bot bot commented Nov 25, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added the Overdue label Nov 27, 2023
@NicMendonca
Copy link
Contributor

@parasharrajat proposals for you!

@melvin-bot melvin-bot bot removed the Overdue label Nov 27, 2023
@DylanDylann
Copy link
Contributor

I don't think this is a bug. The expected of this issue is to display the description in LHN's subtitle of IOU report. But let's see this case when we request 2 times, the first request don't have description, the second request have a description. Currently, we are displaying total amount in LHN without description

Screenshot 2023-11-28 at 11 48 24

@parasharrajat
Copy link
Member

Correct. I also think it is expected. The description was added to the split request and thus that report shows it. I need sometime to debug this.

@parasharrajat
Copy link
Member

Currently, the results are shown based on how it is coded. Now we need to determine if we want this change. @NicMendonca Can you please confirm if we want to make this change?

@NicMendonca
Copy link
Contributor

Copy link

melvin-bot bot commented Dec 1, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Dec 1, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

@parasharrajat, @NicMendonca Eep! 4 days overdue now. Issues have feelings too...

@parasharrajat
Copy link
Member

Waiting on internal discussion.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 5, 2023
@alexpensify
Copy link
Contributor

Alright, looks like we are moving again in the PR.

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Mar 4, 2024
Copy link

melvin-bot bot commented Mar 4, 2024

This issue has not been updated in over 15 days. @tobyjsullivan, @dangrous, @alexpensify, @parasharrajat eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@parasharrajat
Copy link
Member

PR is almost complete.

@arielgreen arielgreen changed the title [$500] IOU - IOU description can't be seen on the LHN reports [LOW] [Splits] [$500] IOU - IOU description can't be seen on the LHN reports Mar 4, 2024
@alexpensify
Copy link
Contributor

@parasharrajat thanks for the update. It looks like there was follow-up in the PR that needs your review again.

@alexpensify
Copy link
Contributor

@parasharrajat - It looks like @tobyjsullivan updated the PR with the feedback and it is ready for another review. Thanks!

@parasharrajat
Copy link
Member

I will respond in sometime. Overall PR is ready.

@alexpensify
Copy link
Contributor

Thank you! We are making progress here and close to the finish line.

@alexpensify
Copy link
Contributor

Weekly Update: The PR is waiting to be merged to staging and production

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Mar 22, 2024
@melvin-bot melvin-bot bot changed the title [LOW] [Splits] [$500] IOU - IOU description can't be seen on the LHN reports [HOLD for payment 2024-03-29] [LOW] [Splits] [$500] IOU - IOU description can't be seen on the LHN reports Mar 22, 2024
Copy link

melvin-bot bot commented Mar 22, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 22, 2024
Copy link

melvin-bot bot commented Mar 22, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.55-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-03-29. 🎊

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

Copy link

melvin-bot bot commented Mar 22, 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:

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

@alexpensify
Copy link
Contributor

alexpensify commented Mar 29, 2024

Here is the payment summary:

  • External issue reporter - N/A
  • Contributor that fixed the issue - @tobyjsullivan $500
  • Contributor+ that helped on the issue and/or PR @parasharrajat $500

Upwork Job: https://www.upwork.com/jobs/~014251198aa5905f3e

Extra Notes regarding payment: @tobyjsullivan I've sent an offer via Upwork. Please accept and I can complete the required process on Monday. Thanks!

@parasharrajat
Copy link
Member

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:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR: Looks like it has been since the start.
  • [@parasharrajat] 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: NA
  • [@parasharrajat] 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: NA
  • [@parasharrajat] Determine if we should create a regression test for this bug. Yes
  • [@parasharrajat] 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.

Regression Test Steps

Note: Make sure the "Priority mode" is set to "Most recent" in Preferences.

  1. Start a manual IOU with the FAB button
  2. Split with members you didn't have contact before
  3. Add any description
  4. Finalise the split.
  5. Check that description is visible on IOU chats on LHN.

Note: if IOU report has two more requests then the last request preview says x requests, then the LHN will not show description as there are multiple requests.

Do you agree 👍 or 👎 ?

@alexpensify
Copy link
Contributor

@tobyjsullivan has been paid via Upwork. I'll work on the regression test next week pending @dangrous' feedback.

@alexpensify
Copy link
Contributor

I created the regression test. Let me know @dangrous if there are any changes to add to the request. For now, I'm going to close this GH.

Copy link

melvin-bot bot commented Apr 3, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@alexpensify
Copy link
Contributor

@parasharrajat - can we confirm if this is an error or a valid notice? Thanks!

@parasharrajat
Copy link
Member

parasharrajat commented Apr 3, 2024

This is a valid notice for an edge case. I tagged this PR on #39437. #39437 is being handled.

@alexpensify
Copy link
Contributor

@parasharrajat for reference, can you input the link here too? Thanks!

@parasharrajat
Copy link
Member

Payment requested as per #31859 (comment)

@JmillsExpensify
Copy link

$500 approved for @parasharrajat

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