Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
2.99k stars 2.5k forks source link

Use new multi config edit command #41627

Closed aldo-expensify closed 2 days ago

aldo-expensify commented 2 weeks ago

Details

Sometimes changing a connections configuration translate in multiple keys being edited. Currently, the existing command UpdatePolicyConnectionConfig only supports updating one key at a time, which eventually produced work arounds that break 1:1:1.

This PR is adding a new UpdateManyPolicyConnectionConfigurations command 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

  1. Have a workspace with QBO connected.
  2. Go to "Export > Export out-of-pocket-expenses as"
  3. Change the "Export as" value between the 3 options
  4. Verify that the selected account updates choosing the first available from the new valid values
  5. Change the setting "Export company cards as" to "Credit Card"
  6. Verify that the account selected changed to a valid account
  7. Change the setting "Export company cards as" to "Vendor Bill"
  8. Verify that setting "Default vendor" appeared
  9. Verify that when "Default vendor" is toggled, you see the setting "Vendor"
  10. Verify that when "Default vendor" is toggled, "Vendor" gets the first value selected by default

Offline tests

QA Steps

PR Author Checklist

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari https://github.com/Expensify/App/assets/87341702/d3fa227c-7990-4360-be84-7f9dd56ddbc2
MacOS: Desktop
hayata-suenaga commented 1 week ago

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 πŸ™‡

melvin-bot[bot] commented 4 days ago

@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]

aldo-expensify commented 4 days ago

@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.

trjExpensify commented 4 days ago

@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.

Nice! Time for an adhoc build?

github-actions[bot] commented 4 days ago
:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: Android :robot: iOS :apple:
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/41627/index.html https://ad-hoc-expensify-cash.s3.amazonaws.com/ios/41627/index.html
Android iOS
Desktop :computer: Web :spider_web:
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/41627/NewExpensify.dmg https://41627.pr-testing.expensify.com
Desktop Web

:eyes: View the workflow run that generated this build :eyes:

github-actions[bot] commented 4 days ago
:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: Android :robot: iOS :apple:
❌ FAILED ❌ ❌ FAILED ❌
The QR code can't be generated, because the android build failed The QR code can't be generated, because the iOS build failed
Desktop :computer: Web :spider_web:
❌ FAILED ❌ ❌ FAILED ❌
The QR code can't be generated, because the Desktop build failed The QR code can't be generated, because the web build failed

:eyes: View the workflow run that generated this build :eyes:

trjExpensify commented 3 days ago

Gave this a test, posted here.

aldo-expensify commented 3 days ago

@hayata-suenaga what this PR https://github.com/Expensify/App/pull/42102 fixed was already being fixed here, now we have conflicts. Please prioritize reviewing this doesn't keep running into conflicts πŸ™

aldo-expensify commented 3 days ago

lol conflicts again

ishpaul777 commented 3 days ago

Reviewer Checklist

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
hayata-suenaga commented 3 days ago

@ishpaul777, once you're done with the checklist, please DM me on Slack πŸ˜„ so that I can merge

ishpaul777 commented 3 days ago

Okay πŸ˜„

ishpaul777 commented 3 days ago

Just linked QB account, but i am not able to set Export out-of-pocket-expenses from the option,

https://github.com/Expensify/App/assets/104348397/38d0b32e-2390-4190-8484-0028ff64e97b

hayata-suenaga commented 3 days ago

@ishpaul777, is it working for company card export configuration screens?

aldo-expensify commented 3 days ago

Just linked QB account, but i am not able to set Export out-of-pocket-expenses from the option,

hmm, I wonder if you may have missed onyx updates because of the servers having problems.... Do you have an account that is currently connected to QBO? it shouldn't be necessary to connect a new account

ishpaul777 commented 3 days ago

Nope : (

https://github.com/Expensify/App/assets/104348397/da547de2-02bf-4ea7-90e0-a2d8521f8b83

aldo-expensify commented 3 days ago

Also, from video, it looks like the requests are going through very slowly.

ishpaul777 commented 3 days ago

Do you have an account that is currently connected to QBO? it shouldn't be necessary to connect a new account

Sadly. first time working on this feature so i dont have one yet.

ishpaul777 commented 3 days ago

I wonder if you may have missed onyx updates because of the servers having problems....

yes it appears to be the RC.

Screenshot 2024-05-16 at 1 31 23β€―AM
ishpaul777 commented 3 days ago

is there any steps to get the "Accounts Payable"/ "Vendors" List @aldo-expensify

Screenshot 2024-05-16 at 2 41 46β€―AM
hayata-suenaga commented 3 days ago

is there any steps to get the "Accounts Payable"/ "Vendors" List @aldo-expensify

@ishpaul777, do you have Location import and tax import enabled at the same time?

hayata-suenaga commented 3 days ago

if that happens (although very unlikely), there won't be any available option on the list of account options

ishpaul777 commented 3 days ago

no Location import is disabled is disabled, where's tax import πŸ€”

Screenshot 2024-05-16 at 2 52 42β€―AM
ishpaul777 commented 3 days ago

is there any config i need to do in QBO account i just completed the onboarding for QBO

ishpaul777 commented 3 days ago

Code wise looks good to me!, just need to do thorough testing and complete videos, will check back again tomorrow in my morning

aldo-expensify commented 3 days ago

is there any steps to get the "Accounts Payable"/ "Vendors" List @aldo-expensify

I get them without doing any extra action, but maybe it depends on the QBO account used for testing? I used qa@expensify.com

aldo-expensify commented 3 days ago

is there any config i need to do in QBO account i just completed the onboarding for QBO

Sorry, I really have no idea of how to setup this account properly... I just use one that was already there.

aldo-expensify commented 3 days ago

Code wise looks good to me!, just need to do thorough testing and complete videos, will check back again tomorrow in my morning

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?

hayata-suenaga commented 2 days ago

testing now...

hayata-suenaga commented 2 days ago

Tested well πŸŽ‰

https://github.com/Expensify/App/assets/98560306/b83c3dc0-a782-47b8-acec-7e9b441eea7b

hayata-suenaga commented 2 days ago

checked off the remaining items on the checklist

OSBotify commented 2 days ago

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

aldo-expensify commented 2 days ago

Thank you @hayata-suenaga for the quick work πŸ™‡