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-09-29] [$1000] Web - IOU - Account email is not present in the copied content after IOU has been settled #25567

Closed
6 tasks done
izarutskaya opened this issue Aug 21, 2023 · 38 comments
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 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 21, 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!


Action Performed:

  1. Sign into Account A
  2. Click the '+' green button > Request Money > enter amount > Next > choose someone to pay
  3. In LHN, click on the IOU > hover over the 'amount' box > right-click Copy to Clipboard
  4. Paste the copied content and observe it contains the email of account B
  5. In Account B > click the IOU in the LHN > click the green arrow in the upper right corner of the page > click Pay Elsewhere
  6. Go back to account A > hover over the paid IOU
  7. Right-click on it and click on copy to clipboard
  8. Paste the content elsewhere > notice the email isn't copied

Expected Result:

Account B's email should be present like this "[Account B's email] paid [amount] elsewhere"

Actual Result:

Account B's email is present before the request is settled but account B's email is not included in the copied content after the IOU has been settled.

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: v1.3.55-7

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

Notes/Photos/Videos: Any additional supporting documentation

2023-08-10.10.28.54.mp4
Recording.5947.mp4

Expensify/Expensify Issue URL:

Issue reported by: @Nathan-Mulugeta

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691652788189659

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a8830daaa898904e
  • Upwork Job ID: 1693703978305433600
  • Last Price Increase: 2023-08-23
  • Automatic offers:
    • Ollyws | Reviewer | 26383227
    • huzaifa-99 | Contributor | 26383228
    • Nathan-Mulugeta | Reporter | 26383231
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 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

@huzaifa-99
Copy link
Contributor

Proposal

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

We want the context menu "Copy" option to copy the account email along with the settled IOU message

What is the root cause of that problem?

For a settled IOU message, we are not setting the email in the IOU translate key here and also these IOU translate keys don't add the email along with the translated message

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

For both en/es locale's we should update these translate keys to accept payer name, something like this

paidElsewhereWithAmount: ({payer, amount}) => `${payer} paid ${amount} elsewhere`,
paidUsingPaypalWithAmount: ({payer, amount}) => `${payer} paid ${amount} using Paypal.me`,
paidUsingExpensifyWithAmount: ({payer, amount}) => `${payer} paid ${amount} using Expensify`,

and in getReportPreviewMessage here, we will pass the payer name

return Localize.translateLocal(translatePhraseKey, {amount: formattedAmount, payer: payerName});

What alternative solutions did you explore? (Optional)

N/A

@alphaboss1104
Copy link
Contributor

This is BE issue.

@Christinadobrzyn
Copy link
Contributor

I can reproduce - adding Internal label for review

@Christinadobrzyn Christinadobrzyn added the Internal Requires API changes or must be handled by Expensify staff label Aug 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @Ollyws (Internal)

@huzaifa-99
Copy link
Contributor

This is BE issue.

@alphaboss1104 can you please explain how this is BE issue?

@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

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

@Christinadobrzyn
Copy link
Contributor

Hey @Beamanator can you give this a review and let us know if this can be External or needs to be Internal?

@Beamanator
Copy link
Contributor

I think a copy / paste bug is 99% likely a frontend issue - @alphaboss1104 could you explain why you think it's BE?

For now let's add External

@Christinadobrzyn Christinadobrzyn added External Added to denote the issue can be worked on by a contributor and removed Internal Requires API changes or must be handled by Expensify staff labels Aug 23, 2023
@melvin-bot melvin-bot bot changed the title Web - IOU - Account email is not present in the copied content after IOU has been settled [$1000] Web - IOU - Account email is not present in the copied content after IOU has been settled Aug 23, 2023
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 23, 2023

Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Aug 23, 2023

Current assignee @Ollyws is eligible for the External assigner, not assigning anyone new.

@Ollyws
Copy link
Contributor

Ollyws commented Aug 24, 2023

Thanks for the proposal @huzaifa-99 but your proposal will also add the users name/email in the LHN, and I imagine we intentionally want to keep that message short for visibility:

