Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] QBD - Tags show as disabled despite selecting Import as Tags in workspace config #52133

Open
1 of 8 tasks
lanitochka17 opened this issue Nov 6, 2024 · 32 comments
Open
1 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 6, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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/5184319
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

Precondition: User is connected to QBD

  1. In a workspace connected to QBD, navigate to Accounting > Import
  2. Verify Import as tags appears for one or more coding configurations
  3. Navigate to More features > Tags and notice the toggle shows disabled
  4. Navigate to the LHN and notice that Tags menu item is absent

Expected Result:

If Import as Tags is selected under Accounting > Import, then More Features > Tags should show as Enabled (with lock icon) and Tags should show in the LHN.

image

Actual Result:

When Import as Tags is selected under Accounting > Import, More Features > Tags shows as Disabled (with lock icon) and Tags does not show in the LHN.

image

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
Bug6656392_1730885348349.Screen_Recording_2024-11-06_at_11.57.58_in_the_morning.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021856453961383871063
  • Upwork Job ID: 1856453961383871063
  • Last Price Increase: 2024-11-12
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 6, 2024
Copy link

melvin-bot bot commented Nov 6, 2024

Triggered auto assignment to @stephanieelliott (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.

@Shahidullah-Muffakir
Copy link
Contributor

Shahidullah-Muffakir commented Nov 7, 2024

Edited by proposal-police: This proposal was edited at 2024-11-20 20:18:43 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

The Tags feature is disabled and not active on the WorkspaceMoreFeaturesPage when a user has QuickBooks Online (QBO) connected.

What is the root cause of that problem?

I think this line is causing the issue:

isActive: policy?.areTagsEnabled ?? false,

What changes do you think we should make in order to solve the problem?

When user add a connection, we can set the areTagsEnabled to true for that policy.
here:

function connectPolicyToNetSuite(policyID: string, credentials: Omit<ConnectPolicyToNetSuiteParams, 'policyID'>) {

we can add:

    const successData: OnyxUpdate[] = [
        {
            onyxMethod: Onyx.METHOD.MERGE,
            key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
            value: {
                areTagsEnabled: true,
            },
        },
    ]

we will do the same for all connections.

Or
We can add this useEffect in the WorkspaceMoreFeaturesPage or at the WorkspaceInitialPage so user can see the tags without opening the More Features page, which would work for all connections.

 useEffect(()=>{
        if(hasAccountingConnection&& !policy?.areTagsEnabled){
            Tag.enablePolicyTags(policyID, false);
        }
    },[policy?.areTagsEnabled,policyID,hasAccountingConnection]);

What alternative solutions did you explore? (Optional)

we can change it to :
isActive: (policy?.areTagsEnabled || hasAccountingConnection) ?? false,

@melvin-bot melvin-bot bot added the Overdue label Nov 11, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

@stephanieelliott Eep! 4 days overdue now. Issues have feelings too...

@stephanieelliott
Copy link
Contributor

stephanieelliott commented Nov 12, 2024

Confirmed this seems buggy. Adding to #expense since QBD is a control plan feature

@melvin-bot melvin-bot bot removed the Overdue label Nov 12, 2024
@stephanieelliott stephanieelliott added External Added to denote the issue can be worked on by a contributor Overdue labels Nov 12, 2024
@melvin-bot melvin-bot bot changed the title QBD - Tags toggle is not enabled [$250] QBD - Tags toggle is not enabled Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021856453961383871063

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

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

@stephanieelliott stephanieelliott removed Help Wanted Apply this label when an issue is open to proposals by contributors Overdue labels Nov 12, 2024
@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Nov 14, 2024
@mananjadhav
Copy link
Collaborator

@stephanieelliott any reason this is a QBD specific bug? The reason I am asking is if Tags toggle should be enabled for the other connections?

@me-ZaidAli
Copy link

@mananjadhav are you guys still considering proposals for the issue?

@melvin-bot melvin-bot bot added the Overdue label Nov 19, 2024
@mananjadhav
Copy link
Collaborator

Yes open for proposals while I still have my outstanding question.

@melvin-bot melvin-bot bot removed the Overdue label Nov 19, 2024
@stephanieelliott
Copy link
Contributor

@stephanieelliott any reason this is a QBD specific bug? The reason I am asking is if Tags toggle should be enabled for the other connections?

No, I bet this got labeled QBD because it was one of the QBD regression tests. But in general - if Tags toggle is enabled, it should show in Workspace settings. If disabled, it should not. That goes for all integrations.

Copy link

melvin-bot bot commented Nov 20, 2024

@mananjadhav @stephanieelliott this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@mananjadhav
Copy link
Collaborator

Still waiting for better proposals. I don't think adding accounting integration check is the correct solution.

@Shahidullah-Muffakir
Copy link
Contributor

@mananjadhav, what are your thoughts on my updated proposal?

@mananjadhav
Copy link
Collaborator

Assigning an engineer here. I think this needs to be fixed on the backend.

🎀 👀 🎀 C+ reviewed.

@MariaHCD
Copy link
Contributor

@stephanieelliott to clarify my understanding - for a workspace that is connected to any accounting integration (whether that's QBD or QBO or any other), the tags feature will be disabled and locked in More features. And so, in the Accounting settings, the tags feature should also be disabled and locked. Is my understanding correct?

@mananjadhav could you outline why you think this requires backend changes?

@melvin-bot melvin-bot bot added the Overdue label Nov 25, 2024
@MariaHCD
Copy link
Contributor

Waiting on clarification on the above and then we can decide how to proceed here

@mananjadhav
Copy link
Collaborator

for a workspace that is connected to any accounting integration (whether that's QBD or QBO or any other), the tags feature will be disabled and locked in More features.

AFAIK it would depend on the accounting integration. For instance if Xero the tags are enabled then the More Features will show them enabled and locked.

could you outline why you think this requires backend changes?

The areTagsEnabled flag is supposed to be synced from Policy connection is populated from the backend. It could be backend or IS sync issue. May be I jumped too early but I feel this is something to be fixed from backend.

@melvin-bot melvin-bot bot removed the Overdue label Nov 25, 2024
Copy link

melvin-bot bot commented Nov 29, 2024

@mananjadhav, @MariaHCD, @stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Nov 29, 2024
@mananjadhav
Copy link
Collaborator

@MariaHCD did you get a chance to look at my comment?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 29, 2024
@MariaHCD
Copy link
Contributor

MariaHCD commented Dec 2, 2024

I’m still unclear on the expected behavior in this scenario and would appreciate some clarification.

For the basic case, my understanding is:

If the Tags toggle is enabled, it should appear in the Workspace settings. If disabled, it should not. This behavior applies to all integrations.

However, I’m uncertain about how this works when a policy is connected to an accounting integration. Specifically, does this mean that tags are automatically enabled? If so, should they be displayed as locked and enabled in the Workspace Settings page? Is there any integration-specific logic here? (I'm assuming not but wanted to check anyway)

cc: @stephanieelliott and @aldo-expensify (I understand you’ve worked on some of the backend logic related to enabling tags)

@melvin-bot melvin-bot bot removed the Overdue label Dec 2, 2024
@aldo-expensify
Copy link
Contributor

aldo-expensify commented Dec 2, 2024

cc: @stephanieelliott and @aldo-expensify (I understand you’ve worked on some of the backend logic related to enabling tags)

From testing manually with QBO (which I think should be the same), I see that Tags is enabled by default after connecting:

image

In QBO the defaults settings are set in the IS server here:

https://github.com/Expensify/Integration-Server/blob/9fbb26613c260101be30ef4c045c399dbb73cb25/src/expensify/quickbooksonline/QuickbooksOnlineImporter.java#L212-L213

I'm guessing that for QBD there should be something similar (should verify).

Then, in PHP, when we are storing the connection data for the first time we, enable tags here:

https://github.com/Expensify/Web-Expensify/blob/b096b163a1313f07454405c8f508512befcea951/lib/PolicyAPI.php#L3890-L3891

This piece in PHP is only doing it for XERO and QBO, should it do it for all connections? or should we just add QBD there?

@stephanieelliott
Copy link
Contributor

Sorry for the delay guys, I was out for Thanksgiving. I think we are snowballing on this issue though -- whether Tags are auto-enabled when you first connect is not really an issue, I think we can just assume that behavior is working as intended.

The Locked behavior is also not a factor here -- Tags will always show the lock icon whether enabled or disabled. This is just because you can't modify the toggle from the More Features tab, Tags must be enabled/disabled from the Accounting tab.

The actual bug is that even when Tags are enabled, Tags doesn’t appear in the LHN and the More Features > Tags setting shows as Disabled. This is a problem because it prevents users from viewing or modifying the Tags that were imported through the integration.

These images may help explain it a little better, but let me know if I can clarify this any further!

Current behavior:

Import as Tags is selected under Accounting > Import, but More Features > Tags shows as Disabled and Tags does not show in the LHN.

image

Expected behavior:

if Import as Tags is selected under Accounting > Import, then More Features > Tags should show as Enabled and Tags should show in the LHN.

image

Copy link

melvin-bot bot commented Dec 4, 2024

@mananjadhav @MariaHCD @stephanieelliott this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@mananjadhav
Copy link
Collaborator

Thanks @stephanieelliott. This comment makes sense. Will you be able to update the GH issue body? I think the important step is that the Workspace > Import > Any of the options have imported as tags, yet the More Features > Tag shows disabled with lock. This should've been shown as enabled with lock.

I'll investigate this but also open for proposals now.

@stephanieelliott
Copy link
Contributor

I think the important step is that the Workspace > Import > Any of the options have imported as tags, yet the More Features > Tag shows disabled with lock. This should've been shown as enabled with lock.

Yep, exactly @mananjadhav! I will update the issue body to make this more clear

@stephanieelliott stephanieelliott changed the title [$250] QBD - Tags toggle is not enabled [$250] QBD - Tags show as disabled despite selecting Import as Tags in workspace config Dec 5, 2024
@stephanieelliott
Copy link
Contributor

Just spot checked and it looks like this is still occurring. It is isolated to QBD though, not seeing it with other integrations.

@mananjadhav
Copy link
Collaborator

Yes because I checked Netsuite and Xero. It worked fine. I don't have QBD setup and I am setting it up.

@stephanieelliott Would it be possible for you to share the policy JSON from your local browser? To verify the data + conditions we have.

@melvin-bot melvin-bot bot added the Overdue label Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

@mananjadhav, @MariaHCD, @stephanieelliott Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mananjadhav
Copy link
Collaborator

Still waiting for proposals.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 10, 2024
@mananjadhav
Copy link
Collaborator

Still waiting for proposals.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 13, 2024
@MariaHCD
Copy link
Contributor

Not overdue - still awaiting proposals

@melvin-bot melvin-bot bot removed the Overdue label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

7 participants