Skip to content

[HOLD for payment 2024-12-30] [$250] The QAB for Expenses - "Expensify US" reads "Scan receipt" but it opens to the Manual option for submitting instead. #53866

Closed

Description

@m-natarajan

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:
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @JmillsExpensify
Slack conversation (hyperlinked to channel name): migrate

Action Performed:

Prerequisite: User already submitted expense by scanning to a particular workspace

  1. Tap the Green fab
  2. Observe the QAB
  3. Tap the QAB

Expected Result:

Opens the scan receipt open

Actual Result:

QAB reads as "Scan receipt" but it opens to the Manual option for submitting instead.

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021867243059568508764
  • Upwork Job ID: 1867243059568508764
  • Last Price Increase: 2024-12-12
  • Automatic offers:
    • ChavdaSachin | Contributor | 105321040
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @alexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 10, 2024
  2. melvin-bot commented on Dec 10, 2024

    @melvin-bot

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

  3. MelvinBot commented on Dec 10, 2024

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  4. moved this to First Cohort - HIGH in [#whatsnext] #migrateon Dec 10, 2024
  5. ChavdaSachin commented on Dec 11, 2024

    @ChavdaSachin
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-12-11 05:15:48 UTC.

    Proposal

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

    What is the root cause of that problem?

    • Request-type state is passed as undefined to quick actions here, hence most recent request-type is used for the quick-action irrespective of actual request-type associated with the quick-action.
      switch (quickAction?.action) {
      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);
      return;
      case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
      case CONST.QUICK_ACTIONS.SPLIT_SCAN:
      case CONST.QUICK_ACTIONS.SPLIT_DISTANCE:
      selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, undefined, true), 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);
      break;
      default:
      }

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

    Pass appropriate request-type for each case here.

        switch (quickAction?.action) {
            case CONST.QUICK_ACTIONS.REQUEST_MANUAL:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, true), true);
                return;
            case CONST.QUICK_ACTIONS.REQUEST_SCAN:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.SCAN, true), true);
                return;
            case CONST.QUICK_ACTIONS.REQUEST_DISTANCE:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.DISTANCE, true), true);
                return;
            case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, true), true);
                return;
            case CONST.QUICK_ACTIONS.SPLIT_SCAN:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.SCAN, true), true);
                return;
            case CONST.QUICK_ACTIONS.SPLIT_DISTANCE:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.DISTANCE, true), 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:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, true), false);
                break;
            case CONST.QUICK_ACTIONS.TRACK_SCAN:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, CONST.IOU.REQUEST_TYPE.SCAN, true), false);
                break;
            case CONST.QUICK_ACTIONS.TRACK_DISTANCE:
                selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK, quickActionReportID, CONST.IOU.REQUEST_TYPE.DISTANCE, true), false);
                break;
            default:
        }
    

    switch (quickAction?.action) {
    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);
    return;
    case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
    case CONST.QUICK_ACTIONS.SPLIT_SCAN:
    case CONST.QUICK_ACTIONS.SPLIT_DISTANCE:
    selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, undefined, true), 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);
    break;
    default:
    }

    Result

    Screen.Recording.2024-12-11.at.10.53.49.AM.mp4
    ### What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future? This component would update rarely, and there is not much complicated going on here so no need for automated test.

    What alternative solutions did you explore? (Optional)

    Alternative way to handle the same case.

            let requestType;
            switch(quickAction?.action) {
                case CONST.QUICK_ACTIONS.REQUEST_MANUAL: 
                case CONST.QUICK_ACTIONS.SPLIT_MANUAL: 
                case CONST.QUICK_ACTIONS.TRACK_MANUAL: 
                    requestType = CONST.IOU.REQUEST_TYPE.MANUAL;
                    break;
                case CONST.QUICK_ACTIONS.REQUEST_SCAN: 
                case CONST.QUICK_ACTIONS.SPLIT_SCAN: 
                case CONST.QUICK_ACTIONS.TRACK_SCAN: 
                    requestType = CONST.IOU.REQUEST_TYPE.SCAN;
                    break;
                case CONST.QUICK_ACTIONS.REQUEST_DISTANCE: 
                case CONST.QUICK_ACTIONS.SPLIT_DISTANCE: 
                case CONST.QUICK_ACTIONS.TRACK_DISTANCE: 
                    requestType = CONST.IOU.REQUEST_TYPE.DISTANCE;
                    break;
                default:
                    requestType = undefined;
            }
            switch (quickAction?.action) {
                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, requestType, true), true);
                    return;
                case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
                case CONST.QUICK_ACTIONS.SPLIT_SCAN:
                case CONST.QUICK_ACTIONS.SPLIT_DISTANCE:
                    selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, requestType, true), 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, requestType, true), false);
                    break;
                default:
            }
    

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  6. ChavdaSachin commented on Dec 11, 2024

    @ChavdaSachin
    Contributor

    For reproduction steps

    1. submit a scan expense to a workspace.
    2. open FAB and verify the quick action says - scan receipt .
    3. click create expense.
    4. switch tab to manual or distance.
    5. press back button.
    6. click FAB.
    7. click quick action.
    8. verify request-type is same as selected in step 4 instead of scan.
    Screen.Recording.2024-12-11.at.10.50.48.AM.mp4
  7. ChavdaSachin commented on Dec 11, 2024

    @ChavdaSachin
    Contributor

    Updated Proposal
    Added alternate pseudo code and added result.

  8. allroundexperts commented on Dec 12, 2024

    @allroundexperts
    Contributor

    I can reproduce this using @ChavdaSachin's steps here.

    Screen.Recording.2024-12-12.at.6.14.23.PM.mov
  9. allroundexperts commented on Dec 12, 2024

    @allroundexperts
    Contributor

    @alexpensify Please assign this to me for C+.

  10. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 12, 2024
  11. 14 remaining items

  12. ChavdaSachin commented on Dec 13, 2024

    @ChavdaSachin
    Contributor

    @allroundexperts PR is Ready for review.

  13. alexpensify commented on Dec 15, 2024

    @alexpensify
    Contributor

    Heads up, I will be offline until Wednesday, December 18, 2024, and will not actively watch over this GitHub during that period.

    If this GitHub requires an urgent update, please ask for help in the #expensify-open-source Slack Room. If the inquiry can wait, I'll review it when I return online.

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Dec 23, 2024
  15. changed the title [-][$250] The QAB for Expenses - "Expensify US" reads "Scan receipt" but it opens to the Manual option for submitting instead.[/-] [+][HOLD for payment 2024-12-30] [$250] The QAB for Expenses - "Expensify US" reads "Scan receipt" but it opens to the Manual option for submitting instead.[/+] on Dec 23, 2024
  16. melvin-bot commented on Dec 23, 2024

    @melvin-bot

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

  17. melvin-bot commented on Dec 23, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.77-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 2024-12-30. 🎊

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

  18. melvin-bot commented on Dec 23, 2024

    @melvin-bot

    @allroundexperts @alexpensify @allroundexperts 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]

  19. allroundexperts commented on Dec 25, 2024

    @allroundexperts
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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/51057/files#r1897461065

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    N/A

    Test:

    1. Submit a scan expense to a workspace.
    2. Click create expense.
    3. Switch tab to manual or distance.
    4. Press back button.
    5. Click FAB.
    6. Click quick action.

    Verify that the request-type tab is on scan.

    Do we agree 👍 or 👎

  20. alexpensify commented on Dec 30, 2024

    @alexpensify
    Contributor

    Payment due date: 2024-12-30

    Contributor: @ChavdaSachin paid $250 via Upwork -- all set, I paid a day early
    Contributor+: @allroundexperts $250 via NewDot


    @allroundexperts, please submit a payment request in Chat. Since I'm out of the office until January 3, I'll close and work on the QA step when I'm back online.

  21. moved this from First Cohort - HIGH to Done in [#whatsnext] #migrateon Dec 30, 2024
  22. JmillsExpensify commented on Jun 10, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @allroundexperts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorNeeds ReproductionReproducible steps neededWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions