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
[HOLD for payment 2024-11-21] QBD - Admin is not selected as default Preferred exporter after connecting to QBD #52134
Version Number: 9.0.58-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/5184323 Email or phone of affected tester (no customers):applausetester+dqbd7@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Precondition: Have a workspace connected to QBD
Navigate to Workspace > Accounting
Click on Export
Click Preferred exporter
Expected Result:
Admin is selected as default Preferred exporter after connecting to QBD
Actual Result:
Admin(owner) is not selected as default Preferred exporter after connecting to QBD
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android: Standalone
Android: HybridApp
Android: mWeb Chrome
iOS: Standalone
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6656407_1730886082792.Screen_Recording_2024-11-06_at_12.33.31_in_the_afternoon.1.mp4
Edited by proposal-police: This proposal was edited at 2024-11-06 20:19:47 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
QBD - Admin is not selected as default Preferred exporter after connecting to QBD
What is the root cause of that problem?
The main problem is that by default exporter is equal to an empty string
And since in order to use the owner as a spare value exporter must be undefined or null (specifics of ?? operator)
We will never be able to use owner value
What changes do you think we should make in order to solve the problem?
To fix this bug we can replace ?? with ||
So that we can use owner if exporter is empty
And I suppose we need to check QBO just in case
Since the code for QBO and QBD are very similar to make sure there is no similar bug there
What alternative solutions did you explore? (Optional)
NA
Additional
I found an additional bug:
If we add an user and assign them as admins
Then we will select them as an Preferred exporter
Then removed from admins
It will still be selected as a preferred exporter
To fix this we can do an additional check for the current exporter and check if it is in the list of admins using the getAdminEmployees function
And in case of its absence we can again use owner as the current exporter
Or make a more complex solution and in case of connected integration and removal of admins from workspace we can make additional requests to save a preferred exporter as owner
And we will also need to check the QBO (and possibly other integrations)
changed the title [-]QBD - Admin is not selected as default Preferred exporter after connecting to QBD[/-][+][$250] QBD - Admin is not selected as default Preferred exporter after connecting to QBD[/+]on Nov 7, 2024
Hi @lakchote, I am concerned about whether it's a BE issue (like we should set qbdConfig?.export?.exporter to policyOwner in the BE after connecting to QBD).
Basically, this issue can be fixed in FE as @ZhenjaHorbach's proposed here, however will it cause any inconsistency behavior between FE and BE? FE infers exporter as policyOwner if it's an empty string, but do we have same logic in BE?
@hoangzinh I don't think there is a problem at all. And I do agree that if there ever was, we should instead fix it in the backend and not the frontend.
QBD integration backend logic hasn't changed regarding the preferred exporter and it works fine on OldDot.
changed the title [-]QBD - Admin is not selected as default Preferred exporter after connecting to QBD[/-][+][HOLD for payment 2024-11-21] QBD - Admin is not selected as default Preferred exporter after connecting to QBD[/+]on Nov 14, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.61-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hoangzinh@garrettmknight@hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Activity
melvin-bot commentedon Nov 6, 2024
Triggered auto assignment to @garrettmknight (
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.ZhenjaHorbach commentedon Nov 6, 2024
Edited by proposal-police: This proposal was edited at 2024-11-06 20:19:47 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
QBD - Admin is not selected as default Preferred exporter after connecting to QBD
What is the root cause of that problem?
The main problem is that by default exporter is equal to an empty string
And since in order to use the owner as a spare value exporter must be undefined or null (specifics of ?? operator)
We will never be able to use owner value
App/src/pages/workspace/accounting/qbd/export/QuickbooksDesktopExportPage.tsx
Line 34 in e267aa6
App/src/pages/workspace/accounting/qbd/export/QuickbooksDesktopPreferredExporterConfigurationPage.tsx
Line 48 in e267aa6
What changes do you think we should make in order to solve the problem?
To fix this bug we can replace ?? with ||
So that we can use owner if exporter is empty
And I suppose we need to check QBO just in case
Since the code for QBO and QBD are very similar to make sure there is no similar bug there
What alternative solutions did you explore? (Optional)
NA
Additional
I found an additional bug:
To fix this we can do an additional check for the current exporter and check if it is in the list of admins using the
getAdminEmployeesfunctionAnd in case of its absence we can again use owner as the current exporter
Or make a more complex solution and in case of connected integration and removal of admins from workspace we can make additional requests to save a preferred exporter as owner
And we will also need to check the QBO (and possibly other integrations)
melvin-bot commentedon Nov 7, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021854584654634877527
[-]QBD - Admin is not selected as default Preferred exporter after connecting to QBD[/-][+][$250] QBD - Admin is not selected as default Preferred exporter after connecting to QBD[/+]melvin-bot commentedon Nov 7, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (
External)hoangzinh commentedon Nov 8, 2024
Hi @lakchote, I am concerned about whether it's a BE issue (like we should set
qbdConfig?.export?.exportertopolicyOwnerin the BE after connecting to QBD).Basically, this issue can be fixed in FE as @ZhenjaHorbach's proposed here, however will it cause any inconsistency behavior between FE and BE? FE infers exporter as
policyOwnerif it's an empty string, but do we have same logic in BE?lakchote commentedon Nov 11, 2024
@hoangzinh I don't think there is a problem at all. And I do agree that if there ever was, we should instead fix it in the backend and not the frontend.
QBD integration backend logic hasn't changed regarding the preferred exporter and it works fine on OldDot.
cc @francoisl for your input.
16 remaining items
[-]QBD - Admin is not selected as default Preferred exporter after connecting to QBD[/-][+][HOLD for payment 2024-11-21] QBD - Admin is not selected as default Preferred exporter after connecting to QBD[/+]melvin-bot commentedon Nov 14, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Nov 14, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.61-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-11-21. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 14, 2024
@hoangzinh @garrettmknight @hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
melvin-bot commentedon Nov 21, 2024
Payment Summary
Upwork Job
BugZero Checklist (@garrettmknight)
hoangzinh commentedon Nov 21, 2024
We can close this issue #52134 (comment)