You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reports - Invoice is accessible when account does not have invoice, which opens not here page #62735
Version Number: 9.1.51-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from TestRail:#61170 Email or phone of affected tester (no customers):applausetester+sjdoidwsn111j12@applause.expensifail.com Issue reported by: Applause Internal Team Device used: Mac 15.4 / Chrome App Component: Search
Action Performed:
Precondition:
Account has no workspace, or has workspace without invoicing feature.
Go to staging.new.expensify.com
Go to Reports.
Click Type:Expense.
Select Invoice.
Click Apply.
Click Send invoice button on the empty state screen.
Expected Result:
In Step 4, Invoice should be hidden when the account does not have invoice expense or does not have workspace with invoicing feature.
Actual Result:
In Step 4, Invoice is accessible when the account does not have invoice expense or does not have workspace with invoicing feature.
This leads to Step 6 where app opens not here page after clicking Send invoice button on the empty state screen.
👋 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:
Identify the pull request that introduced this issue and revert it.
Fix change workspace condition #62062: This PR refactors logic for displaying the 'Change workspace' secondary action option. It modifies the behavior based on the report state and user roles, similar to the conditions described in the issue where the invoice option should only be shown if certain criteria are met (account having invoice feature).
Suggested Search & Filter Revamp #61170: This PR introduces changes to the filters and displayed content in reports. As the issue involves displaying invoices based on specific account features, any changes to the report's logic could affect whether invoices appear correctly for users without invoice capabilities.
After search revamp, transaction type is showed inside search filter bar but there is no check like before so invoice type is visible even when user can not create invoice
What changes do you think we should make in order to solve the problem?
Add filter in below code to remove invoice type based on previous conditions
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.
⚠️@jaydamani Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).
Activity
melvin-bot commentedon May 24, 2025
Triggered auto assignment to @RachCHopkins (
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 commentedon May 24, 2025
Triggered auto assignment to @MarioExpensify (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon May 24, 2025
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 24, 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:
BlameGPT commentedon May 25, 2025
Possible culprit PRs for this issue
jaydamani commentedon May 26, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-26 04:49:39 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Invoice is accessible when account does not have invoice, which opens not here page
What is the root cause of that problem?
Before the changes from #61170 , the invoice type was only showed based on below conditions:
App/src/libs/SearchUIUtils.ts
Line 909 in 67ce93b
After search revamp, transaction type is showed inside search filter bar but there is no check like before so invoice type is visible even when user can not create invoice
What changes do you think we should make in order to solve the problem?
Add filter in below code to remove invoice type based on previous conditions
App/src/components/Search/SearchPageHeader/SearchFiltersBar.tsx
Lines 154 to 178 in 526a0e4
Updated code:
Git diff for testing
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
What alternative solutions did you explore? (Optional)
Move typeOptions definition to be inside component and only push invoice when conditions are met
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.
github-actions commentedon May 26, 2025
MarioExpensify commentedon May 26, 2025
@jaydamani thanks for your proposal but this was reverted here and will be fixed by the original author.