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-06-06] Hold is incorrectly lowercase in the dot separator pattern #42437

Closed
1 of 6 tasks
m-natarajan opened this issue May 21, 2024 · 13 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented May 21, 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.74-4
Reproducible in staging?: y
Reproducible in production?: no
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: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1716249633077769

Action Performed:

  1. Submit an expense from user A to user B
  2. As user B put the expense on hold
  3. As user A open the expense which was put on hold

Expected Result:

The dot separator pattern should say Cash * Hold

Actual Result:

The dot separator pattern should say Cash * hold

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
CleanShot 2024-05-20 at 17 58 22@2x

Snip - (24) New Expensify - Google Chrome

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @bfitzexpensify
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels May 21, 2024
Copy link

melvin-bot bot commented May 21, 2024

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

Copy link

melvin-bot bot commented May 21, 2024

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented May 21, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open Staging deploy checklist to see the list of PRs included in this release, then work quickly on the following:

  1. If you find which PR caused the issue/bug, you can reassign it to the person responsible for it.
    • If the author is OOO or won’t get online before the daily deploy is due, you are responsible for finding the best fix/path forward. Don’t hesitate to ask for help!
  2. Try to reproduce the issue, if the bug is on production, remove the DeployBlocker label but stay assigned to fix it (or find out which PR broke it to get help from the author).
    • You can adjust the urgency of the issue to better represent the gravity of the bug.
    • If the issue is super low priority, feel free to un-assign yourself.
    • Be careful with PHP warnings, sometimes it is more complex than just adding a null coalescing operator as they might be uncovering some bigger bug.
    • If it was a one-off issue that requires no action (for example, Bedrock was down or it is a duplicated issue), you can close it.

Remember rule #2: Never un-assign yourself from a real DeployBlocker unless you are 100% sure someone else is assigned and will take care of it.

@github-actions github-actions bot removed the Daily KSv2 label May 21, 2024
@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels May 21, 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.

@rlinoz
Copy link
Contributor

rlinoz commented May 21, 2024

Not a blocker, will take a look shortly though.

@rlinoz rlinoz removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels May 21, 2024
@dragnoir
Copy link
Contributor

Proposal

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

Hold is incorrectly lowercase in the dot separator pattern

What is the root cause of that problem?

In money request preview, we have a function getPreviewHeaderText that turns the message like in our example "Cash . Hold"

In the case of this issue, the hold is from this line

const violationMessage = ViolationsUtils.getViolationTranslation(violations[0], translate);

The function getViolationTranslation will receive the violations[0] value and translate it.

In our case, the function getViolationTranslation doesn't support violations[0] where it's equal to hold, so it just turns the value from violations[0]

We can check that when we change the language to Spanish

image

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

inside getViolationTranslation we need to add the case of "hold" here

case  'hold':
return  translate('iou.hold');

POC:

image

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

We can also dismiss the case of violations?.[0].name !== 'hold' here

if (violations?.[0] && violations?.[0].name !== 'hold') {

@rlinoz rlinoz added Daily KSv2 and removed Hourly KSv2 labels May 21, 2024
@melvin-bot melvin-bot bot added the Overdue label May 23, 2024
@rlinoz
Copy link
Contributor

rlinoz commented May 23, 2024

Opening a PR today.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Overdue Daily KSv2 labels May 23, 2024
@melvin-bot melvin-bot bot added the Weekly KSv2 label May 23, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 30, 2024
@melvin-bot melvin-bot bot changed the title Hold is incorrectly lowercase in the dot separator pattern [HOLD for payment 2024-06-06] Hold is incorrectly lowercase in the dot separator pattern May 30, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 30, 2024
Copy link

melvin-bot bot commented May 30, 2024

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

Copy link

melvin-bot bot commented May 30, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-11 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-06-06. 🎊

Copy link

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

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

@bfitzexpensify
Copy link
Contributor

Adding a BZ buddy for payment - I will be OOO until June 11th

@bfitzexpensify bfitzexpensify removed their assignment May 30, 2024
@bfitzexpensify bfitzexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels May 30, 2024
Copy link

melvin-bot bot commented May 30, 2024

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@bfitzexpensify
Copy link
Contributor

Wait, actually, this was all internal, so we can just close this out.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jun 10, 2024
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. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants