Use new multi config edit command#41627
Conversation
|
Just a heads-up, there is a PR to update screens related to the company card export options. If that PR is merged first, there might be quite a lot of merge conflicts on these pages 🙇 |
src/pages/workspace/accounting/qbo/export/QuickbooksCompanyCardExpenseAccountPage.tsx
Outdated
Show resolved
Hide resolved
| keyForList: CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.VENDOR_BILL, | ||
| isSelected: CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.VENDOR_BILL === nonReimbursableExpensesExportDestination, | ||
| accounts: accountPayable ?? [], | ||
| defaultVendor: vendors?.[0]?.id ?? CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE, |
There was a problem hiding this comment.
The default vendor should be NONE by default according to this part of the design doc
There was a problem hiding this comment.
^^ that's referring to the toggle for default vendor being off by default when you connect to QBO.
There was a problem hiding this comment.
Cool yes, the toggle should be off (and the Vendor push input not shown) until the user toggles Default vendor on. 👍
There was a problem hiding this comment.
I think you may be misunderstanding the code, this is the default value that will be used if the account type changes to VENDOR_BILL. I understand that in that case we should select the first vendor.
| text: translate(`workspace.qbo.accounts.journal_entry`), | ||
| keyForList: CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.JOURNAL_ENTRY, | ||
| isSelected: reimbursableExpensesExportDestination === CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.JOURNAL_ENTRY, | ||
| isShown: !isTaxesEnabled || isLocationsEnabled, |
There was a problem hiding this comment.
| isShown: !isTaxesEnabled || isLocationsEnabled, | |
| isShown: !isTaxesEnabled, |
When syncTax is set to true, the Journal Entry option should not be displayed, even if Location import is enabled.
If we commit this change, however, there won't be any option displayed when both the tax import and location import are enabled. I think this is the expected behavior.
There was a problem hiding this comment.
There was a problem hiding this comment.
There was a problem hiding this comment.
Sounds unrelated to this PR.
src/pages/workspace/accounting/qbo/export/QuickbooksOutOfPocketExpenseEntitySelectPage.tsx
Show resolved
Hide resolved
|
@ishpaul777 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@trjExpensify @hayata-suenaga this is ready for review again. For details about translations, lets address them in a separate follow up. I don't want this running into conflicts and hold on unrelated already existing bugs. |
|
if that happens (although very unlikely), there won't be any available option on the list of account options |
|
is there any config i need to do in QBO account i just completed the onboarding for QBO |
|
Code wise looks good to me!, just need to do thorough testing and complete videos, will check back again tomorrow in my morning |
I get them without doing any extra action, but maybe it depends on the QBO account used for testing? I used qa@expensify.com |
Sorry, I really have no idea of how to setup this account properly... I just use one that was already there. |
I would prefer ideally to not have to wait until tomorrow for testing this. @hayata-suenaga can you test this in web and then we merge? |
|
testing now... |
|
Tested well 🎉 Screen.Recording.2024-05-15.at.9.55.13.PM.mov |
|
checked off the remaining items on the checklist |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Thank you @hayata-suenaga for the quick work 🙇 |
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.75-0 🚀
|
|
QAed on staging. passed 🎉 |
|
Commented here, wondering if this has introduced a regression: https://expensify.slack.com/archives/C036QM0SLJK/p1716547626337039?thread_ts=1716238564.568549&cid=C036QM0SLJK |
responded in Slack also I think @rushatgabhane reverted this PR and tested and confirmed that this PR is not the cause for the issue |
|
@hayata-suenaga i wouldn't rely on my test because my account might have an issue |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.75-1 🚀
|
|
hello @trjExpensify Can you please help with payment for this PR review i dont see a E/app issue associated with this PR |
|
@trjExpensify should I create an App issue just to handle the payment? or can we do it skipping that? |
|
Ordinarily, but it's fine. I'll do it here. Payment summary as follows:
Offer sent! |
|
Paid! |
|
Thank you! |
| CONST.POLICY.CONNECTIONS.NAME.QBO, | ||
| { | ||
| [CONST.QUICK_BOOKS_CONFIG.REIMBURSABLE_EXPENSES_EXPORT_DESTINATION]: row.value, | ||
| [CONST.QUICK_BOOKS_CONFIG.REIMBURSABLE_EXPENSES_ACCOUNT]: row.accounts[0], |
There was a problem hiding this comment.
If the accounts is empty, it will return undefined here, thus updating nothing. It will cause a bug that REIMBURSABLE_EXPENSES_ACCOUNT is not reset/clear when the user selects an export destination that there is no applicable A/P account. We improved it in this PR #58370

Details
Sometimes changing a connections configuration translate in multiple keys being edited. Currently, the existing command
UpdatePolicyConnectionConfigonly supports updating one key at a time, which eventually produced work arounds that break 1:1:1.This PR is adding a new
UpdateManyPolicyConnectionConfigurationscommand that takes a partial connection config object to edit multiple settings in one call. An example of this is:Needs:
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/390731
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-05-14.at.1.59.52.PM.mov
MacOS: Desktop