App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2024-03-29] [LOW] [Splits] [$500] IOU - IOU description can't be seen on the LHN reports

Open kbecciv opened this issue 2 years ago • 92 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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?

  • [x] Android: Native
  • [x] Android: mWeb Chrome
  • [x] iOS: Native
  • [x] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/93399543/4dae53a0-7e50-430c-aaf6-cb55c8d180c5

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 avatar Nov 24 '23 20:11 kbecciv

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

melvin-bot[bot] avatar Nov 24 '23 20:11 melvin-bot[bot]

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

melvin-bot[bot] avatar Nov 24 '23 20:11 melvin-bot[bot]

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[bot] avatar Nov 24 '23 20:11 melvin-bot[bot]

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

melvin-bot[bot] avatar Nov 24 '23 20:11 melvin-bot[bot]

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 avatar Nov 24 '23 23:11 tobyjsullivan

Note: the original report also highlighted issues with "requested {amount}" reports. However, these seem to have been removed with https://github.com/Expensify/App/pull/31860

tobyjsullivan avatar Nov 24 '23 23:11 tobyjsullivan

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.

a67586646 avatar Nov 25 '23 13:11 a67586646

📣 @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>

melvin-bot[bot] avatar Nov 25 '23 13:11 melvin-bot[bot]

Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~011d63f7ce68a2aa54

a67586646 avatar Nov 25 '23 13:11 a67586646

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

melvin-bot[bot] avatar Nov 25 '23 13:11 melvin-bot[bot]

@parasharrajat proposals for you!

NicMendonca avatar Nov 27 '23 20:11 NicMendonca

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

DylanDylann avatar Nov 28 '23 04:11 DylanDylann

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 avatar Nov 28 '23 10:11 parasharrajat

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?

parasharrajat avatar Nov 29 '23 13:11 parasharrajat

asked here - https://expensify.slack.com/archives/C01SKUP7QR0/p1701371462794629

NicMendonca avatar Nov 30 '23 19:11 NicMendonca

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

melvin-bot[bot] avatar Dec 01 '23 16:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 04 '23 23:12 melvin-bot[bot]

Waiting on internal discussion.

parasharrajat avatar Dec 05 '23 06:12 parasharrajat

@parasharrajat @NicMendonca this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Dec 08 '23 11:12 melvin-bot[bot]

@parasharrajat, @NicMendonca Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Dec 08 '23 11:12 melvin-bot[bot]

Any update @NicMendonca

parasharrajat avatar Dec 08 '23 11:12 parasharrajat

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

melvin-bot[bot] avatar Dec 08 '23 16:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 11 '23 11:12 melvin-bot[bot]

bumped internal discussion again! https://expensify.slack.com/archives/C05RECHFBEW/p1701783220128649

NicMendonca avatar Dec 11 '23 15:12 NicMendonca

internal feedback:

if there is a description, we should be showing it.

NicMendonca avatar Dec 11 '23 18:12 NicMendonca

@NicMendonca You mean that we only show description if there is a money request? If we have many money requests with many descriptions as I detailed here, which description should we show in the subtitle of LHN? cc @parasharrajat

DylanDylann avatar Dec 12 '23 05:12 DylanDylann

@parasharrajat @NicMendonca this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] avatar Dec 15 '23 11:12 melvin-bot[bot]

@parasharrajat, @NicMendonca Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Dec 15 '23 11:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 15 '23 16:12 melvin-bot[bot]

discussing here: https://expensify.slack.com/archives/C05RECHFBEW/p1702912365521069?thread_ts=1701783220.128649&cid=C05RECHFBEW

NicMendonca avatar Dec 18 '23 15:12 NicMendonca