Screenshot 2023-08-24 at 11 41 13

@huzaifa-99
Copy link
Contributor

huzaifa-99 commented Aug 24, 2023

Thanks for the feedback @Ollyws. I think we can conditionally add the email via some props and hide the email only in LHN.

We can update our translation keys here to include payer name conditionally like this, (we already do a similar thing here)

paidElsewhereWithAmount: ({payer, amount}) => `${payer ? `${payer} ` : ''}paid ${amount} elsewhere`,
paidUsingPaypalWithAmount: ({payer, amount}) => `${payer ? `${payer} ` : ''}paid ${amount} using Paypal.me`,
paidUsingExpensifyWithAmount: ({payer, amount}) => `${payer ? `${payer} ` : ''}paid ${amount} using Expensify`,

update the getReportPreviewMessage to accept shouldShowEmailForSettledIOU

function getReportPreviewMessage(report, reportAction = {}, shouldShowEmailForSettledIOU = true) {

and from this line return payer name conditionally

return Localize.translateLocal(translatePhraseKey, {amount: formattedAmount, payer: shouldShowEmailForSettledIOU && payerName});

and when we get data for LHN here, we can just use the message without payer name/email

lastMessageTextFromReport = ReportUtils.getReportPreviewMessage(iouReport, lastReportAction, false);

Thoughts @Ollyws.

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

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

@Ollyws
Copy link
Contributor

Ollyws commented Aug 28, 2023

Will get to this today.

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2023
@huzaifa-99
Copy link
Contributor

Thanks for the assignment. PR will be ready shortly.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 29, 2023
@huzaifa-99
Copy link
Contributor

PR #26151 is ready for review @Ollyws @Beamanator.

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @huzaifa-99 got assigned: 2023-08-29 05:56:41 Z
  • when the PR got merged: 2023-09-20 02:33:26 UTC
  • days elapsed: 15

On to the next one 🚀

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Sep 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 21, 2023

This issue has not been updated in over 15 days. @Beamanator, @Ollyws, @Christinadobrzyn, @huzaifa-99 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!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Sep 22, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - IOU - Account email is not present in the copied content after IOU has been settled [HOLD for payment 2023-09-29] [$1000] Web - IOU - Account email is not present in the copied content after IOU has been settled Sep 22, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 22, 2023

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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 29, 2023
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Sep 29, 2023

@Ollyws is there a regression test for this? Let me know and I will pay this out.

Payouts will be:

Issue Reporter: $250 @Nathan-Mulugeta
Contributor: $1000 @huzaifa-99
Contributor+: $1000 @Ollyws

Eligible for 50% #urgency bonus? N - #25567 (comment)

Upwork job is here.

@Nathan-Mulugeta
Copy link

Nathan-Mulugeta commented Sep 29, 2023

Hey @Christinadobrzyn this issue was created on Aug 21, before the announcement on Aug 30. I think the right amount for reporter should be $250

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Sep 29, 2023

Hi @Nathan-Mulugeta! Yep! Sorry, I paid $250 in Upwork, the amounts were incorrect here. I updated them.

@Nathan-Mulugeta
Copy link

Nathan-Mulugeta commented Sep 30, 2023

Hey @Christinadobrzyn did you already process payment? I didn't receive any payments.

@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2023
@huzaifa-99
Copy link
Contributor

Bumping for payment process cc: @Christinadobrzyn.

@melvin-bot melvin-bot bot removed the Overdue label Oct 2, 2023
@Ollyws
Copy link
Contributor

Ollyws commented Oct 2, 2023

I don't think we can say any PR introduced this as a bug, the copy we were using was intentionally not using the display name in the LHN or when copied, so it's more of a small feature request.
Given that it's not an impactful issue, nor is it related to any important user flows I don't think a regression test is helpful here, let me know if you think otherwise.

@Christinadobrzyn
Copy link
Contributor

Ah sorry for the delay everyone, I thought I paid this but I didn't.

I've paid everyone in Upwork based on this payment structure. #25567 (comment)

Closing this for now but please let me know if something is missing.

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants