Skip to content

[HOLD for payment 2024-11-21] QBD - Admin is not selected as default Preferred exporter after connecting to QBD #52134

Closed

Description

@lanitochka17

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: 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

  1. Navigate to Workspace > Accounting
  2. Click on Export
  3. 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 evidence
Bug6656407_1730886082792.Screen_Recording_2024-11-06_at_12.33.31_in_the_afternoon.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021854584654634877527
  • Upwork Job ID: 1854584654634877527
  • Last Price Increase: 2024-11-07
Issue OwnerCurrent Issue Owner: @garrettmknight

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 6, 2024
  2. melvin-bot commented on Nov 6, 2024

    @melvin-bot

    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.

  3. ZhenjaHorbach commented on Nov 6, 2024

    @ZhenjaHorbach
    Contributor

    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

    title: qbdConfig?.export?.exporter ?? policyOwner,

    isSelected: (currentExporter ?? policy?.owner) === exporter.email,

    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:

    1. If we add an user and assign them as admins
    2. Then we will select them as an Preferred exporter
    3. Then removed from admins
    4. 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)

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 7, 2024
  5. melvin-bot commented on Nov 7, 2024

    @melvin-bot
  6. 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
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 7, 2024
  8. melvin-bot commented on Nov 7, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External)

  9. moved this to External Bugs and Follow Up Issues in #expensify-bugson Nov 7, 2024
  10. hoangzinh commented on Nov 8, 2024

    @hoangzinh
    Contributor

    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?

  11. lakchote commented on Nov 11, 2024

    @lakchote
    Contributor

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

  12. 16 remaining items

  13. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Nov 14, 2024
  14. 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
  15. melvin-bot commented on Nov 14, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  16. melvin-bot commented on Nov 14, 2024

    @melvin-bot

    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:

    • @hoangzinh requires payment through NewDot Manual Requests
  17. melvin-bot commented on Nov 14, 2024

    @melvin-bot

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

  18. moved this from Bugs and Follow Up Issues to Hold for Payment in #expensify-bugson Nov 14, 2024
  19. melvin-bot commented on Nov 21, 2024

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@garrettmknight)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1854584654634877527/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  20. hoangzinh commented on Nov 21, 2024

    @hoangzinh
    Contributor

    We can close this issue #52134 (comment)

  21. moved this from Hold for Payment to Done in #expensify-bugson Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions