[$250] iOS - QAB - "You no longer have access to your previous.." displayed when submit first expense via QAB
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.
- Open staging.new.expensify iOS mobile app
- Sign in as a new user with gmail account.
- Create a workspace.
- Tap FAB button, select quick action.
- Select any option to create an expense - manual, scan or distance.
- 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
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 Owner
Current Issue Owner: @alitoshmatov
Triggered auto assignment to @lakchote (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
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.
π¬ A slack conversation has been started in #expensify-open-source
: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:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
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
Job added to Upwork: https://www.upwork.com/jobs/~021863415108693824567
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (External)
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
@lakchote, @kadiealexander, @alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@alitoshmatov can you review the proposal here?
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).
@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
Current assignee @lakchote is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
@etCoderDysto's proposal LGTM.
π£ @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 π
Not overdue, @etCoderDysto's PR is in draft status.
Pr will be ready for review today!
@allroundexperts pr is ready for review. Sorry for the delay.
Reviewing label has been removed, please complete the "BugZero Checklist".
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)
@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]
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:
- Open the app on iOS mobile
- Sign in as a new user with gmail account.
- Create a workspace.
- Tap FAB button, select quick action.
- Select
Manualoption 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 π
Kadie is OOO so I'll jump in and handle the checklist and payment
Payment Summary
- C: @etCoderDysto $250 (to be paid via Upworks)
- C+: @allroundexperts $250 (to be paid via ND)
$250 approved for @allroundexperts