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-12-20] [$500] Expense - System message for report submission is not copied when copied to clipboard #32285

Closed
6 tasks done
lanitochka17 opened this issue Nov 30, 2023 · 29 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 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 30, 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!


Version Number: 1.4.6.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:

Issue found when executing PR #32157

Action Performed:

Precondition:

  • User is an employee of a Collect workspace
  1. Log in to ND as the employee
  2. Go to the workspace chat > + > Request money
  3. Create a manual request
  4. Click on the expense preview > Submit
  5. Click on the header subtitle to return to workspace main chat
  6. Click on the expense preview
  7. Right click on the 'report submission' message > Copy to clipboard
  8. Paste it in the composer

Expected Result:

The system message for 'report submission' is copied

Actual Result:

The system message for 'report submission' is not copied

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

Bug6296248_1701363447163.20231130_231808.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01dc72215454974184
  • Upwork Job ID: 1730286719439400960
  • Last Price Increase: 2023-11-30
  • Automatic offers:
    • shubham1206agra | Reviewer | 27951200
    • bernhardoj | Contributor | 27951201
Issue OwnerCurrent Issue Owner: @laurenreidexpensify
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 30, 2023
@melvin-bot melvin-bot bot changed the title Expense - System message for report submission is not copied when copied to clipboard [$500] Expense - System message for report submission is not copied when copied to clipboard Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

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

@bernhardoj
Copy link
Contributor

Any way to get access to/part of Collect Workspace?

@FitseTLT
Copy link
Contributor

FitseTLT commented Nov 30, 2023

Proposal

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

Expense - System message for report submission is not copied when copied to clipboard

What is the root cause of that problem?

We are not handling the REPORT.ACTIONS.TYPE.SUBMITTED report action case in ContextMenuActions copy to clipboard

onPress: (closePopover, {reportAction, selection}) => {
const isTaskAction = ReportActionsUtils.isTaskAction(reportAction);

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

We need to add another else if before last one here


like

else if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.SUBMITTED) {
                    Clipboard.setString(lodashGet(reportAction, 'message', []).map(message => message.text).join(''));
                }

What alternative solutions did you explore? (Optional)

@shubham1206agra

This comment was marked as off-topic.

Copy link

melvin-bot bot commented Nov 30, 2023

Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@shubham1206agra
Copy link
Contributor

Please ignore my previous comment

The issue is open for proposals again.

@shubham1206agra
Copy link
Contributor

@FitseTLT You are kind of right. But need more changes to work actually.

Screenshot 2023-12-01 at 9 13 29 AM

You may need to modify according to this reportAction

@bernhardoj
Copy link
Contributor

bernhardoj commented Dec 1, 2023

Don't have access to collect workspace, so I am building my proposal based on the image above.

Proposal

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

Copying the submitted message copies nothing to the clipboard.

What is the root cause of that problem?

In copy to clipboard logic, we take the html attribute of the message.

const messageHtml = isTaskAction || isCreateTaskAction ? Task.getTaskReportActionMessage(reportAction.actionName, reportID, isCreateTaskAction) : lodashGet(message, 'html', '');

However, submitted report actions don't have an html attribute (only text) and the message fragment is more than 1, different than the common report action.

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

Handle the case when it's a submitted action by joining all message fragment text.

else if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.SUBMITTED) {
    const submittedMessage = reportAction.message.reduce((acc, curr) => ${acc}${curr.text}, '')
    Clipboard.setString(submittedMessage);
}

@shubham1206agra
Copy link
Contributor

@bernhardoj's proposal works correctly

🎀 👀 🎀 C+ reviewed

cc @lakchote

Copy link

melvin-bot bot commented Dec 1, 2023

Current assignee @lakchote is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@bernhardoj
Copy link
Contributor

Any idea to this question?

@shubham1206agra
Copy link
Contributor

Any way to get access to/part of Collect Workspace?

Ask this on slack when you are assigned

@melvin-bot melvin-bot bot added the Overdue label Dec 4, 2023
@lakchote
Copy link
Contributor

lakchote commented Dec 4, 2023

@bernhardoj LGTM 👍

@melvin-bot melvin-bot bot removed the Overdue label Dec 4, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 4, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Dec 4, 2023

📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@bernhardoj
Copy link
Contributor

Asking to unblock and add my account to the collect workspace here https://expensify.slack.com/archives/C01GTK53T8Q/p1701708391409839

@bernhardoj
Copy link
Contributor

There is an issue with creating a collect workspace.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 7, 2023
@bernhardoj
Copy link
Contributor

PR is finally ready

cc: @shubham1206agra

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 13, 2023
@melvin-bot melvin-bot bot changed the title [$500] Expense - System message for report submission is not copied when copied to clipboard [HOLD for payment 2023-12-20] [$500] Expense - System message for report submission is not copied when copied to clipboard Dec 13, 2023
Copy link

melvin-bot bot commented Dec 13, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 13, 2023
Copy link

melvin-bot bot commented Dec 13, 2023

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

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:

Copy link

melvin-bot bot commented Dec 13, 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:

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

@lakchote
Copy link
Contributor

@shubham1206agra please complete the bugzero checklist thanks!

@shubham1206agra
Copy link
Contributor

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:

  • [@shubham1206agra] The PR that introduced the bug has been identified. Link to the PR: [NoQA] Feat: Add submit action #28947
  • [@shubham1206agra] 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: [NoQA] Feat: Add submit action #28947 (comment)
  • [@shubham1206agra] 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: Not required
  • [@shubham1206agra] Determine if we should create a regression test for this bug. No as it was edge case from backend
  • [@shubham1206agra] 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.
  • [] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@shubham1206agra
Copy link
Contributor

@lakchote Friendly bump on payment.

@melvin-bot melvin-bot bot removed the Overdue label Jan 3, 2024
@shubham1206agra
Copy link
Contributor

@lakchote Bump

@mountiny mountiny added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jan 14, 2024
Copy link

melvin-bot bot commented Jan 14, 2024

Triggered auto assignment to @laurenreidexpensify (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 Jan 14, 2024
@shubham1206agra
Copy link
Contributor

@laurenreidexpensify Can you process payment here please?

@laurenreidexpensify
Copy link
Contributor

Payment Summary:

Contributor $500 paid in Upwork @bernhardoj
C+ $500 paid in Upwork @shubham1206agra

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

No branches or pull requests

7 participants