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 2025-01-17] [HOLD for payment 2025-01-15] Track expense -Green button on confirm page shows "Create 0.00 expense" for track scan expense #54861

Closed
8 tasks done
IuliiaHerets opened this issue Jan 7, 2025 · 21 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 Reviewing Has a PR in review

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Jan 7, 2025

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: 9.0.81-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp https://expensify.testrail.io/index.php?/tests/view/5421289
Email or phone of affected tester (no customers): applausetester+010108kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Open FAB.
  3. Click + > Submit expense > Scan.
  4. Upload a receipt.
  5. Select the contact under "Personal", which is yourself.

Expected Result:

The green button on the confirmation page should be "Create expense".

Actual Result:

The green button on the confirmation page shows "Create RM0.00 expense".

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6707923_1736239476465.20250107_164130.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @MitchExpensify
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Jan 7, 2025
Copy link

melvin-bot bot commented Jan 7, 2025

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

Copy link

melvin-bot bot commented Jan 7, 2025

Triggered auto assignment to @MitchExpensify (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 Jan 7, 2025

💬 A slack conversation has been started in #expensify-open-source

@melvin-bot melvin-bot bot added the Daily KSv2 label Jan 7, 2025
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jan 7, 2025
Copy link
Contributor

github-actions bot commented Jan 7, 2025

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

@daledah
Copy link
Contributor

daledah commented Jan 7, 2025

Proposal

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

The green button on the confirmation page shows "Create RM0.00 expense".

What is the root cause of that problem?

We're using createExpenseWithAmount in

text = translate('iou.createExpenseWithAmount', {amount: formattedAmount});

so in case amount is 0, it shows Create 0.00 expense

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

We should update this logic to

text = translate('iou.createExpense');
            if (iouAmount !== 0) {
                text = translate('iou.createExpenseWithAmount', {amount: formattedAmount});
            }

We can use submitExpense in case amount is 0 same as here (then we can refactor code a bit to prevent duplication)

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

We can add test to verify splitOrRequestOptions function to return createExpense in this case.

What alternative solutions did you explore? (Optional)

NA

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@dukenv0307
Copy link
Contributor

It's related to #54844 (comment) @srikarparsi

@srikarparsi
Copy link
Contributor

Thanks @dukenv0307, I think we should treat this one as a blocker and not a follow up. I think the solution here is to not make those text changes for the scan flow but I'll confirm in slack.

@trjExpensify
Copy link
Contributor

trjExpensify commented Jan 7, 2025

yep, in the scan case with Create expense regardless of which recipient you choose, we shouldn't include the amount in the button as it's unknown, so the button would just say Create expense. CC: @grgia @JKobrynski


Just noting the behaviour appearing on staging across the different recipient types when you use the Create expense > Scan flow:

  1. When you choose a workspace, the button reads Submit expense
  2. When you choose the selfDM, the button reads Create $0.00 expense
  3. When you choose an individual, the button reads Submit expense

In all of these cases, the button should read Create expense because the amount is unknown in the scan flow.

@srikarparsi
Copy link
Contributor

Looks like we will handle this in this PR as per this comment

@grgia
Copy link
Contributor

grgia commented Jan 7, 2025

Self assigning to keep track of this

cc @JKobrynski

Copy link

melvin-bot bot commented Jan 7, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 8, 2025
@melvin-bot melvin-bot bot changed the title Track expense -Green button on confirm page shows "Create 0.00 expense" for track scan expense [HOLD for payment 2025-01-15] Track expense -Green button on confirm page shows "Create 0.00 expense" for track scan expense Jan 8, 2025
Copy link

melvin-bot bot commented Jan 8, 2025

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 8, 2025
Copy link

melvin-bot bot commented Jan 8, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.81-6 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 2025-01-15. 🎊

Copy link

melvin-bot bot commented Jan 8, 2025

@grgia / @srikarparsi @MitchExpensify @grgia / @srikarparsi The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Jan 8, 2025
@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Jan 8, 2025
@JKobrynski
Copy link
Contributor

Hi, I'm Julian from Callstack - expert agency - and I would like to work on this issue.

CC: @grgia

Copy link

melvin-bot bot commented Jan 8, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@JKobrynski
Copy link
Contributor

Update:

Issue fixed in #54201, waiting for review.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jan 10, 2025
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2025-01-15] Track expense -Green button on confirm page shows "Create 0.00 expense" for track scan expense [HOLD for payment 2025-01-17] [HOLD for payment 2025-01-15] Track expense -Green button on confirm page shows "Create 0.00 expense" for track scan expense Jan 10, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 10, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

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

Copy link

melvin-bot bot commented Jan 10, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.82-12 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 2025-01-17. 🎊

Copy link

melvin-bot bot commented Jan 10, 2025

@grgia / @srikarparsi @MitchExpensify @grgia / @srikarparsi The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Jan 10, 2025
@JKobrynski
Copy link
Contributor

Update:

The PR is still waiting for review

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 14, 2025
@grgia grgia closed this as completed in 8f2d3e9 Jan 16, 2025
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 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

9 participants