Skip to content

[HOLD for payment 2025-01-18] [$250] Category receipt required amount is displaying the wrong default value.  #54916

Closed

Description

@trjExpensify

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: v9.0.81-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @VictoriaExpensify
Slack conversation (hyperlinked to channel name): #expense

Action Performed:

  1. Go to new.expensify.com
  2. Create a workspace
  3. Go to More features > Enable Rules > Upgrade
  4. Go to Rules
  5. Observe the receipt required amount is set to £25.00
  6. Go to Categories
  7. Click on a category value in the table to open the settings in the RHP
  8. Observe the "require receipts over" default is set to £2000.00
  9. Create and submit a manual expense on the workspace for £29.00 without a receipt
  10. Observe the violation for receipts being required for expenses over £25.00

Expected Result:

The default in step 8 should be displayed as £25.00 to match the receipt required amount set on the workspace.

Actual Result:

The default in step 8 is displayed as £2000.00.

Note: It seems like we're displaying the max expense amount value instead, perhaps here.

Workaround:

Yes, the limit is correctly set to the workspace default on the backend, it's a display issue showing it as the wrong value in the category settings page.

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

image image image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021876762664887061908
  • Upwork Job ID: 1876762664887061908
  • Last Price Increase: 2025-01-07
  • Automatic offers:
    • shubham1206agra | Reviewer | 105609818
    • truph01 | Contributor | 105609822
Issue OwnerCurrent Issue Owner: @laurenreidexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 7, 2025
  2. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 7, 2025
  3. melvin-bot commented on Jan 7, 2025

    @melvin-bot

    Triggered auto assignment to @laurenreidexpensify (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.

  4. changed the title [-]Category receipt required amount is displaying the wrong default value. [/-] [+][$250] Category receipt required amount is displaying the wrong default value. [/+] on Jan 7, 2025
  5. melvin-bot commented on Jan 7, 2025

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 7, 2025
  7. melvin-bot commented on Jan 7, 2025

    @melvin-bot

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

  8. truph01 commented on Jan 7, 2025

    @truph01
    Contributor

    Proposal

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

    • The default in step 8 is displayed as £2000.00.

    What is the root cause of that problem?

    • In here:

    const maxExpenseAmountToDisplay = policy?.maxExpenseAmount === CONST.DISABLED_MAX_EXPENSE_VALUE ? 0 : policy?.maxExpenseAmount;

    we are using policy?.maxExpenseAmount.

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

    • We should use policy?.maxExpenseAmountNoReceipt instead:
        const maxExpenseAmountToDisplay = policy?.maxExpenseAmountNoReceipt === CONST.DISABLED_MAX_EXPENSE_VALUE ? 0 : policy?.maxExpenseAmountNoReceipt;
    
    • We should fix:

    const maxExpenseAmountToDisplay = policy?.maxExpenseAmount === CONST.DISABLED_MAX_EXPENSE_VALUE ? 0 : policy?.maxExpenseAmount;

    as well.

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

  9. shubham1206agra commented on Jan 8, 2025

    @shubham1206agra
    Contributor

    @truph01's proposal looks good to me.

    🎀👀🎀 C+ reviewed

  10. melvin-bot commented on Jan 8, 2025

    @melvin-bot

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

  11. 20 remaining items

  12. laurenreidexpensify commented on Jan 17, 2025

    @laurenreidexpensify
    Contributor

    Submitted test to be added to TestRail

  13. laurenreidexpensify commented on Jan 17, 2025

    @laurenreidexpensify
    Contributor

    @shubham1206agra @truph01 can you confirm if you have accepted any offers in Upwork yet?

  14. shubham1206agra commented on Jan 17, 2025

    @shubham1206agra
    Contributor

    @laurenreidexpensify I accepted the offer

  15. laurenreidexpensify commented on Jan 21, 2025

    @laurenreidexpensify
    Contributor

    Note for myself- Upwork links being weird - checking internally https://expensify.slack.com/archives/C01SKUP7QR0/p1737447436443629

  16. dylanexpensify commented on Jan 21, 2025

    @dylanexpensify
    Contributor

    Payments complete!

  17. laurenreidexpensify commented on Jan 21, 2025

    @laurenreidexpensify
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  18. laurenreidexpensify commented on Jan 21, 2025

    @laurenreidexpensify
    Contributor

    @shubham1206agra pls complete the checklist ^^

  19. shubham1206agra commented on Jan 21, 2025

    @shubham1206agra
    Contributor
  20. laurenreidexpensify commented on Jan 22, 2025

    @laurenreidexpensify
    Contributor

    @shubham1206agra oh my sorry! i even already created the regression test 🤦 we got there ha!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions