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

[HOLD for payment 2025-01-02] [$250] QAB- QAB navigates to last opened expense type rather than summited expense #53545

Closed
2 of 8 tasks
IuliiaHerets opened this issue Dec 4, 2024 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 4, 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: v9.0.71-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Navigate to https://staging.new.expensify.com
  2. Create WS
  3. Click FAB> Submit expense> Scan receipt and submit the expense
  4. Notice QAB displays Scan receipt option
  5. Click FAB > Submit expense
  6. Go to distance or manual expense option (do not submit any expense) and navigate back
  7. Notice QAB is still Scan receipt - Click QAB

Expected Result:

As scan receipt was the last expense type summited to WS, QAB should navigate to scan receipt option

Actual Result:

QAB navigates to the last navigated tab(in step 6) rater than submitted tab as QAB name on FAB

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6684131_1733307060392.Scan.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021864415280896735708
  • Upwork Job ID: 1864415280896735708
  • Last Price Increase: 2024-12-04
  • Automatic offers:
    • FitseTLT | Contributor | 105254767
Issue OwnerCurrent Issue Owner: @isabelastisser
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 4, 2024
Copy link

melvin-bot bot commented Dec 4, 2024

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

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Alex Your proposal will be dismissed because you did not follow the proposal template.

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 4, 2024

Edited by proposal-police: This proposal was edited at 2024-12-04 12:16:14 UTC.

Proposal

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

QAB- QAB navigates to last opened expense type rather than summited expense

What is the root cause of that problem?

We are not explicitly passing the request type here

case CONST.QUICK_ACTIONS.REQUEST_MANUAL:
case CONST.QUICK_ACTIONS.REQUEST_SCAN:
case CONST.QUICK_ACTIONS.REQUEST_DISTANCE:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, undefined, true), true);

so it will fallback to the last request type

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

We should explicitly pass the request type for startMoneyRequest

let requestType;
        if ([CONST.QUICK_ACTIONS.REQUEST_MANUAL, CONST.QUICK_ACTIONS.SPLIT_MANUAL,CONST.QUICK_ACTIONS.TRACK_MANUAL].includes(quickAction?.action)) requestType = CONST.IOU.REQUEST_TYPE.MANUAL;
        else if ([CONST.QUICK_ACTIONS.REQUEST_SCAN, CONST.QUICK_ACTIONS.SPLIT_SCAN, CONST.QUICK_ACTIONS.TRACK_SCAN].includes(quickAction?.action)) requestType = CONST.IOU.REQUEST_TYPE.SCAN;
        else if ([CONST.QUICK_ACTIONS.REQUEST_DISTANCE, CONST.QUICK_ACTIONS.SPLIT_DISTANCE, CONST.QUICK_ACTIONS.TRACK_DISTANCE].includes(quickAction?.action))
            requestType = CONST.IOU.REQUEST_TYPE.DISTANCE;

and pass requestType param for startMoneyRequest in all cases here

selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, undefined, true), true);
return;
case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
case CONST.QUICK_ACTIONS.SPLIT_SCAN:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, undefined, true), true);
return;
case CONST.QUICK_ACTIONS.SPLIT_DISTANCE:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, undefined, false), true);
return;
case CONST.QUICK_ACTIONS.SEND_MONEY:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.PAY, quickActionReportID, undefined, true), false);
return;
case CONST.QUICK_ACTIONS.ASSIGN_TASK:
selectOption(() => Task.startOutCreateTaskQuickAction(isValidReport ? quickActionReportID : '', quickAction.targetAccountID ?? -1), false);
break;
case CONST.QUICK_ACTIONS.TRACK_MANUAL:
case CONST.QUICK_ACTIONS.TRACK_SCAN:
case CONST.QUICK_ACTIONS.TRACK_DISTANCE:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, undefined, true), false);

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

We can render our FloatingActionButtonAndPopover populating the necessary data in onyx (including the quick action data) and providing the necessary mocks, then press (fireEvent.press) on the quick action menu item (by querying the menu item via giving test id or any other suitable way) and then we can mock our Navigation.navigate function and assert that it is called with the correct route parameter via toHaveBeenCalledWith(i.e. the correct requestType is included in the path).

What alternative solutions did you explore? (Optional)

@saifelance

This comment was marked as off-topic.

@isabelastisser isabelastisser added the External Added to denote the issue can be worked on by a contributor label Dec 4, 2024
@melvin-bot melvin-bot bot changed the title QAB- QAB navigates to last opened expense type rather than summited expense [$250] QAB- QAB navigates to last opened expense type rather than summited expense Dec 4, 2024
Copy link

melvin-bot bot commented Dec 4, 2024

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

@isabelastisser isabelastisser added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 4, 2024
Copy link

melvin-bot bot commented Dec 4, 2024

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

@saifelance
Copy link

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

Job invite?

@jayeshmangwani
Copy link
Contributor

Job invite?

This link is not a job invitation but rather a link to the job posted on Upwork.

@jayeshmangwani
Copy link
Contributor

@saifelance Please refrain from submitting irrelevant proposals, as your proposal is not related to this issue.

@jayeshmangwani
Copy link
Contributor

@FitseTLT's Proposal looks good to me. We could pass the requestType to the startMoneyRequest function to preserve the active tab.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 6, 2024

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

@MonilBhavsar
Copy link
Contributor

Looks good! Let's please add automated cases for various cases

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

melvin-bot bot commented Dec 9, 2024

📣 @FitseTLT 🎉 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 removed the Overdue label Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

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

@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 10, 2024
@jayeshmangwani
Copy link
Contributor

@FitseTLT What's the ETA for the PR?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 11, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 26, 2024
@melvin-bot melvin-bot bot changed the title [$250] QAB- QAB navigates to last opened expense type rather than summited expense [HOLD for payment 2025-01-02] [$250] QAB- QAB navigates to last opened expense type rather than summited expense Dec 26, 2024
Copy link

melvin-bot bot commented Dec 26, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 26, 2024
Copy link

melvin-bot bot commented Dec 26, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.78-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-01-02. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Dec 26, 2024

@jayeshmangwani @isabelastisser @jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Dec 31, 2024
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 2, 2025
@jayeshmangwani
Copy link
Contributor

@MonilBhavsar @isabelastisser both of these issues #53545 and #53866 are similar, and I think this checklist is enough for this issue too.

@melvin-bot melvin-bot bot added the Overdue label Jan 6, 2025
@isabelastisser
Copy link
Contributor

Based on the comment above, we can use the checklist from this issue for this bug.

@melvin-bot melvin-bot bot removed the Overdue label Jan 6, 2025
@isabelastisser
Copy link
Contributor

Payment summary:

@jayeshmangwani requires payment through NewDot Manual Requests $250 for C+ review PENDING
@FitseTLT requires payment automatic offer $250 for Contributor role. PAID in Upwork.

@isabelastisser
Copy link
Contributor

all set!

@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Jan 6, 2025
@garrettmknight
Copy link
Contributor

$250 approved for @jayeshmangwani

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production 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
Status: Done
Development

No branches or pull requests

7 participants