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] Show the connected QBO file a workspace is connected to #55921

Open
8 tasks done
MitchExpensify opened this issue Jan 29, 2025 · 24 comments
Open
8 tasks done

[$250] Show the connected QBO file a workspace is connected to #55921

MitchExpensify opened this issue Jan 29, 2025 · 24 comments
Assignees
Labels
Design External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2

Comments

@MitchExpensify
Copy link
Contributor

MitchExpensify commented Jan 29, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Expensify/Expensify Issue URL: NA
Issue reported by: @MitchExpensify
Slack conversation (hyperlinked to channel name): https://expensify.slack.com/archives/C03U7DCU4/p1738102051348139

Action Performed:

  1. Connect to QBO via the Accounting tab in a workspace

Expected Result:

See which QBO file the workspace is connected to in the Accounting tab

Actual Result:

The QBO file the workspace is connected to does not show

Workaround:

Verify via familiarity of the categories import or perhaps via the export options (e.g. Recognizing the credit card account listed as an export option

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

NewDot example:

Image

OldDot example:

Image

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021884537133550887822
  • Upwork Job ID: 1884537133550887822
  • Last Price Increase: 2025-01-29
  • Automatic offers:
    • truph01 | Contributor | 105913513
Issue OwnerCurrent Issue Owner: @parasharrajat
@MitchExpensify MitchExpensify added Daily KSv2 Design NewFeature Something to build that is a new item. labels Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

Triggered auto assignment to @twisterdotcom (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Jan 29, 2025

Triggered auto assignment to @dubielzyk-expensify (Design), see these Stack Overflow questions for more details.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

Copy link

melvin-bot bot commented Jan 29, 2025

Triggered auto assignment to Design team member for new feature review - @dubielzyk-expensify (NewFeature)

@MitchExpensify
Copy link
Contributor Author

We'll need to decide how this looks before labelling external 😎

@twisterdotcom
Copy link
Contributor

Let's mirror the Xero look as @shawnborton noted:

Image

So:

Image

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Jan 29, 2025
@melvin-bot melvin-bot bot changed the title Show the connected QBO file a workspace is connected to [$250] Show the connected QBO file a workspace is connected to Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 29, 2025
@truph01
Copy link
Contributor

truph01 commented Jan 29, 2025

Proposal

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

  • The QBO file the workspace is connected to does not show

What is the root cause of that problem?

  • New feature.

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

we can add:

            case CONST.POLICY.CONNECTIONS.NAME.QBO:
                return !policy?.connections?.quickbooksOnline?.config?.companyName
                    ? {}
                    : {
                          description: 'Connected to',
                          iconRight: Expensicons.ArrowRight,
                          title: policy?.connections?.quickbooksOnline?.config?.companyName,
                          wrapperStyle: [styles.sectionMenuItemTopDescription],
                          titleStyle: styles.fontWeightNormal,
                          shouldShowRightIcon: tenants.length > 1,
                          shouldShowDescriptionOnTop: true,
  
                      };

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

  • NA

What alternative solutions did you explore? (Optional)

@neonbhai
Copy link
Contributor

neonbhai commented Jan 29, 2025

Proposal

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

Show the connected QBO file a workspace is connected to

What is the root cause of that problem?

New Feature

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

We will add qbo connection for the array here
We will use policy?.connections?.quickbooksOnline?.config?.credentials?.companyName for the qbo organization name

We will use code similar to this:

case CONST.POLICY.CONNECTIONS.NAME.QBO:
    return !policy?.connections?.quickbooksOnline?.config?.credentials?.companyName
        ? {}
        : {
              description: translate('workspace.qbo.connectedTo'),
              iconRight: Expensicons.ArrowRight,
              title: policy?.connections?.quickbooksOnline?.config?.credentials?.companyName,
              wrapperStyle: [styles.sectionMenuItemTopDescription],
              titleStyle: styles.fontWeightNormal,
              shouldShowRightIcon: false,
              shouldShowDescriptionOnTop: true,
              pendingAction: policy?.connections?.quickbooksOnline?.config?.pendingFields?.companyName,
              brickRoadIndicator: policy?.connections?.quickbooksOnline?.config?.errorFields?.companyName ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined,
          };

No right icon always, no onPress. Since QBO only supports a single tenant organization, we will not need a qbo tenant selection page.

Copy link
Contributor

⚠️ @neonbhai Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

@parasharrajat
Copy link
Member

parasharrajat commented Jan 29, 2025

@truph01's proposal looks good to me

I believe we can look at the data during implementation to determine which key to use.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 29, 2025

Triggered auto assignment to @marcochavezf, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@parasharrajat
Copy link
Member

@neonbhai Did you check whether we set that errorfields. companyName pendingAction for QBO connection? Can you please link me that code?

@neonbhai
Copy link
Contributor

@parasharrajat hi, frontend code does not set errorField for the companyName, so we don't have code for it. The errorFields?.companyName key might potentially be set by the backend.

looking at the code again, The companyName is part of the credentials object, which is a key on the config object here.

type QBOCredentials = {
/**
* The company ID that's connected from QBO.
*/
companyID: string;
/**
* The company name that's connected from QBO.
*/
companyName: string;
/**
* The current scope of QBO connection.
*/
scope: string;
};

/** Credentials of the current QBO connection */
credentials: QBOCredentials;

Since we do set errorFields on the qbo config object keys here. I'll suggest using errorFields?.credentials makes more sense, as this is key that might be set by the backend.

errorFields: {
[settingName]: null,
},

@truph01
Copy link
Contributor

truph01 commented Jan 29, 2025

@parasharrajat I don't think we need to include pendingAction and brickRoadIndicator in the new component we added. The 'Connected to ...' text is just additional information about the current connection, and we're already displaying the error here:

errorText: synchronizationError,

There are two other reasons why showing the pending field and error for it is unnecessary:

  1. CompanyName is an uneditable prop.
  2. integrationSpecificMenuItem will be hidden if there is an error:

...(isEmptyObject(integrationSpecificMenuItems) || shouldShowSynchronizationError || isEmptyObject(policy?.connections) ? [] : [integrationSpecificMenuItems]),

that means if there is an error, the "Connected to ..." text is also hidden.
cc @marcochavezf @dubielzyk-expensify

@neonbhai
Copy link
Contributor

errorField for integrationSpecificMenuItem will be set by the BE, incase the error is not synchronization related. This is why the other items in the array have the props.

@parasharrajat
Copy link
Member

Let me take a look at this. Thanks both.

@parasharrajat
Copy link
Member

I see. Good catch @truph01.

@parasharrajat
Copy link
Member

Updated my decision. Thanks for the clarification. I was thinking that we show offline pattern on on all menu items when connection is deleted while offline but it seems that is not the case.

@marcochavezf
Copy link
Contributor

Thanks for the review @parasharrajat! Assigning @truph01 🚀

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

📣 @truph01 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 30, 2025
@truph01
Copy link
Contributor

truph01 commented Jan 30, 2025

@parasharrajat PR is ready.

@parasharrajat
Copy link
Member

PR is waiting on Lint warnings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants