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-03-14] [$500] Hold Request - English content is copied to clipboard when hold request message is Spanish #37292

Closed
6 tasks done
lanitochka17 opened this issue Feb 27, 2024 · 28 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

@lanitochka17
Copy link

lanitochka17 commented Feb 27, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.44-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:

Issue found when executing PR #36851

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to 1:1 DM
  3. Create an IOU
  4. Go to IOU details page
  5. Click 3-dot menu > Hold request
  6. Enter a reason and save it
  7. Change app language to Spanish
  8. Return to IOU details page
  9. Right click on the hold request system message > Copy to clipboard (in Spanish)
  10. Paste the content

Expected Result:

The Spanish content will be copied

Actual Result:

The English content is copied when the app langauge changes to Spanish after the request is held in English

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

Bug6393841_1709031788348.20240227_091554.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0173c841e19bd3a5b9
  • Upwork Job ID: 1762478277737205760
  • Last Price Increase: 2024-02-27
  • Automatic offers:
    • paultsimura | Reviewer | 0
    • FitseTLT | Contributor | 0
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor labels Feb 27, 2024
@melvin-bot melvin-bot bot changed the title Hold Request - English content is copied to clipboard when hold request message is Spanish [$500] Hold Request - English content is copied to clipboard when hold request message is Spanish Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0173c841e19bd3a5b9

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 27, 2024
Copy link

melvin-bot bot commented Feb 27, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Feb 27, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Feb 27, 2024
Copy link
Contributor

👋 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 Feb 27, 2024

Triggered auto assignment to @johnmlee101 (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-bills
CC @davidcardoza

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 27, 2024

Proposal

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

Hold Request - English content is copied to clipboard when hold request message is Spanish

What is the root cause of that problem?

We are currently falling back to copying the message.text here

Clipboard.setString(messageText);
}

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

We should separately use a condition for hold to copy the translated content (via Localize.translateLocal) same as we are constructing the report action here

children = <ReportActionItemBasicMessage message={props.translate('iou.heldRequest', {comment: lodashGet(props, 'action.message[1].text', '')})} />;
} else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.UNHOLD) {

We can also handle the similar case for unhold as in
} else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.UNHOLD) {
children = <ReportActionItemBasicMessage message={props.translate('iou.unheldRequest')} />;

What alternative solutions did you explore? (Optional)

@dukenv0307
Copy link
Contributor

dukenv0307 commented Feb 27, 2024

Proposal

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

The English content is copied when the app langauge changes to Spanish after the request is held in English

What is the root cause of that problem?

We don't have a special case when copying hold requests so it copies the message from action.message which is English

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

We should create a special case for hold request and then use this key to get the message

} else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.MODIFIEDEXPENSE) {
children = <ReportActionItemBasicMessage message={ModifiedExpenseMessage.getForReportAction(props.report.reportID, props.action)} />;
} else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.HOLD) {
children = <ReportActionItemBasicMessage message={props.translate('iou.heldRequest', {comment: lodashGet(props, 'action.message[1].text', '')})} />;

onPress: (closePopover, {reportAction, selection, reportID}) => {

What alternative solutions did you explore? (Optional)

NA

@dukenv0307
Copy link
Contributor

The same root cause with #37292.

@paultsimura
Copy link
Contributor

From what I see, this is reproducible in Prod as well – not a blocker.

@paultsimura
Copy link
Contributor

The same root cause with #37292.

@dukenv0307 you've referenced this very issue 🙂

@FitseTLT
Copy link
Contributor

From what I see, this is reproducible in Prod as well – not a blocker.

Definitely

@paultsimura
Copy link
Contributor

Thanks for the proposals.
They are both essentially the same, so I would go with the proposal from @FitseTLT.

🎀👀🎀 C+ reviewed

P.s.: I did compare the edit timestamps, but the changes are minor and did not affect the decision here.

Copy link

melvin-bot bot commented Feb 27, 2024

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

@paultsimura
Copy link
Contributor

@johnmlee101 please also remove the blocker label here – it's reproducible in Prod, thanks.

@johnmlee101 johnmlee101 added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Feb 27, 2024
@johnmlee101
Copy link
Contributor

LGTM

@johnmlee101
Copy link
Contributor

Assigning bug so this is treated typically

Copy link

melvin-bot bot commented Feb 27, 2024

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

@paultsimura
Copy link
Contributor

Hey @FitseTLT, when could we expect a PR?

@FitseTLT
Copy link
Contributor

in 2 days

@melvin-bot melvin-bot bot added the Overdue label Mar 4, 2024
@FitseTLT
Copy link
Contributor

FitseTLT commented Mar 4, 2024

PR will be ready today

@melvin-bot melvin-bot bot removed the Overdue label Mar 4, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Mar 5, 2024
@melvin-bot melvin-bot bot changed the title [$500] Hold Request - English content is copied to clipboard when hold request message is Spanish [HOLD for payment 2024-03-14] [$500] Hold Request - English content is copied to clipboard when hold request message is Spanish Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 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 Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.48-0 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-03-14. 🎊

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

Copy link

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

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

@paultsimura
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: Handle translations in hold money request workflow #36851
  • 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: Handle translations in hold money request workflow #36851 (comment)
  • 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: N/A
  • Determine if we should create a regression test for this bug: Yes
  • 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.

Regression Test Proposal

  1. Create a money request
  2. Open the request details page
  3. In the header, click the 3-dot menu -> "Hold request"
  4. Verify the "Held this request" message was added
  5. Switch the App language
  6. Right-click the "Held this request" message -> Copy to clipboard
  7. Verify the text was copied in the chosen language

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 14, 2024
Copy link

melvin-bot bot commented Mar 19, 2024

@johnmlee101, @paultsimura, @FitseTLT, @muttmuure Eep! 4 days overdue now. Issues have feelings too...

@muttmuure
Copy link
Contributor

Regression test created. 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
Projects
None yet
Development

No branches or pull requests

6 participants