Repository navigation
Closed
Labels
BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2
Description
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.20-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:
- [Member] Request money in workspace chat
- [Admin] Pay the request
- [Member] Click on the expense preview to go to expense report
- [Member] Right click on the paid system message > Copy to clipboard
- [Member] Paste the content
Note that
Expected Result:
- The system message should always start with the action, not the actor, regardless of who is viewing the chat. So the system message should read
paid $10rather thanJohn paid $10orJohn's Workspace paid $10. - When a user copies a system message, we should copy only what is printed, rather than adding the actor (so we should copy
paid $10instead of copyingJohn Doe paid $10)
Actual Result:
- Depending on who is viewing the report, the system message shows either
paid amount elsewhereor[admin] paid amount elsewhere. - When the user copies and pastes the system message, it shows something different from what was printed originally (it shows
[Workspace name] paid amount elsewhere.
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
Bug6329831_1704112491311.bandicam_2023-12-30_12-33-56-983.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~015bfbfa9935f7c034
- Upwork Job ID: 1741887749877055488
- Last Price Increase: 2024-01-22
- Automatic offers:
- DylanDylann | Reviewer | 28147572
- dukenv0307 | Contributor | 28147573
Metadata
Metadata
Labels
BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewHas a PR in reviewWeeklyKSv2KSv2
Activity
melvin-bot commentedon Jan 1, 2024
Job added to Upwork: https://www.upwork.com/jobs/~015bfbfa9935f7c034
[-] Expense - System message for paid expense shows payer, while the copied content is workspace[/-][+][$500] Expense - System message for paid expense shows payer, while the copied content is workspace[/+]melvin-bot commentedon Jan 1, 2024
Triggered auto assignment to @sakluger (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 1, 2024
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Jan 1, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (
External)rrrshtt commentedon Jan 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Clipboard information is different from what you see in chat after the expense paid action.
What is the root cause of that problem?
App/src/libs/ReportUtils.ts
Line 4106 in fe49e4f
App/src/libs/ReportUtils.ts
Line 2011 in fe49e4f
As you can see, in these two lines, we choose
payerNamefor information in the clipboard and also for showing in the system message.What changes do you think we should make in order to solve the problem?
App/src/libs/ReportUtils.ts
Lines 4124 to 4133 in cafe831
Here are three different options with "PayerName":
paidElsewhereWithAmount,paidWithExpensifyWithAmount,payerPaidAmount. Simply removePayerNamein their translation function, and then removepayerNameon every usage of these functions (they are also used in another function calledgetReportPreviewMessage()).I think there is a reason for a different function. At first glance, I won't remove the function
getIOUReportActionDisplayMessage().What alternative solutions did you explore? (Optional)
gijoe0295 commentedon Jan 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
System message for paid expense shows payer, while the copied content is workspace
What is the root cause of that problem?
We show policy name instead of payer display name in case of policy:
App/src/libs/ReportUtils.ts
Line 4093 in 70967dd
What changes do you think we should make in order to solve the problem?
The problem here is about the inconsistency between the system message and the copied content. According to this issue:
We no longer need to show workspace name for reimbursement messages because it will always show the actual payer name. And thus we should remove the
isExpenseReportcheck and always show display name:App/src/libs/ReportUtils.ts
Line 4093 in 70967dd
The check (i.e. show workspace or payer name) is now only necessary for LHN or report preview.
What alternative solutions did you explore? (Optional)
NA
dukenv0307 commentedon Jan 2, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The system message shows paid amount elsewhere, but the copied content is paid amount elsewhere
What is the root cause of that problem?
getReportPreviewMessagefunction, we show the payment type for the case request is settledApp/src/libs/ReportUtils.ts
Line 2284 in d338621
getIOUReportActionDisplayMessagefunction to get the display message and in this function, we will display the workspace name instead of the actor name.App/src/libs/ReportUtils.ts
Line 4093 in 70967dd
but when we display this action, we use
getReportPreviewMessagefunction to getiouMessage.App/src/pages/home/report/ReportActionItemMessage.tsx
Line 56 in 70967dd
What changes do you think we should make in order to solve the problem?
getReportPreviewMessage, for the settled case we can useiou.payerPaidAmounttranslation key to not display the payment type of the settle message if we get this message for report preview. We can add an extra param to know whether we get the message for the report preview. We should add an extra prop to know whether we should hide thepayerName.App/src/libs/ReportUtils.ts
Line 2284 in d338621
And then when we get the message here we will pass this param as
trueto hide the payerName in system paid message.App/src/pages/home/report/ReportActionItemMessage.tsx
Line 56 in 70967dd
getReportPreviewMessagefunction in the same way we do here.App/src/libs/ReportUtils.ts
Line 4093 in 70967dd
App/src/pages/home/report/ReportActionItemMessage.tsx
Line 56 in 70967dd
What alternative solutions did you explore? (Optional)
For point 2, we can remove the
payerNameingetIOUReportActionDisplayMessagefunction. But I'd like to usegetReportPreviewMessagerather than updategetIOUReportActionDisplayMessagefunction because if we make an update ingetReportPreviewMessagefunction, we don't need to update other functions anymore.sakluger commentedon Jan 2, 2024
Something is definitely wrong here, but I'm not sure what the expected behavior is. Should the system message show the admin's name, the workspace's name, or neither? I'm confident that the system message should NOT show the admin's name, but I'm not sure which of the other two it should show.
I asked for the team's feedback in Slack: https://expensify.slack.com/archives/C02MW39LT9N/p1704233160288869
78 remaining items
DylanDylann commentedon Feb 15, 2024
@trjExpensify Currently, I see that in some cases the preview message and the message from the "Copy to clipboard" button are different.
Screen.Recording.2024-02-15.at.15.30.42.mov
In the above video:
Is this expected? What do you think about displaying The message from "Copy to clipboard" similar to Preview message in LHN
cc @dukenv0307 @srikarparsi
trjExpensify commentedon Feb 15, 2024
Yeah, I think generally what you copy should be what you see, so let's copy the message being previewed.
P.s why does the receipt thumbnail appear to zoom like that, man? 😂 👀
melvin-bot commentedon Feb 20, 2024
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.
melvin-bot commentedon Feb 20, 2024
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 commentedon Feb 20, 2024
We are reverting the PR: #36932
I think a few considerations were missed as part of the planning of this
feature requestbug.dukenv0307 commentedon Feb 21, 2024
@flodnv I created a PR to fix the current issue and all related issues here #36993.
srikarparsi commentedon Feb 21, 2024
Left a comment here, I think it might be better to merge the revert PR first and then focus on fixing this issue after.
DylanDylann commentedon Mar 11, 2024
@sakluger The PR was deployed to production 2 weeks ago. Please help to process the next step
DylanDylann commentedon Mar 14, 2024
@sakluger Bump this comment
cc @srikarparsi
sakluger commentedon Mar 18, 2024
Sorry! All paid out now.