App icon indicating copy to clipboard operation
App copied to clipboard

[$250] iOS - QAB - "You no longer have access to your previous.." displayed when submit first expense via QAB

Open IuliiaHerets opened this issue 1 year ago β€’ 11 comments

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.68-2 Reproducible in staging?: Y Reproducible in production?: N If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: 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/5276423 Issue reported by: Applause Internal Team

Action Performed:

Preconditions: new account was created and verified in Web ND.

  1. Open staging.new.expensify iOS mobile app
  2. Sign in as a new user with gmail account.
  3. Create a workspace.
  4. Tap FAB button, select quick action.
  5. Select any option to create an expense - manual, scan or distance.
  6. For manual expense - enter the amount and tap Next.

Expected Result:

Expense details page should open with "To" section prefilled with the created workspace.

Actual Result:

"Choose recipient" page opens with the message "You no longer have access to your previous quick action destination. Pick a new one below" when creating first expense via QAB.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

https://github.com/user-attachments/assets/d803c1a2-605e-4b9b-9435-4aa20cfe5998

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021863415108693824567
  • Upwork Job ID: 1863415108693824567
  • Last Price Increase: 2024-12-02
Issue OwnerCurrent Issue Owner: @alitoshmatov

IuliiaHerets avatar Nov 29 '24 10:11 IuliiaHerets

Triggered auto assignment to @lakchote (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] avatar Nov 29 '24 10:11 melvin-bot[bot]

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

melvin-bot[bot] avatar Nov 29 '24 10:11 melvin-bot[bot]

πŸ’¬ A slack conversation has been started in #expensify-open-source

melvin-bot[bot] avatar Nov 29 '24 10:11 melvin-bot[bot]

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

github-actions[bot] avatar Nov 29 '24 10:11 github-actions[bot]

demoting, this is a minor issue and the user can use the app just fine.

Seems like we are setting the optimistic chat reportID incorrectly in this case

mountiny avatar Nov 29 '24 10:11 mountiny

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

melvin-bot[bot] avatar Dec 02 '24 02:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 02 '24 02:12 melvin-bot[bot]

Edited by proposal-police: This proposal was edited at 2024-12-02 13:59:44 UTC.

Proposal

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

"You no longer have access to your previous.." displayed when submit first expense via QAB

What is the root cause of that problem?

isValidReport is false when there is no existing quick action report in onyx. https://github.com/Expensify/App/blob/3a8c2bae025255a9a782e2b7030a6ecb32a83f69/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx#L182

Then we generate random reportID if isValidReport is false here even though we can navigate to (policyChatForActivePolicy.reportID). https://github.com/Expensify/App/blob/3a8c2bae025255a9a782e2b7030a6ecb32a83f69/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx#L476-L477

Then report becomes undefined here since we are trying to get a report that is not existent yet https://github.com/Expensify/App/blob/3a8c2bae025255a9a782e2b7030a6ecb32a83f69/src/pages/iou/request/step/IOURequestStepAmount.tsx#L172 And user will be navigated to participant selection page https://github.com/Expensify/App/blob/3a8c2bae025255a9a782e2b7030a6ecb32a83f69/src/pages/iou/request/step/IOURequestStepAmount.tsx#L258

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

Here we should assign policyChatForActivePolicy.reportID to quickActionReportID if policyChatForActivePolicy is not empty object

const quickActionReportID = isValidReport || !isEmptyObject(policyChatForActivePolicy) ? policyChatForActivePolicy?.reportID ?? '-1' : ReportUtils.generateReportID();

What alternative solutions did you explore? (Optional)

Or we can assign policyChatForActivePolicy?.reportID to quickActionReportID since we are already checking for isEmptyObject(policyChatForActivePolicy) below https://github.com/Expensify/App/blob/3a8c2bae025255a9a782e2b7030a6ecb32a83f69/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx#L466-L470

const quickActionReportID = policyChatForActivePolicy?.reportID ?? ReportUtils.generateReportID();
IOU.startMoneyRequest(CONST.IOU.TYPE.SUBMIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.SCAN, true);

We can pass only quickActionReportID instead of quickActionReportID ?? '-1' to startMoneyRequest

etCoderDysto avatar Dec 02 '24 13:12 etCoderDysto

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

melvin-bot[bot] avatar Dec 05 '24 09:12 melvin-bot[bot]

@alitoshmatov can you review the proposal here?

lakchote avatar Dec 06 '24 05:12 lakchote

Assigning @allroundexperts since it's been 4 days without any review, to make this issue move forward (see https://expensify.slack.com/archives/C02NK2DQWUX/p1733492002892529).

lakchote avatar Dec 06 '24 13:12 lakchote

@etCoderDysto's proposal looks good to me. It has the correct RCA, and applying the fix works as well.

https://github.com/user-attachments/assets/76841f22-3aed-4cdc-82be-d0ecef6d4a98

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

allroundexperts avatar Dec 06 '24 15:12 allroundexperts

Current assignee @lakchote is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

melvin-bot[bot] avatar Dec 06 '24 15:12 melvin-bot[bot]

@etCoderDysto's proposal LGTM.

lakchote avatar Dec 06 '24 17:12 lakchote

πŸ“£ @etCoderDysto πŸŽ‰ 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[bot] avatar Dec 06 '24 17:12 melvin-bot[bot]

Not overdue, @etCoderDysto's PR is in draft status.

lakchote avatar Dec 09 '24 14:12 lakchote

Pr will be ready for review today!

etCoderDysto avatar Dec 09 '24 14:12 etCoderDysto

@allroundexperts pr is ready for review. Sorry for the delay.

etCoderDysto avatar Dec 12 '24 13:12 etCoderDysto

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

melvin-bot[bot] avatar Dec 23 '24 21:12 melvin-bot[bot]

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

  • https://github.com/Expensify/App/pull/53746

If no regressions arise, payment will be issued on 2024-12-30. :confetti_ball:

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

  • @allroundexperts requires payment through NewDot Manual Requests
  • @etCoderDysto requires payment automatic offer (Contributor)

melvin-bot[bot] avatar Dec 23 '24 21:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 23 '24 21:12 melvin-bot[bot]

BugZero Checklist:

  • [x] [Contributor] Classify the bug:
Bug classification

Source of bug:

  • [ ] 1a. Result of the original design (eg. a case wasn't considered)
  • [x] 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)
  • [x] 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
  • [x] 3d. QA
  • [ ] 3z. Other:
  • [x] [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/51836/files#r1897456548

  • [x] [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

  • [x] [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. Open the app on iOS mobile
  2. Sign in as a new user with gmail account.
  3. Create a workspace.
  4. Tap FAB button, select quick action.
  5. Select Manual option and enter the amount and proceed to next step.

Verify that the expense details page should open with "To" section pre-filled with the created workspace.

Do we agree πŸ‘ or πŸ‘Ž

allroundexperts avatar Dec 25 '24 19:12 allroundexperts

Kadie is OOO so I'll jump in and handle the checklist and payment

jliexpensify avatar Dec 30 '24 02:12 jliexpensify

Payment Summary

  • C: @etCoderDysto $250 (to be paid via Upworks)
  • C+: @allroundexperts $250 (to be paid via ND)

Upwork job

jliexpensify avatar Dec 30 '24 02:12 jliexpensify

Paid and job closed.

@allroundexperts - checklist here

jliexpensify avatar Dec 30 '24 10:12 jliexpensify

$250 approved for @allroundexperts

JmillsExpensify avatar Jun 10 '25 09:06 JmillsExpensify