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
3.98k stars 2.98k forks source link

[$250] Onboarding Task-"Connect to NetSuite" task gets auto-checked after a failed connection #55121

Open IuliiaHerets opened 2 weeks ago

IuliiaHerets commented 2 weeks ago

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: v9.0.84-0 Reproducible in staging?: Yes Reproducible in production?: Yes Email or phone of affected tester (no customers): htad26+dskfjksdhfjsd@gmail.com Issue reported by: Applause Internal Team Device used: Windows 10/Chrome, mWeb/Chrome App Component: Other

Action Performed:

  1. Login to staging with a new Gmail account
  2. Select the option "Manage my team's expenses" > Select any employee number
  3. When "Do you use any accounting software?" modal appears, select "NetSuite"
  4. Once you are logged in navigate to workspace settings > Select the workspace that is auto-created
  5. Navigate to Accounting > Connect to NetSuite > Upgrade > Go through the flow
  6. Enter incorrect credentials when prompted (Here notice that an error occurs and connection to NetSuite failed)
  7. Navigate to Concierge chat and click on the " Connect to NetSuite" task

Expected Result:

"Connect to NetSuite" task doesn't get auto-checked since the connection failed

Actual Result:

"Connect to NetSuite" task gets auto-checked even when the connection failed

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/b7cbd928-7d27-4dc4-be55-946e909863ff

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021879761932310860743
  • Upwork Job ID: 1879761932310860743
  • Last Price Increase: 2025-01-23
Issue OwnerCurrent Issue Owner: @rojiphil
melvin-bot[bot] commented 2 weeks ago

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

allgandalf commented 1 week ago

Most probably a BE bug

melvin-bot[bot] commented 1 week ago

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

VictoriaExpensify commented 1 week ago

Oh yes, we should fix this!

melvin-bot[bot] commented 1 week ago

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

melvin-bot[bot] commented 1 week ago

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

narefyev91 commented 4 days ago

Hi, I'm Nicolay from Callstack - expert contributor group - and I would like to work on this issue.

melvin-bot[bot] commented 4 days ago

@rojiphil, @VictoriaExpensify Eep! 4 days overdue now. Issues have feelings too...

flaviadefaria commented 4 days ago

NetSuite is not part of the Collect plan, which is the focus of #migrate, so removing this from the project board.

narefyev91 commented 3 days ago

Updates - was able to reproduce - investigating root case

melvin-bot[bot] commented 2 days ago

@rojiphil, @VictoriaExpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

narefyev91 commented 2 days ago

My findings so far: 1) we are calling 2 API's one by one - ConnectPolicyToNetSuite and after GetMissingOnyxMessages 2) In GetMissingOnyxMessages - we get 2 important Onyx updates for our case:

Image Image

And this lead to make task completed:

const isTaskCompleted = !isEmptyObject(taskReport)

? taskReport?.stateNum === CONST.REPORT.STATE_NUM.APPROVED && taskReport.statusNum === CONST.REPORT.STATUS_NUM.APPROVED : action?.childStateNum === CONST.REPORT.STATE_NUM.APPROVED && action?.childStatusNum === CONST.REPORT.STATUS_NUM.APPROVED;

Seems like - on the API side when connection is configured with error - it's not counting - and just return approved status (no matter if connection will have errors or not)

let me know @rojiphil wdyt - and probably we may need BE dev to check on API side

melvin-bot[bot] commented 2 days ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

VictoriaExpensify commented 1 day ago

@rojiphil can you please take a look at @narefyev91's finding above?

rojiphil commented 1 day ago

Looking into the findings now

rojiphil commented 1 day ago

Seems like - on the API side when connection is configured with error - it's not counting - and just return approved status (no matter if connection will have errors or not)

let me know @rojiphil wdyt - and probably we may need BE dev to check on API side

I agree. I think the concierge task Connect to NetSuite needs to be marked as complete only when the NetSuite authentication is completed successfully. Bringing in an internal engineer to weigh in 🎀👀🎀

melvin-bot[bot] commented 1 day ago

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

mjasikowski commented 1 day ago

Looking into this

melvin-bot[bot] commented 8 hours ago

@rojiphil @mjasikowski @VictoriaExpensify 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!