Skip to content

[Due for payment 2025-11-13] [$250] “Expense over category daily limit” violation missing in NewDot but visible in OldDot #73922

Closed

Description

@m-natarajan

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.2.41-4
Reproducible in staging?: Y
Reproducible in production?: Y
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: @iwiznia
Slack conversation (hyperlinked to channel name): #Quality

Action Performed:

Precondition: Enable rules in workspace settings and set flag amounts over for a category (Meals and Entertainment)

  1. Create an expense and allow it to SmartScan
  2. Select the category (Meals and Entertainment)
  3. SmartScan detects an amount lower than the actual total
  4. Manually edit the amount to a higher value
  5. Observe the violations displayed on the report in NewDot
  6. Open the same report in OldDot (expensify.com)

Expected Result:

Both violations —
“Amount greater than scanned receipt”
“Expense over category daily limit”
— should display in NewDot just as they do in OldDot.

Actual Result:

Only “amount greater than scanned receipt” violation appears in NewDot.
The “Expense over category daily limit” violation is missing from the expense and report view, though it appears correctly in OldDot.

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

The screenshot for the issue is in OP

Recording.1850.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021984297430326230066
  • Upwork Job ID: 1984297430326230066
  • Last Price Increase: 2025-10-31
  • Automatic offers:
    • nkdengineer | Contributor | 109340774
Issue OwnerCurrent Issue Owner: @inimaga

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 31, 2025
  2. MelvinBot commented on Oct 31, 2025

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  3. melvin-bot commented on Oct 31, 2025

    @melvin-bot

    Triggered auto assignment to @clarajones-expensify (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 [-]“Expense over category daily limit” violation missing in NewDot but visible in OldDot[/-] [+][$250] “Expense over category daily limit” violation missing in NewDot but visible in OldDot[/+] on Oct 31, 2025
  5. melvin-bot commented on Oct 31, 2025

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

    @melvin-bot

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

  8. nkdengineer commented on Oct 31, 2025

    @nkdengineer
    Contributor

    Proposal

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

    Only “amount greater than scanned receipt” violation appears in NewDot.
    The “Expense over category daily limit” violation is missing from the expense and report view, though it appears correctly in OldDot.

    What is the root cause of that problem?

    We only display the first violation that affects the field. In this case, we have two violations of the amount field, but only one is displayed.

    if (field !== 'merchant' && hasViolations(field, data, policyHasDependentTags, tagValue)) {
    const violations = getViolationsForField(field, data, policyHasDependentTags, tagValue);
    const firstViolation = violations.at(0);
    if (firstViolation) {
    return ViolationsUtils.getViolationTranslation(firstViolation, translate, canEdit);

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

    We should join and display all violation messages.

    if (field !== 'merchant' && hasViolations(field, data, policyHasDependentTags, tagValue)) {
                    const violations = getViolationsForField(field, data, policyHasDependentTags, tagValue);
                    return violations.map((violation) => ViolationsUtils.getViolationTranslation(violation, translate, canEdit)).join('. ');
                }
    

    if (field !== 'merchant' && hasViolations(field, data, policyHasDependentTags, tagValue)) {
    const violations = getViolationsForField(field, data, policyHasDependentTags, tagValue);
    const firstViolation = violations.at(0);
    if (firstViolation) {
    return ViolationsUtils.getViolationTranslation(firstViolation, translate, canEdit);

    If we want another format or minor UI change, we can discuss it in the PR. We can also fix other places which have the same problem.

    What alternative solutions did you explore? (Optional)

    Result

    Image

    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.

  9. 25 remaining items

  10. melvin-bot commented on Nov 6, 2025

    @melvin-bot

    @jayeshmangwani 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]

  11. clarajones-expensify commented on Nov 12, 2025

    @clarajones-expensify
    Contributor

    BugZero Checklist:

    • [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 👎

  12. clarajones-expensify commented on Nov 12, 2025

    @clarajones-expensify
    Contributor

    Hi @jayeshmangwani ! would you fill out the above checklist when you can? TY!

    And @nkdengineer - would you apply to the job on upwork? TY!

  13. jayeshmangwani commented on Nov 13, 2025

    @jayeshmangwani
    Contributor

    BugZero Checklist:

    • [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: This was initially implemented to display only the first violation on this PR Use error prop for violations for consistent styling #34303, which has been the behavior for a while. We’re now updating it to align with OD and show all violations.

    • [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: Not that CRITICAL

    • [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

    Precondition:

    • Enable rules in workspace settings.
    • Set flag amounts over the limit for the Meals and Entertainment category.

    Steps:

    1. Create an expense and allow it to SmartScan.
    2. Select the Meals and Entertainment category.
    3. Ensure SmartScan detects an amount lower than the actual total.
    4. Manually edit the amount to a higher value.
    5. Verify that both of the following violations are displayed:
      • Expense over category daily limit
      • Amount greater than scanned receipt

    Do we agree 👍 or 👎

  14. clarajones-expensify commented on Nov 13, 2025

    @clarajones-expensify
    Contributor

    Payment Summary

    Contributor: @nkdengineer due $250 via NewDot
    Contributor+: @jayeshmangwani due $250 via NewDot

  15. clarajones-expensify commented on Nov 17, 2025

    @clarajones-expensify
    Contributor

    bump @nkdengineer - would you apply to the job on upwork? TY!

  16. clarajones-expensify commented on Nov 18, 2025

    @clarajones-expensify
    Contributor

    nevermind, @nkdengineer is paid via newdot now ^^

  17. trjExpensify commented on Dec 3, 2025

    @trjExpensify
    Contributor

    approved $250 for @jayeshmangwani

  18. twisterdotcom commented on Mar 11, 2026

    @twisterdotcom
    Contributor

    @nkdengineer has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-f1ea-a706-afa3-9677643c70b4
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