Skip to content

[$250] Expense Report - The error message ‘Missing category’ is not loaded in the row preview. #63792

Closed

Description

@nlemma

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.1.63-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/6226340
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: All platforms
App Component: Other

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in with a + gmail account.
  3. Go to selfDM. Create 2 expenses, only fill out amount.
  4. Create a WS.
  5. Click on FAB > Create report
  6. Go to the WS chat. Open the expense report
  7. Click on 'Add expense' > 'Add unreported expense'
  8. Add to report the 2 expenses previously created in selfDM.

Expected Result:

After adding the 2 selfDM expenses to the report, the error message ‘Missing category’ should appear next to ‘Missing merchant’ in the row preview.

Actual Result:

'Missing category' is not displayed. (The user must reload the page, or take some action for the error to be displayed)

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6854796_1749493672218.Screen_Recording_2025-06-09_at_3.14.04_PM.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021935266968915352792
  • Upwork Job ID: 1935266968915352792
  • Last Price Increase: 2025-06-18
  • Automatic offers:
    • daledah | Contributor | 107775029
Issue OwnerCurrent Issue Owner: @carlosmiceli

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 9, 2025
  2. melvin-bot commented on Jun 9, 2025

    @melvin-bot

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

  3. daledah commented on Jun 9, 2025

    @daledah
    Contributor

    Proposal

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

    'Missing category' is not displayed. (The user must reload the page, or take some action for the error to be displayed)

    What is the root cause of that problem?

    When moving expenses, currently there's no logics to add transaction violations to expenses moved from personal policy to a paid group policy

    function changeTransactionsReport(transactionIDs: string[], reportID: string) {

    So the "Missing category" violation is not shown. We only get the violation after reopen the expense report returned from BE.

    Note that "Missing merchant" does not depend on transaction violations but from FE calculations so it's shown.

    } else if (merchantMissing) {
    error = translate('iou.missingMerchant');
    }

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

    We should add transaction violation onyx data when moving expenses. Here's the implementation:

    Get policy of target report after here:

        const policy = getPolicy(newReport.policyID);

    Add onyx data after here

            if (isPaidGroupPolicy(policy) && policy?.id) {
                const policyTagList = getPolicyTagsData(policy.id);
                const violationData = ViolationsUtils.getViolationsOnyxData(
                    transaction,
                    allTransactionViolations,
                    policy,
                    policyTagList,
                    getPolicyCategoriesData(policy.id),
                    hasDependentTags(policy, policyTagList),
                    false,
                );
                optimisticData.push(violationData);
                failureData.push({
                    onyxMethod: Onyx.METHOD.MERGE,
                    key: `${ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS}${transaction.transactionID}`,
                    value: allTransactionViolation?.[transaction.transactionID],
                });
            }
    Screen.Recording.2025-06-10.at.04.00.21.mov

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

    None

    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.

  4. melvin-bot commented on Jun 13, 2025

    @melvin-bot

    @flaviadefaria Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  5. melvin-bot commented on Jun 17, 2025

    @melvin-bot

    @flaviadefaria 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 18, 2025
  7. changed the title [-]Expense Report - The error message ‘Missing category’ is not loaded in the row preview.[/-] [+][$250] Expense Report - The error message ‘Missing category’ is not loaded in the row preview.[/+] on Jun 18, 2025
  8. melvin-bot commented on Jun 18, 2025

    @melvin-bot
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 18, 2025
  10. melvin-bot commented on Jun 18, 2025

    @melvin-bot

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

  11. 11 remaining items

  12. daledah commented on Jun 24, 2025

    @daledah
    Contributor

    @ikevin127 PR is ready.

  13. ikevin127 commented on Jul 1, 2025

    @ikevin127
    Contributor

    ⚠️ Payment automation failed here -> this should be on [HOLD for Payment 2025-07-07] according to yesterday’s production deploy from comment.

    cc @flaviadefaria

  14. ikevin127 commented on Jul 7, 2025

    @ikevin127
    Contributor

    @flaviadefaria I will be requesting payment in ND, will most likely need a Payment summary here as per the comment above.

  15. JmillsExpensify commented on Jul 9, 2025

    @JmillsExpensify
    Contributor

    Payment summary:

  16. garrettmknight commented on Jul 9, 2025

    @garrettmknight
    Contributor

    Payment summary:

  17. JmillsExpensify commented on Jul 9, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @ikevin127

  18. melvin-bot commented on Jul 17, 2025

    @melvin-bot

    This issue has not been updated in over 15 days. @carlosmiceli, @ikevin127, @flaviadefaria, @daledah eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  19. melvin-bot commented on Sep 12, 2025

    @melvin-bot

    @carlosmiceli, @ikevin127, @flaviadefaria, @daledah, this Monthly task hasn't been acted upon in 6 weeks; closing.

    If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2Not a priorityReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions