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 2024-02-07] [$500] Reimbursement - Reimbursement message is not copied with "Copy to clipboard" #34045

Closed
6 tasks done
lanitochka17 opened this issue Jan 5, 2024 · 39 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 Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 5, 2024

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.22-0
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. [User A] Request money from User B
  2. [User B] Pay the request
  3. [User A] Go to the paid IOU report
  4. [User A] Right click on reimbursement message > Copy to clipboard
  5. [User A] Paste the content

Expected Result:

The reimbursement message is copied successfully

Actual Result:

The reimbursement message 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

Bug6333354_1704475020941.20240105_085906.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01143d94d68559e19a
  • Upwork Job ID: 1743429727276658688
  • Last Price Increase: 2024-01-13
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Jan 5, 2024
Copy link
Contributor

github-actions bot commented Jan 5, 2024

👋 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.

Copy link

melvin-bot bot commented Jan 5, 2024

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

@namhihi237
Copy link
Contributor

Proposal

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

Can not copy message reimbursement

What is the root cause of that problem?

We do not have a logic for copying the type "MARKEDREIMBURSED" of message in here

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

We should add logic like this

if (reportAction.actionName === 'MARKEDREIMBURSED') {
 const reimbursMementessage = _.reduce(reportAction.message, (acc, curr) => `${acc}${curr.text}`, '');
 Clipboard.setString(reimbursMementessage);
}

What alternative solutions did you explore? (Optional)

@gijoe0295
Copy link
Contributor

gijoe0295 commented Jan 5, 2024

Proposal

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

Reimbursement message is not copied with "Copy to clipboard"

What is the root cause of that problem?

We did not cover the case of MARKEDREIMBURSED here.

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

We should add the check to cover reimbursement message type:

if (reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.MARKEDREIMBURSED) {
    const message = ReportActionsUtils.getMarkedReimbursedMessage(reportAction);
    Clipboard.setString(message);
}

We should cover other cases of reimbursement messages like REIMBURSEMENTDEQUEUED or REIMBURSEMENTQUEUED as well.

What alternative solutions did you explore? (Optional)

I also notice that the TS definition here is insufficient. We should supplement all types of messages to avoid type errors.

@bernhardoj
Copy link
Contributor

bernhardoj commented Jan 5, 2024

Proposal

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

Copying reimbursed system message copies nothing.

What is the root cause of that problem?

The reimbursed system message object only contains text property and not html.
image

When we press copy to clipboard, we only take the last message html.

function getActionText(reportAction: OnyxEntry<ReportAction>): string {
const message = reportAction?.message?.at(-1) ?? null;
return message?.html ?? '';
}

const messageHtml = isTaskAction ? TaskUtils.getTaskReportActionMessage(reportAction?.actionName) : getActionText(reportAction);

So, the copy to clipboard fails to copy the message.

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

Previously, we had a similar issue for SUBMITTED action and the solution is to concat all message text.

} else if (ReportActionsUtils.isSubmittedExpenseAction(reportAction)) {
const submittedMessage = reportAction?.message?.reduce((acc, curr) => `${acc}${curr.text}`, '');
Clipboard.setString(submittedMessage ?? '');
} else if (content) {

But instead of handling it case by case, we can make it a general case. So, in addition to messageHtml, we can create messageText which is the result of all the messages' concatenation. Then, we will use it as the last fallback.

const messageText = reportAction?.message?.reduce((acc, curr) => `${acc}${curr.text}`, '');

} else if (messageText) {
    Clipboard.setString(messageText)
}

@tylerkaraszewski tylerkaraszewski added Help Wanted Apply this label when an issue is open to proposals by contributors External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 6, 2024
Copy link

melvin-bot bot commented Jan 6, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01143d94d68559e19a

@melvin-bot melvin-bot bot changed the title Reimbursement - Reimbursement message is not copied with "Copy to clipboard" [$500] Reimbursement - Reimbursement message is not copied with "Copy to clipboard" Jan 6, 2024
Copy link

melvin-bot bot commented Jan 6, 2024

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

Copy link

melvin-bot bot commented Jan 9, 2024

@tylerkaraszewski, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick!

@0xmiros
Copy link
Contributor

0xmiros commented Jan 9, 2024

reviewing proposals

Copy link

melvin-bot bot commented Jan 13, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@0xmiros
Copy link
Contributor

0xmiros commented Jan 17, 2024

@bernhardoj ContextMenuActions is now TS. can you please update proposal accordingly?

@melvin-bot melvin-bot bot removed the Overdue label Jan 17, 2024
@bernhardoj
Copy link
Contributor

Updated

@namhihi237
Copy link
Contributor

@0xmiroslav What do you think about my proposal, so that my proposal solves the current issue without causing any further regression? I think in general it is still based on the current solution.

Copy link

melvin-bot bot commented Jan 24, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 24, 2024
@mallenexpensify
Copy link
Contributor

@fedirjh, reassigning, please take over as C+. If you don't have bandwidth, unassign yourself. Thanks

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jan 31, 2024
@melvin-bot melvin-bot bot changed the title [$500] Reimbursement - Reimbursement message is not copied with "Copy to clipboard" [HOLD for payment 2024-02-07] [$500] Reimbursement - Reimbursement message is not copied with "Copy to clipboard" Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-5 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 2024-02-07. 🎊

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

  • @fedirjh requires payment (Needs manual offer from BZ)
  • @bernhardoj requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jan 31, 2024

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:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] 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:
  • [@fedirjh] 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:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] 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:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 6, 2024
Copy link

melvin-bot bot commented Feb 7, 2024

Issue is ready for payment but no BZ is assigned. @muttmuure you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

Copy link

melvin-bot bot commented Feb 7, 2024

Payment Summary

Upwork Job

  • ROLE: @fedirjh paid $(AMOUNT) via Upwork (LINK)
  • ROLE: @bernhardoj paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@muttmuure)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1743429727276658688/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@fedirjh
Copy link
Contributor

fedirjh commented Feb 7, 2024

@muttmuure C+ payment should be issued to @0xmiroslav as he has fully reviewed the PR.

@muttmuure
Copy link
Contributor

Invited @0xmiroslav and @bernhardoj

@melvin-bot melvin-bot bot added the Overdue label Feb 12, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

@tylerkaraszewski, @fedirjh, @muttmuure, @bernhardoj Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@muttmuure
Copy link
Contributor

Offer sent to @bernhardoj

@melvin-bot melvin-bot bot removed the Overdue label Feb 12, 2024
@muttmuure
Copy link
Contributor

Waiting for @0xmiroslav to accept

@muttmuure
Copy link
Contributor

Going to close for now, @0xmiroslav please reopen when you'd like to be paid

@bernhardoj
Copy link
Contributor

@muttmuure Hi, I was scanning through my pending payment and saw that I haven't been paid yet on this one. Here is the offer that I was checking, could you kindly check it on your side?

@mallenexpensify
Copy link
Contributor

Contributor: @bernhardoj paid $500 via Upwork
Sorry we missed that @bernhardoj

@bernhardoj
Copy link
Contributor

@mallenexpensify Thanks!

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 Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

10 participants