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.34k stars 2.77k forks source link

[$250] Invoice - Category field does not show up on confirmation page after relogin #47922

Open lanitochka17 opened 3 weeks ago

lanitochka17 commented 3 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: 9.0.24-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4888644 Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create two new workspaces
  3. Log out and log in
  4. Go to FAB > Send invoice > Proceed to confirmation page
  5. Click Show more
  6. Note that Category field is present
  7. Click Send from and select the second workspace
  8. Click Show more and note that Category field is absent
  9. Go to workspace settings of the second workspace in Step 8 > Categories
  10. Repeat Step 4 to 5 with the second workspace in Step 8
  11. Note that Category field is present after visiting Categories settings page

Expected Result:

In Step 8, after relogin, the Category field should be present on the confirmation page when the sender is the second workspace

Actual Result:

In Step 8, after relogin, the Category field is absent on the confirmation page when the sender is the second workspace. In Step 11, the Category field only reappears after Categories settings page is visited

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/7ac7430e-32ac-47ef-bb1a-81755bb5ab92

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021831332316106024173
  • Upwork Job ID: 1831332316106024173
  • Last Price Increase: 2024-09-11
  • Automatic offers:
    • rayane-djouah | Reviewer | 103920522
    • Nodebrute | Contributor | 103920525
Issue OwnerCurrent Issue Owner: @rayane-djouah
melvin-bot[bot] commented 3 weeks ago

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

lanitochka17 commented 3 weeks ago

@JmillsExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

Nodebrute commented 3 weeks ago

Edited by proposal-police: This proposal was edited at 2024-08-23 15:37:45 UTC.

Proposal

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

Category field does not show up on confirmation page after relogin

What is the root cause of that problem?

When we log in using the openApp API call, we only receive the categories, tags, and other details for the first policy. As a result, if we select any other policy, the data is not present in Onyx, which causes the category field to be missing. However, when submitting an expense within a policy, we call openDraftWorkspaceRequest, which retrieves all data related to that policy. This behavior does not apply when sending invoices. This condition is not true for invoice types policyExpenseChat?.policyID https://github.com/Expensify/App/blob/eb5f55bb5d9e4a668168c428e1555353792ddcaa/src/pages/iou/request/step/IOURequestStepConfirmation.tsx#L162-L166

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

For invoice-type transactions, we should also call this API to retrieve the necessary data. We can obtain the policy ID using various methods.

In case of invoices we can use the check isSender and get the policyID from that participant and then we can call openDraftWorkspaceRequest.

What alternative solutions did you explore? (Optional)

  1. We can also get the policyID from policy?.id or
  2. In the transaction participants data for invoice, we should also include the isPolicyExpenseChat field.
melvin-bot[bot] commented 3 weeks ago

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

JmillsExpensify commented 3 weeks ago

I'll open it up to proposals and I've filled this bug in the invoicing initiative. cc @davidcardoza

Nodebrute commented 3 weeks ago

@JmillsExpensify No C+ is assigned. Can you add the labels again?

Nodebrute commented 2 weeks ago

@JmillsExpensify bump

davidcardoza commented 2 weeks ago

@JmillsExpensify Should the help wanted label addition assigned a C+?

melvin-bot[bot] commented 2 weeks ago

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

Nodebrute commented 2 weeks ago

@davidcardoza @JmillsExpensify the 'Help Wanted' label is not automatically assigning C+. No C+ is assigned here.

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

JmillsExpensify commented 2 weeks ago

That should do it.

melvin-bot[bot] commented 1 week ago

@JmillsExpensify @rayane-djouah 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!

rayane-djouah commented 1 week ago

I will review this over the weekend or on Monday

melvin-bot[bot] commented 1 week ago

@JmillsExpensify, @rayane-djouah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

rayane-djouah commented 1 week ago

Reviewing now πŸ‘€

rayane-djouah commented 1 week ago

@Nodebrute's proposal looks good to me.

:ribbon::eyes::ribbon: C+ reviewed

melvin-bot[bot] commented 1 week ago

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

melvin-bot[bot] commented 1 week ago

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] commented 1 week ago

πŸ“£ @rayane-djouah πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 1 week ago

πŸ“£ @Nodebrute πŸŽ‰ 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 πŸ“–

Nodebrute commented 1 week ago

I'll raise a pr in few hours.