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 - Description is not copied when copying IOU preview to clipboard #36917

Closed
6 tasks done
kbecciv opened this issue Feb 20, 2024 · 19 comments
Closed
6 tasks done
Assignees
Labels
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 Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Feb 20, 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: v1.4.43-3
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to staging.new.expensify.com
  2. Go to 1:1 DM.
  3. Create an IOU with a description.
  4. Go to IOU report.
  5. Right click on the preview > Copy to clipboard.
  6. Paste the content.
    Note that the description is not copied anymore

Expected Result:

The copied content will include the description, and it will be "requested $ for y".

Actual Result:

The copied content does not include the description, and it is just "requested $".

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

Bug6385812_1708441940728.20240220_211542.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fae159a80486a6f8
  • Upwork Job ID: 1759970659438272512
  • Last Price Increase: 2024-02-20
@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 20, 2024
@melvin-bot melvin-bot bot changed the title IOU - Description is not copied when copying IOU preview to clipboard [$500] IOU - Description is not copied when copying IOU preview to clipboard Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

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

melvin-bot bot commented Feb 20, 2024

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

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

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

@kbecciv
Copy link
Author

kbecciv commented Feb 20, 2024

We think that this bug might be related to #vip-bills
CC @davidcardoza

@paultsimura
Copy link
Contributor

This looks like a regression from #36298

@flodnv
Copy link
Contributor

flodnv commented Feb 20, 2024

@paultsimura
Copy link
Contributor

paultsimura commented Feb 20, 2024

Proposal

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

The IOU description is not copied to clipboard

What is the root cause of that problem?

This is a regression from #36298 – as @Gonals correctly noted here, we shouldn't have removed the getIOUReportActionDisplayMessage and keep using it for copy to clipboard functionality.

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

We should partially revert the #36298 by bringing back the IOU.getIOUReportActionDisplayMessage and using it here:

const displayMessage = ReportUtils.getReportPreviewMessage(
ReportUtils.getReport(ReportUtils.getOriginalReportID(reportID, reportAction)),
reportAction,
false,
false,
null,
false,
true,
);

What alternative solutions did you explore? (Optional)

@DylanDylann
Copy link
Contributor

@paultsimura Revert this change will re-introduce the original issue
@dukenv0307 Do you have any idea here?

@dukenv0307
Copy link
Contributor

We can use the old function and remove the payerName in this function

Copy link

melvin-bot bot commented Feb 20, 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.

Copy link

melvin-bot bot commented Feb 20, 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.

@flodnv
Copy link
Contributor

flodnv commented Feb 20, 2024

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Hourly KSv2 labels Feb 20, 2024
@melvin-bot melvin-bot bot added the Weekly KSv2 label Feb 20, 2024
@shahinyan11
Copy link

Proposal

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

Expense - Old amount is copied to clipboard when the request amount is changed

What is the root cause of that problem?

Regression as stated above

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

  1. Define new variable const isIOUTransactionAction = originalMessage?.IOUTransactionID
    and replace the check of shouldConsiderScanningReceiptOrPendingRoute with (isIOUTransactionAction || shouldConsiderScanningReceiptOrPendingRoute) in this condition
const isIOUTransactionAction = originalMessage?.IOUTransactionID

if (!isEmptyObject(reportAction) && (isIOUTransactionAction || shouldConsiderScanningReceiptOrPendingRoute ) && reportAction && ReportActionsUtils.isMoneyRequestAction(reportAction)) {
  1. Move definition of originalMessage above definition of isIOUTransactionAction
  2. Add below code here
const transactionDetails = getTransactionDetails(!isEmptyObject(linkedTransaction) ? linkedTransaction : null);
  1. Change [this](Localize.translateLocal('iou.requestedAmount', {formattedAmount: amountToDisplay})) code with below
Localize.translateLocal('iou.requestedAmount', {formattedAmount: amountToDisplay, comment: transactionDetails?.comment ?? ''})

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 20, 2024
@paultsimura
Copy link
Contributor

The offending PR is being reverted now

@shahinyan11
Copy link

@paultsimura Why revert if there is working solution

@shahinyan11
Copy link

shahinyan11 commented Feb 20, 2024

@flodnv My proposal will fix this issue and below issues
#36924
#36911

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Feb 21, 2024
@flodnv
Copy link
Contributor

flodnv commented Feb 21, 2024

Leaving this to @srikarparsi - https://expensify.slack.com/archives/C01GTK53T8Q/p1708522618781829?thread_ts=1708444691.794139&cid=C01GTK53T8Q

@srikarparsi
Copy link
Contributor

Closing this out since the revert PR takes care of it and has been CPed

@kavimuru kavimuru removed the DeployBlockerCash This issue or pull request should block deployment label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants