Repository navigation
Description
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.3.79-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-32105/folder/13176706/41236846/1432273661
Email or phone of affected tester (no customers): applausetester+ccardfeed@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Windows 11 / Chrome
App Component: Workspace Settings
Action Performed:
Preconditions
- Logged in to applausetester+ccardfeed@applause.expensifail.com
- Connect to NetSuite on "Company Cards tests - DO NOT DELETE!" workspace
Steps:
- Click on any assigned card to the account applausetester+ccardfeed@applause.expensifail.com
- Observe NetSuite vendor bills export row
- Click the NetSuite vendor bills export row
- Click a different account other than default card
- Click the NetSuite vendor bills export row again
- Click Default Card"
Expected Result:
- in step 2, a default value of default card should be displayed on NetSuite vendor bills export row
- in step 3, "Default Card" should be selected before user choose different account
- in step 6, after clicking "Default Card", the account should be displayed on NetSuite vendor bills export row
Actual Result:
- in step 2, a default value of default card is missing on NetSuite vendor bills export row
- in step 3, "Default Card" isn't selected before user choose different account
- in step 6, after clicking "Default Card", the account isn't displayed on NetSuite vendor bills export row
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome Safari
Screenshots/Videos
Bug7160357_1779427565942.vendor_netsuite.mp4
Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7160357
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022057788519201853127
- Upwork Job ID: 2057788519201853127
- Last Price Increase: 2026-05-22
- Automatic offers:
- FitseTLT | Reviewer | 111563078
Issue Owner
Current Issue Owner: @mallenexpensifyMetadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
applause-bot commentedon May 22, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/6a549c014156326f01f1462bbd26ecb3fd0103b9b5644824cfaed5b54857e66c
MelvinBot commentedon May 22, 2026
Proposal
What is the root cause of that problem?
In
utils.tsx:168-171, theisDefaultTitleflag for the NetSuiteVENDOR_BILLcase requiresconfig?.defaultVendorto be truthy:When no default vendor is configured in the workspace's NetSuite settings,
isDefaultTitleis alwaysfalse. The fallbackselectedVendorlookup also fails because no real vendor hasid === 'default', sotitleresolves toundefinedand the row appears blank.The same bug exists in the
JOURNAL_ENTRYcase at lines 189-193.What changes do you think we should make in order to solve the problem?
Align the NetSuite
isDefaultTitlelogic with the Sage Intacct pattern at lines 241-243, which does not require a default account to exist:For
VENDOR_BILL(line 168-171), change to:Apply the same fix to
JOURNAL_ENTRY(lines 189-193):This ensures "Default card" displays when no card-specific vendor/account is selected, regardless of whether a workspace-level default vendor exists.
Related issues
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.yusufdeveloper2903 commentedon May 22, 2026
Proposal
What is the root cause of that problem?
The NetSuite vendor bill export row for company cards doesn't display a default value ("Default Card") when no explicit value has been saved. The selector likely checks for a stored value but falls back to an empty/undefined state instead of falling back to a
DEFAULT_CARDconstant or equivalent default string when the value is absent.What changes do you think we should make in order to solve the problem?
I'd look at the NetSuite company card export options page, likely around
src/pages/workspace/accounting/netsuite/export/or a similar path. The fix involves ensuring the vendor bill export field defaults toDEFAULT_CARD(or the equivalent CONST value) when no value is stored in Onyx.And in the picker/selector, the selected value comparison should treat the
DEFAULT_CARDsentinel as a valid selectable option so it renders correctly and can be re-selected:This ensures (a) the row displays "Default Card" when nothing is saved, (b) "Default Card" is pre-selected when opening the picker with no saved value, and (c) choosing "Default Card" explicitly saves/clears the value and reflects back on the row.
What alternative solutions did you explore?
An alternative is to treat an empty string as the default and map it to "Default Card" in the display layer only — but I think explicitly using the CONST default is cleaner and less error-prone across the codebase.
MobileMage commentedon May 22, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a company card is connected to a NetSuite workspace with vendor bill export configured, the vendor bill export row on the card details page shows no title (blank) instead of "Default Card", and the "Default Card" option is not pre-selected when the user opens the account selector.
What is the root cause of that problem?
In
getExportMenuIteminsidesrc/pages/workspace/companyCards/utils.tsx, theVENDOR_BILLbranch of the NetSuite switch setsdefaultAccount = config?.defaultVendor. The fieldconfig.defaultVendoris the reimbursable default vendor for out-of-pocket expenses — it is not reliably set for non-reimbursable (company card) vendor bill export, sodefaultAccountends upundefined. BecauseisDefaultTitleis computed as!!(defaultAccount && ...), whendefaultAccountisundefinedthe expression evaluates tofalseregardless of what is stored incompanyCard?.nameValuePairs?.netsuite_export_vendor. As a result,isDefaultTitleis alwaysfalsefor cards where no reimbursable default vendor is configured,titleis never set todefaultCard, and the selected entry in the picker list is never marked as the "Default Card" row.App/src/pages/workspace/companyCards/utils.tsx
Lines 165 to 184 in 38feaa7
What changes do you think we should make in order to solve the problem?
The
isDefaultTitlecheck for theVENDOR_BILLcase should not depend solely ondefaultAccountbeing truthy. A card whosenetsuite_export_vendornameValuePair is either absent or equal toCONST.COMPANY_CARDS.DEFAULT_EXPORT_TYPEshould always display "Default Card", whether or not a workspace-level default vendor is configured. The fix is to decouple the two conditions: setisDefaultTitletotruewhencompanyCard?.nameValuePairs?.netsuite_export_vendoris falsy or equalsCONST.COMPANY_CARDS.DEFAULT_EXPORT_TYPE, and only additionally requiredefaultAccountto be truthy when you want to fall back to showing the workspace default vendor name. This mirrors the pattern already used in theJOURNAL_ENTRYbranch and in the QBO/Xero/QBD cases in the same file. Concretely, insrc/pages/workspace/companyCards/utils.tsxwithin theNETSUITE→VENDOR_BILLcase, changeisDefaultTitleto!!(defaultAccount && (!netsuite_export_vendor || netsuite_export_vendor === DEFAULT_EXPORT_TYPE))should become!!((!netsuite_export_vendor || netsuite_export_vendor === CONST.COMPANY_CARDS.DEFAULT_EXPORT_TYPE)), and settitletodefaultCardwhenisDefaultTitleis true (even whendefaultAccountis absent), mirroring how the Xero case always showsdefaultCardfor the default selection. TheisSelectedmapping for the picker list entries should likewise useisDefaultTitleto mark the "Default Card" row whenever no specific vendor has been chosen.What alternative solutions did you explore? (Optional)
N/A
Abdukhamid000 commentedon May 22, 2026
Proposal
What is the root cause of that problem?
In
[pages/workspace/companyCards/utils.tsx:165-184](https://github.com/Expensify/App/blob/main/src/pages/workspace/companyCards/utils.tsx#L165-L184), the NetSuite VENDOR_BILL branch only shows "Default Card" when the workspace itself has adefaultVendorconfigured:On the test workspace
config.defaultVendoris not set, sodefaultAccountis falsy →isDefaultTitleis always false → it falls through toselectedVendor?.name. In every step of the repro:netsuite_export_vendoris undefined,defaultAccountis undefined,selectedVendorresolves to nothing → title is empty.isDefaultTitledrivesisSelected: name === defaultCard, so the "Default Card" row is never marked selected.nameValuePairs.netsuite_export_vendoris nowDEFAULT_EXPORT_TYPE, butdefaultAccountis still undefined →isDefaultTitleis still false →selectedVendor = vendors.find(id => id === DEFAULT_EXPORT_TYPE)returns nothing → title stays empty.Tying "show Default Card" to the workspace having a configured default vendor is the wrong gate. The card's own
nameValuePairs.netsuite_export_vendorvalue is what tells us the user intends the default — whether or not the workspace has actually set one yet.What changes do you think we should make in order to solve the problem?
Drop the
defaultAccount &&precondition fromisDefaultTitlein the VENDOR_BILL branch ([utils.tsx:168-171](https://github.com/Expensify/App/blob/main/src/pages/workspace/companyCards/utils.tsx#L168-L171)):This fixes all three QA expectations in one shot: the row title becomes "Default Card", the selector pre-selects the "Default Card" row, and selecting it again keeps the title populated.
The JOURNAL_ENTRY branch right below (
[utils.tsx:189-193](https://github.com/Expensify/App/blob/main/src/pages/workspace/companyCards/utils.tsx#L189-L193)) has the identical pattern keyed onconfig?.payableAcct. Apply the same one-line trim there to keep the two NetSuite cases consistent and pre-empt the same bug surfacing on the journal-entry export.What alternative solutions did you explore?
config.defaultVendoris populated server-side on every workspace. The cleaner long-term answer, but it's a backend/data-migration job and doesn't help users who already have a workspace in this state. Removing the client-side coupling is the surgical fix.defaultVendoris unset. Adds a special case for "nothing to default to" without changing the underlying mismatch. The card-levelnameValuePairsis the source of truth for "user picked default"; reading it directly is simpler than carrying two states.melvin-bot commentedon May 22, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @FitseTLT (
External)David-2002065 commentedon May 22, 2026
Proposal
What is the root cause of that problem?
The NetSuite vendor bill export row on the company card details page is rendered from
getExportMenuItem, and in theVENDOR_BILLcaseisDefaultTitleis gated ondefaultAccount(the connection-levelconfig?.defaultVendor):https://github.com/Expensify/App/blob/main/src/pages/workspace/companyCards/utils.tsx#L165-L184
When the NetSuite connection has no connection-level default vendor configured,
defaultAccountisundefined, soisDefaultTitleisfalseeven though the card has no specific vendor assigned (or is explicitly set to "Default Card", i.e.netsuite_export_vendor === 'default').With
isDefaultTitle === false,titlefalls through toselectedVendor?.name. ButselectedVendorisvendors.find(({id}) => id === (companyCard?.nameValuePairs?.netsuite_export_vendor ?? defaultAccount))— and'default'(orundefined) matches no real vendorid, soselectedVendorisundefinedandtitlebecomesundefined. That is why the row shows no value (step 2 / step 6), and on the select page no row getsisSelected: true, so "Default Card" isn't highlighted (step 3).This is inconsistent with the Sage Intacct vendor bill case, which derives
isDefaultTitlepurely from the card NVP and does not require a connection-level default to be set:https://github.com/Expensify/App/blob/main/src/pages/workspace/companyCards/utils.tsx#L241-L243
What changes do you think we should make in order to solve the problem?
In the NetSuite
VENDOR_BILLcase ofgetExportMenuItem, stop gatingisDefaultTitleondefaultAccount, so "Default Card" is treated as the default whenever the card has no specific vendor assigned — matching the Sage Intacct behavior:With this,
titlebecomesdefaultCardand the "Default Card" list row getsisSelected: truewhenever the card export is unset or'default', fixing steps 2, 3 and 6.defaultAccountis still used as the fallback forselectedVendor, so the real-vendor path is unaffected.The NetSuite
JOURNAL_ENTRYcase directly below has the identicaldefaultAccount &&gate (againstconfig?.payableAcct):https://github.com/Expensify/App/blob/main/src/pages/workspace/companyCards/utils.tsx#L189-L193
It has the same latent bug when no connection-level payable account is configured, so the same change should be applied there for consistency.
What alternative solutions did you explore? (Optional)
titletodefaultCardwhenselectedVendorisundefined. This would patch the empty title on the details page but leaves the select page broken — no row would still getisSelected: true, so "Default Card" wouldn't be highlighted (step 3). FixingisDefaultTitleat the single source covers both surfaces.[-]Company Card - Default value missing on NetSuite vendor bill export row[/-][+][$250] Company Card - Default value missing on NetSuite vendor bill export row[/+]melvin-bot commentedon May 22, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022057788519201853127
47 remaining items
melvin-bot commentedon Jun 19, 2026
@FitseTLT Whoops! This issue is 2 days overdue. Let's get this updated quick!
FitseTLT commentedon Jun 22, 2026
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: https://github.com/Expensify/App/pull/52575/changes#r3452181012
[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.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/653155
Regression Test Proposal
Precondition:
Test:
Export company cards assetting:Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-7a98-a353-8947-a9863b350124melvin-bot commentedon Jun 25, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)mallenexpensify commentedon Jun 28, 2026
Payment Summary
Contributor+: @FitseTLT due $250 via NewDot
^ Test case created. Thx
flaviadefaria commentedon Jul 29, 2026
Approved: @FitseTLT due $250 via NewDot