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

[Awaiting Payment][$500] [Wave 6: Categories] Category is not selected when refreshing category selection page and selecting it #30682

Closed
4 of 6 tasks
kbecciv opened this issue Nov 1, 2023 · 28 comments
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

@kbecciv
Copy link

kbecciv commented Nov 1, 2023

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: 1.3.94.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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com.
  2. Go to workspace chat > + > Request money > Manual.
  3. On the confirmation page, click Category.
  4. Refresh the page.
  5. Select a category.

Expected Result:

The category is selected.

Actual Result:

The category is not selected.

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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Bug6259295_1698838084578.20231101_095722.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d27ff5e9974105ea
  • Upwork Job ID: 1719688099307413504
  • Last Price Increase: 2023-11-08
  • Automatic offers:
    • dukenv0307 | Contributor | 27679337
Issue OwnerCurrent Issue Owner: @zanyrenney
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 1, 2023
@melvin-bot melvin-bot bot changed the title Category - Category is not selected when refreshing category selection page and selecting it [$500] Category - Category is not selected when refreshing category selection page and selecting it Nov 1, 2023
Copy link

melvin-bot bot commented Nov 1, 2023

Triggered auto assignment to @zanyrenney (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Nov 1, 2023

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

Copy link

melvin-bot bot commented Nov 1, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

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

melvin-bot bot commented Nov 1, 2023

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

@DrLoopFall
Copy link
Contributor

Proposal

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

Category is not selected after refreshing the category selection page

What is the root cause of that problem?

We are clearing the category when the request confirmation page is mounted, so when the category selection is refreshed and used goes back to the confirmation page, it is mounted as a new page, and the selected category is cleared.

IOU.resetMoneyRequestCategory();

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

Clearing the selected category only on navigation, instead of on mount would solve the issue.

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Nov 1, 2023

Proposal

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

Category is not selected when refreshing category selection page and selecting it

What is the root cause of that problem?

We are calling resetMoneyRequestCategory that is resetting the category to empty value.

useEffect(() => {
IOU.resetMoneyRequestCategory();
IOU.resetMoneyRequestTag();
}, []);

This was added in this PR - #27936
It mentions that category should be empty when participant doesn't contain workspace.

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

We shall add a check before calling resetMoneyRequestCategory() to check if the participant contains the workspace.
Or to be precise if participant is workspace (since we can't have other participant when workspace is selected)

This check and removal logic should be in MoneyRequestConfirmPage, reason being that the action of creating money request/split bill happens in this page.

What alternative solutions did you explore? (Optional)

@FitseTLT
Copy link
Contributor

FitseTLT commented Nov 1, 2023

Proposal

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

Category is not selected when refreshing category selection page

What is the root cause of that problem?

We are resetting category on mount on these lines of code

useEffect(() => {
IOU.resetMoneyRequestCategory();
IOU.resetMoneyRequestTag();
}, []);

So when the user refreshes while the page is on the Category selection page, the MoneyRequestConfirmPage is not rendered as the Category selection page is the one on top of the stack navigator state. Therefore, when the user selects a category the page navigates to MoneyRequestConfirmPage with the selected category set but the MoneyRequestConfirmPage is just only rendered now which means the resetting code above will run and reset the category.

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

We should take the resetting code from the useEffect here

const navigateToConfirmationStep = (moneyRequestType) => {
IOU.setMoneyRequestId(moneyRequestType);
Navigation.navigate(ROUTES.MONEY_REQUEST_CONFIRMATION.getRoute(moneyRequestType, reportID));
};

to the navigating function here

const navigateToConfirmationStep = (moneyRequestType) => {
        IOU.setMoneyRequestId(moneyRequestType);
        IOU.resetMoneyRequestCategory();
        IOU.resetMoneyRequestTag();
        Navigation.navigate(ROUTES.MONEY_REQUEST_CONFIRMATION.getRoute(moneyRequestType, reportID));
    };

What alternative solutions did you explore? (Optional)

@dukenv0307
Copy link
Contributor

Proposal

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

Category is not selected when refreshing category selection page and selecting it

What is the root cause of that problem?

When we refresh the category page, the confirm page is removed from the navigator stack and then after selecting category, we go back to the confirm page that is just mounted.

And then it is reset here.

useEffect(() => {
IOU.resetMoneyRequestCategory();
IOU.resetMoneyRequestTag();
}, []);

The same issue with tag selection

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

We should only reset tag and category when we navigate to confirm page from participant or amount page with the change of participant.

we should add the reset tag and category function here

if (_.isEmpty(iou.participants) || shouldReset) {

and here

const navigateToConfirmationStep = (moneyRequestType) => {

What alternative solutions did you explore? (Optional)

@ntdiary
Copy link
Contributor

ntdiary commented Nov 2, 2023

Hi, @zanyrenney, I have a full plate these this week, so please feel free to reassign this issue as needed. : )

@melvin-bot melvin-bot bot added the Overdue label Nov 4, 2023
@melvin-bot melvin-bot bot removed the Overdue label Nov 6, 2023
@zanyrenney zanyrenney added Overdue Help Wanted Apply this label when an issue is open to proposals by contributors External Added to denote the issue can be worked on by a contributor and removed Help Wanted Apply this label when an issue is open to proposals by contributors External Added to denote the issue can be worked on by a contributor labels Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

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

@melvin-bot melvin-bot bot removed the Overdue label Nov 6, 2023
@zanyrenney
Copy link
Contributor

readding the labels to get a new c+

@zanyrenney
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 15, 2023
Copy link

melvin-bot bot commented Nov 15, 2023

📣 @parasharrajat Please request via NewDot manual requests for the Reviewer role ($500)

Copy link

melvin-bot bot commented Nov 15, 2023

📣 @dukenv0307 🎉 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 📖

Copy link

melvin-bot bot commented Nov 15, 2023

@Gonals @parasharrajat @zanyrenney @dukenv0307 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!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 16, 2023
@dukenv0307
Copy link
Contributor

@parasharrajat The PR is ready for review.

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Dec 11, 2023
Copy link

melvin-bot bot commented Dec 11, 2023

This issue has not been updated in over 15 days. @Gonals, @parasharrajat, @zanyrenney, @dukenv0307 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Dec 11, 2023
@parasharrajat
Copy link
Member

Looks like this was missed. It should be ready for payment. @zanyrenney

@parasharrajat
Copy link
Member

@zanyrenney Bump.

@dukenv0307
Copy link
Contributor

@zanyrenney friendly bump on this, thank you!

@parasharrajat
Copy link
Member

@zanyrenney This one is a long-standing issue. Could you please check if payment was issued to @dukenv0307. Please post the payment summary and then we can close this issue. I will request it later.

@mallenexpensify mallenexpensify added Daily KSv2 and removed Reviewing Has a PR in review Monthly KSv2 labels Mar 7, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 7, 2024
@mallenexpensify mallenexpensify changed the title [$500] [Wave 6: Categories] Category is not selected when refreshing category selection page and selecting it [Awaiting Payment][$500] [Wave 6: Categories] Category is not selected when refreshing category selection page and selecting it Mar 7, 2024
@zanyrenney
Copy link
Contributor

Payment summary

@dukenv0307 - paid $500 via Upwork.
@parasharrajat to request $500 on NewDot.

Thanks for the patience here!

@melvin-bot melvin-bot bot removed the Overdue label Mar 8, 2024
@parasharrajat
Copy link
Member

Payment requested as per #30682 (comment)

@JmillsExpensify
Copy link

$500 approved for @parasharrajat

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
No open projects
Development

No branches or pull requests