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] Invoice - Category field does not show up on confirmation page after relogin #47922

Closed
6 tasks done
lanitochka17 opened this issue Aug 23, 2024 · 34 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 23, 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.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): [email protected]
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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6580334_1724419504479.20240823_212348.mp4

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
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 23, 2024
Copy link

melvin-bot bot commented Aug 23, 2024

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
Copy link
Author

@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
Copy link
Contributor

Nodebrute commented Aug 23, 2024

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

useEffect(() => {
const policyExpenseChat = participants?.find((participant) => participant.isPolicyExpenseChat);
if (policyExpenseChat?.policyID && policy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) {
openDraftWorkspaceRequest(policyExpenseChat.policyID);
}

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 melvin-bot bot added the Overdue label Aug 26, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

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

@JmillsExpensify
Copy link

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

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2024
@JmillsExpensify JmillsExpensify added Help Wanted Apply this label when an issue is open to proposals by contributors Overdue and removed Overdue labels Aug 28, 2024
@Nodebrute
Copy link
Contributor

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

@Nodebrute
Copy link
Contributor

@JmillsExpensify bump

@melvin-bot melvin-bot bot added the Overdue label Aug 30, 2024
@davidcardoza davidcardoza added Help Wanted Apply this label when an issue is open to proposals by contributors and removed Help Wanted Apply this label when an issue is open to proposals by contributors labels Sep 1, 2024
@davidcardoza
Copy link
Contributor

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

Copy link

melvin-bot bot commented Sep 2, 2024

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

@Nodebrute
Copy link
Contributor

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

@JmillsExpensify JmillsExpensify added the External Added to denote the issue can be worked on by a contributor label Sep 4, 2024
@melvin-bot melvin-bot bot changed the title Invoice - Category field does not show up on confirmation page after relogin [$250] Invoice - Category field does not show up on confirmation page after relogin Sep 4, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

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

Copy link

melvin-bot bot commented Sep 4, 2024

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

@rayane-djouah
Copy link
Contributor

Reviewing now 👀

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@rayane-djouah
Copy link
Contributor

@Nodebrute's proposal looks good to me.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Sep 11, 2024

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

Copy link

melvin-bot bot commented Sep 11, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 11, 2024
Copy link

melvin-bot bot commented Sep 11, 2024

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

Copy link

melvin-bot bot commented Sep 11, 2024

📣 @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
Copy link
Contributor

I'll raise a pr in few hours.

@Nodebrute Nodebrute mentioned this issue Sep 12, 2024
50 tasks
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 13, 2024
@rayane-djouah
Copy link
Contributor

PR on production

@rayane-djouah
Copy link
Contributor

Note

The production deploy automation failed: This should be on [HOLD for Payment 2024-10-07] according to #49855 production deploy checklist, confirmed in #49142 (comment)

cc @JmillsExpensify

@Expensify Expensify deleted a comment from melvin-bot bot Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Oct 4, 2024

^ False positive. #50246 (comment)

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Oct 6, 2024

BugZero Checklist

  • The PR that introduced the bug has been identified. Link to the PR: Implement Send Invoice flow from Global Create #40015
  • The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/40015/files#r1789251515
  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
  • Determine if we should create a regression test for this bug. Yes
  • If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

  1. Create two new workspaces.
  2. Log out and then log back in.
  3. Ensure you are online.
  4. Click on the FAB, select "Send Invoice," and proceed to the confirmation page.
  5. Click on "Send from" and select an other workspace.
  6. On the confirmation page, click "Show More."
  7. Verify that the category field is present.

Do we agree 👍 or 👎

cc @JmillsExpensify

@JmillsExpensify
Copy link

Payment summary:

@JmillsExpensify
Copy link

All Contributors paid via Upwork.

@rayane-djouah
Copy link
Contributor

@JmillsExpensify Can we close this issue?

@rayane-djouah
Copy link
Contributor

@stitesExpensify @JmillsExpensify I think we can close this issue

@JmillsExpensify
Copy link

Not yet, let me add the regression test request first and then I can close.

@JmillsExpensify
Copy link

All done.

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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

6 participants