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-10-09] Web - Copying 'paid elsewhere' text copies the wrong text #27858

Closed
1 of 6 tasks
kbecciv opened this issue Sep 20, 2023 · 19 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@kbecciv
Copy link

kbecciv commented Sep 20, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open a tab where user A is signed in
  2. Request money from user B
  3. Open a tab where user B is signed in
  4. Open the chat with user A > Click on 'IOU preview component'
  5. Click on 'Pay elsewhere' button
  6. Hover over the new paid elsewhere message
  7. Click on 'copy to clipboard' icon
  8. Past the copied text

Expected Result:

Pasted text should reflect what was copied from the message

Actual Result:

Requested 0.00 is pasted

Workaround:

Unknown

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.72.6
Reproducible in staging?: y
Reproducible in production?: n
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

Screen.Recording.2023-09-20.at.1.10.57.PM.mov
Recording.4614.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695205011947579

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Sep 20, 2023
@OSBotify
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.

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

Triggered auto assignment to @joelbettner (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@Pujan92
Copy link
Contributor

Pujan92 commented Sep 20, 2023

Seems regression from #27142 @rayane-djouah

@s-alves10
Copy link
Contributor

s-alves10 commented Sep 20, 2023

Proposal

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

When copying paid elsewhere copies the wrong text

What is the root cause of that problem?

This is a regression of this PR
The PR added the case when the actionName is IOU(money request action) but didn't consider all possible cases
At least, the PR didn't cover the paying messages at all

This is the root cause

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

We should consider paying actions as well
Add the following code for paying actions

        if (originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.PAY) {
            const {amount, currency, IOUReportID} = originalMessage;
            const formattedAmount = CurrencyUtils.convertToDisplayString(amount, currency);
            const iouReport = ReportUtils.getReport(IOUReportID);
            const payerName = getDisplayNameForParticipant(iouReport.managerID, true);
            let translationKey = originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.ELSEWHERE ? 'iou.paidElsewhereWithAmount' : 'iou.paidWithExpensifyWithAmount';
            displayMessage = Localize.translateLocal(translationKey, {amount: formattedAmount, payer: payerName});
        }

This works as expected for paying actions

Result
27858.mp4

What alternative solutions did you explore? (Optional)

@rayane-djouah
Copy link
Contributor

I'm creating a PR for this now

@rayane-djouah
Copy link
Contributor

PR is ready for review
cc @joelbettner @mananjadhav @narefyev91

@thienlnam thienlnam removed the DeployBlockerCash This issue or pull request should block deployment label Sep 21, 2023
@thienlnam
Copy link
Contributor

Removing the deploy blocker on this as this is not a huge bug and doesn't need to be a deploy blocker

@mountiny
Copy link
Contributor

I think this can be closed and we will handle in the original issues which you can find linked in the PR

@Natnael-Guchima
Copy link

@mountiny is this something I am eligibile for reporting bonus?

@Natnael-Guchima
Copy link

@mountiny this issue is fixed now. Can you please reopen this to handle reporting payment? Thanks.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 2, 2023
@melvin-bot melvin-bot bot changed the title Web - Copying 'paid elsewhere' text copies the wrong text [HOLD for payment 2023-10-09] Web - Copying 'paid elsewhere' text copies the wrong text Oct 2, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

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

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

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

@mountiny mountiny added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 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

@bfitzexpensify
Copy link
Contributor

Offer sent @Natnael-Guchima

@Natnael-Guchima
Copy link

Accepted the offer. Thanks @bfitzexpensify

@bfitzexpensify
Copy link
Contributor

OK, all paid out, we're done here.

@mananjadhav
Copy link
Collaborator

@bfitzexpensify I am still pending to be paid out here. @mountiny Are we tracking it somewhere else?

@mountiny
Copy link
Contributor

mountiny commented Oct 3, 2023

I think it can be handled here #27114

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 Engineering
Projects
None yet
Development

No branches or pull requests