-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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-04] [$1000] Web - Money request - Copy to clipboard button does not copy content of an IOU edit comment #24569
Comments
Triggered auto assignment to @flaviadefaria ( |
Bug0 Triage Checklist (Main S/O)
|
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @pecanoro ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Money request - Copy to clipboard button does not copy content of an IOU edit comment What is the root cause of that problem?We're using this code below to copy message to clipboard, since we introduced new type of reportAction called "MODIFIEDEXPENSE", we didn't format it before copying, which caused the issue App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 187 to 205 in 56f0b0f
What changes do you think we should make in order to solve the problem?We should update our copy to clip board action, if it's else if (ReportActionUtils.isModifiedExpenseAction(reportAction)) {
const displayMessage = ReportUtils.getModifiedExpenseMessage(reportAction);
Clipboard.setString(displayMessage);
} We should also update our shouldShow: (type, reportAction) =>
type === CONTEXT_MENU_TYPES.REPORT_ACTION &&
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.TASKCANCELLED &&
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED &&
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.TASKREOPENED &&
!ReportUtils.isReportMessageAttachment(_.last(lodashGet(reportAction, ['message'], [{}]))) &&
!ReportActionUtils.isMessageDeleted(reportAction), In order to show copy option with task, we can also remove these three condition from above condition: reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.TASKCANCELLED &&
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED &&
reportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.TASKREOPENED && What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Money request - Copy to clipboard button does not copy content of an IOU edit comment What is the root cause of that problem?
We hide the copy option for TaskPreview and IOU Preview App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 169 to 177 in 56f0b0f
App/src/pages/home/report/ReportActionItem.js Line 321 in 56f0b0f
But when we click on copyToClipBorad, we don't check to get modified expense message if the action is App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 190 to 195 in 56f0b0f
What changes do you think we should make in order to solve the problem?
App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 169 to 177 in 56f0b0f
and then we can add the case to get the message of this preview action in App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 190 to 195 in 56f0b0f
2. We should update the copy to clip board action if the action is ModifiedExpenseAction we should get the message by getModifiedExpenseMessage function instead of getting this from action
App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 190 to 195 in 56f0b0f
And we also update the translation for Modified Expense Message What alternative solutions did you explore? (Optional)We can hide the copyToClipboard if the action is |
The link to github issue shall be posted in slack thread! |
Discussing internally since it's a new feature! |
I think this needs to be fixed, but its not a deploy blocker. |
@mountiny Can you confirm the expected here? We should hide copy option or fix to copy the current message. |
If this is not a deploy blocker, I think better to merge this into #22387 for consistency. |
Its not a deploy blocker and I would expect the behaviour to be copying what you can see on the line |
@0xmiroslav I can't reproduce the issue you linked so I closed it since it's pretty old. Regarding this issue, I talked to @mountiny and we decided not to block on this and have a contributor fix it! |
Job added to Upwork: https://www.upwork.com/jobs/~015fd8284ce80abac6 |
Payment summary:
@Nathan-Mulugeta = $250 reporting bonus @narefyev91 can you please fill out the checklist above? |
|
@narefyev91 @hungvu193 Please check this #26664 as it seems that PR didn't solve all cases. Let me know if you disagree. Thanks. |
I don't think so, actually we still have the logic getting the |
Thanks. I looked into this and yet both are different issues. technically out of scope of this issue. |
I debugged the other issue and I found that the #26664 is in fact related to this issue. We used originalMessage to copy the string in IOU which is the wrong thing to copy as a transaction can change. But I wouldn't force that here. |
Same for #26571. We didn't set the proper data which should have been copied for Task Preview. |
All of these previews should have been fixed as mentioned in #22387 (comment) @pecanoro Do you consider #26664 & #26571 regressions from this issue or should we tackle them separately? |
Bump @pecanoro |
@pecanoro, @hungvu193, @narefyev91, @flaviadefaria Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Sorry! Yes, it seems like a regression, but only one regression as it's basically the same bug with the same cause. Let's fix it so it copies the updated field. |
Alright payment is on hold until the regression has been fixed. |
I am still waiting on some sort of confirmation from the author or C+ that the linked issues will be solved as regressions. |
To be honest the changes should be done on BE side and correct string should come from it, and as I see from this comment #26621 (comment) - BE team will implement localisation on their side - and on FE we will avoid all this tricks to make it working correctly. But if we come back to initial issue - i agree that fix was not covering all possible cases |
@narefyev91 That's a different issue, the translations are not related to the regression and should not be considered as such since it's the BE. Rajat linked another issue #26571. @flaviadefaria Let's pay the issue with one regression, the other contributor is fixing them in their PR. |
Payment Summary: @Nathan-Mulugeta = $250 (Reporting bonus) |
Everyone has been paid and since the regression is being fixed in another issue I'll close this one. |
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:
Expected Result:
The content should be copied when clicking on the copy to clipboard icon
Actual Result:
Nothing gets copied when clicking the copy to clipboard icon
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.54-7
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
-14993053652749344022023-08-14_23_41_07.MP4
Recording.1201.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Nathan-Mulugeta
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692045636871669
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: