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] IOU - Message doesn't contain description when Copy to clipboard on money request #37338

Closed
5 of 6 tasks
kbecciv opened this issue Feb 27, 2024 · 15 comments
Closed
5 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering 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

Comments

@kbecciv
Copy link

kbecciv commented Feb 27, 2024

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.44-0
Reproducible in staging?: y
Reproducible in production?: n
Issue found when executing PR: #36993
Issue reported by: Applause - Internal eam

Action Performed:

  1. Create a workspace and invite some users
  2. As employee, create a money request with description in the workspace chat
  3. As admin, paid this request
  4. As employee hover or long press on money request preview > Copy to clipboard
  5. Paste the message to composer

Expected Result:

Pasted message should contains the description

Actual Result:

Pasted message doesn't contain description when Copy to clipboard on money request preview

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

Bug6394459_1709058859174.Recording__2367.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011e3619582ba70c09
  • Upwork Job ID: 1762552015212392448
  • Last Price Increase: 2024-02-27
@kbecciv kbecciv added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor labels Feb 27, 2024
@melvin-bot melvin-bot bot changed the title IOU - Message doesn't contain description when Copy to clipboard on money request [$500] IOU - Message doesn't contain description when Copy to clipboard on money request Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

Job added to Upwork: https://www.upwork.com/jobs/~011e3619582ba70c09

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Feb 27, 2024
@kbecciv
Copy link
Author

kbecciv commented Feb 27, 2024

We think that this bug might be related to #vip-vsb
CC @quinthar

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 27, 2024
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 Feb 27, 2024

Triggered auto assignment to @AndrewGable (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@abzokhattab
Copy link
Contributor

abzokhattab commented Feb 27, 2024

Proposal

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

Paid Message doesn't contain description when Copy to clipboard on money request

What is the root cause of that problem?

when the request is settled we dont copy the description as we do in other cases here

App/src/libs/ReportUtils.ts

Lines 4746 to 4749 in f1562e7

return Localize.translateLocal(translationKey, {
formattedAmount,
comment: transactionDetails?.comment ?? '',
});

App/src/libs/ReportUtils.ts

Lines 4734 to 4744 in f1562e7

const isApproved = isReportApproved(iouReport);
if (isRequestSettled) {
return Localize.translateLocal('iou.payerSettled', {
amount: formattedAmount,
});
}
if (isApproved) {
return Localize.translateLocal('iou.approvedAmount', {
amount: formattedAmount,
});
}

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

we need to add the comment to the iou.payerSettled and iou.approvedAmount to be similar to this

requestedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `requested ${formattedAmount}${comment ? ` for ${comment}` : ''}`,

to acheive that we need to modify the code above to:

    if (isRequestSettled) {
        return Localize.translateLocal('iou.payerSettled', {
            amount: formattedAmount,
            comment: transactionDetails?.comment ?? '',
        });
    }
    if (isApproved) {
        return Localize.translateLocal('iou.approvedAmount', {
            amount: formattedAmount,
            comment: transactionDetails?.comment ?? '',
        });
    }

then modify these translations to

        payerSettled: ({amount, comment}: PayerSettledParams) => `paid ${amount} for ${comment}`,
        approvedAmount: ({amount, comment}: ApprovedAmountParams) => `approved ${amount} for ${comment}`,

and of course we need to modify their ts types.

we can also do the same here

@AndrewGable AndrewGable added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 27, 2024
@AndrewGable
Copy link
Contributor

@dukenv0307 @DylanDylann @srikarparsi - Is this a regression from #36993?

@DylanDylann
Copy link
Contributor

I will check today

@DylanDylann
Copy link
Contributor

@AndrewGable I don't think this is regression from #36993
cc @dukenv0307

@DylanDylann
Copy link
Contributor

IMO, this is not a bug. Let's see this case:

Screen.Recording.2024-02-28.at.12.30.41.mov

We have 2 requests with different descriptions. Then admin pays both requests. If we want to display a description in the paid message, which description should be displayed

@dukenv0307
Copy link
Contributor

I tested by revert #36993 and the result is the same.

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

melvin-bot bot commented Mar 4, 2024

@AndrewGable, @rushatgabhane Huh... This is 4 days overdue. Who can take care of this?

@AndrewGable AndrewGable added the Bug Something is broken. Auto assigns a BugZero manager. label Mar 4, 2024
Copy link

melvin-bot bot commented Mar 4, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Mar 4, 2024
@AndrewGable
Copy link
Contributor

@isabelastisser - Can you confirm this is not a bug as proposed by @DylanDylann? I agree with them

@isabelastisser
Copy link
Contributor

I agree this is not a bug. Closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering 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
Projects
None yet
Development

No branches or pull requests

7 participants