App icon indicating copy to clipboard operation
App copied to clipboard

Invoice - "Analyzing.." shows up in Category field on invoice report and it does not disappear

Open jponikarchuk opened this issue 1 month ago • 7 comments

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: 9.2.87-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/App/pull/63745 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.1 / Chrome App Component: Money Requests

Action Performed:

Precondition:

  • Invoice is enabled.
  1. Go to staging.new.expensify.com
  2. Open FAB > Send invoice.
  3. Send an invoice without category to any user.
  4. Open the invoice report.

Expected Result:

Category field should not show "Analyzing.." because invoice expense will not be auto-categorized.

Actual Result:

Category field shows "Analyzing.." and it does not disappear.

Workaround:

Unknown

Platforms:

  • [x] Android: App
  • [ ] Android: mWeb Chrome
  • [x] iOS: App
  • [ ] iOS: mWeb Safari
  • [ ] iOS: mWeb Chrome
  • [x] Windows: Chrome
  • [x] MacOS: Chrome / Safari

Screenshots/Videos

https://github.com/user-attachments/assets/3a23bc4b-c40d-4723-b916-9e772becddec

View all open jobs on GitHub

jponikarchuk avatar Dec 24 '25 20:12 jponikarchuk

@chuckdries recently merged https://github.com/Expensify/App/pull/63745, but they are OOO right now, so I'll auto-assign someone else.

melvin-bot[bot] avatar Dec 24 '25 20:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 24 '25 20:12 melvin-bot[bot]

:wave: 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.

github-actions[bot] avatar Dec 24 '25 20:12 github-actions[bot]

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

melvin-bot[bot] avatar Dec 24 '25 20:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 24 '25 20:12 melvin-bot[bot]

Proposal

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

Invoice - "Analyzing.." shows up in Category field on invoice report and it does not disappear

What is the root cause of that problem?

We are not checking invoice report in isCategoryBeingAnalyzed, it checks if the category is missing and if the transaction has a pendingAction of ADD or is within the auto-categorization grace period.

Since these conditions can be true for invoice transactions, the function returns true, causing "Analyzing.." to appear. However, invoice expenses are NOT auto-categorized by the system since invoices have different workflows than regular expenses

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

We should update isCategoryBeingAnalyzed to return false for invoice report

if (isInvoiceReport(transaction.reportID)) {
    return false;
}

https://github.com/Expensify/App/blob/1dfe78c5dcd6bc2161ab30a458beae314eb9ba48/src/libs/TransactionUtils/index.ts#L1172-L1178

What alternative solutions did you explore? (Optional)

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.

samranahm avatar Dec 24 '25 20:12 samranahm

Requested retest here.

marcaaron avatar Dec 25 '25 21:12 marcaaron

Not repro on Mac Chrome and iPhone 15 build 9.2.87-4

https://github.com/user-attachments/assets/0939e982-9911-49b3-a5be-5a26deb03842

https://github.com/user-attachments/assets/c28a83ad-b3f4-459c-9bd7-2b6d41c81f52

m-natarajan avatar Dec 25 '25 23:12 m-natarajan