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

[$250] Track expense - App is stuck on confirmation page when submitting track expense #53306

Open
8 tasks done
IuliiaHerets opened this issue Nov 29, 2024 · 24 comments
Open
8 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 29, 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: 9.0.68-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • Account has only one workspace.
  1. Go to staging.new.expensify.com
  2. Go to self DM.
  3. Track a manual expense.
  4. Click Categorize it.
  5. Select a category, enter merchant and submit the expense to the workspace.
  6. Delete the workspace.
  7. Open FAB.
  8. Click Track expense under Quick action.
  9. Enter amount > Next.
  10. Select a user.
  11. Click Submit on the confirmation page.
  12. Might need to repeat Step 7 to 11 if user can submit the track expense (it will show error in the report if the submit is successful).

Expected Result:

In Step 9. after entering amount, app should proceed to confirmation page to submit the track expense to self DM because we cannot directly submit track expense to other user.

Actual Result:

In Step 9. after entering amount, user can select other recipient to submit the track expense.
As a result, app is stuck on the confirmation page when trying to submit track expense directly to other user.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6679635_1732844020557.20241129_092659.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021863595844310832183
  • Upwork Job ID: 1863595844310832183
  • Last Price Increase: 2024-12-16
  • Automatic offers:
    • FitseTLT | Contributor | 105374583
Issue OwnerCurrent Issue Owner: @eVoloshchak
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 29, 2024
Copy link

melvin-bot bot commented Nov 29, 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.

@melvin-bot melvin-bot bot added the Overdue label Dec 2, 2024
@isabelastisser isabelastisser added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Dec 2, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

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

@melvin-bot melvin-bot bot changed the title Track expense - App is stuck on confirmation page when submitting track expense [$250] Track expense - App is stuck on confirmation page when submitting track expense Dec 2, 2024
Copy link

melvin-bot bot commented Dec 2, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Dec 2, 2024
@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 3, 2024
@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 3, 2024

Edited by proposal-police: This proposal was edited at 2024-12-03 23:15:45 UTC.

Proposal

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

Track expense - App is stuck on confirmation page when submitting track expense

What is the root cause of that problem?

When categorizing (or even sharing) we are setting the quick action to track and the chatReportID to the chat report target we are submitting to here

App/src/libs/actions/IOU.ts

Lines 1381 to 1386 in 6482913

onyxMethod: Onyx.METHOD.SET,
key: ONYXKEYS.NVP_QUICK_ACTION_GLOBAL_CREATE,
value: {
action: newQuickAction,
chatReportID: chatReport.reportID,
isFirstQuickAction: isEmptyObject(quickAction),

this function is used for tracking expense case on that case it has no problem because the chatReport is the selfDM so our quick action will navigate to track flow with report id as the self dm but the problem is we use it for categorizing flow and in that case the chat report is the policyExpense chat so we are setting the quick action to track with quickActionReportID as the workspace chat.

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

We have two options to solve it

  1. On categorizing/sharing case we can set the quick action to request type instead of track type so that now the quick action will be request for the expense chat

    App/src/libs/actions/IOU.ts

    Lines 1359 to 1364 in 6482913

    let newQuickAction: ValueOf<typeof CONST.QUICK_ACTIONS> = CONST.QUICK_ACTIONS.TRACK_MANUAL;
    if (isScanRequest) {
    newQuickAction = CONST.QUICK_ACTIONS.TRACK_SCAN;
    } else if (isDistanceRequest) {
    newQuickAction = CONST.QUICK_ACTIONS.TRACK_DISTANCE;
    }
 const isSelfDM = ReportUtils.isSelfDM(chatReport);
    let newQuickAction: ValueOf<typeof CONST.QUICK_ACTIONS> = isSelfDM ? CONST.QUICK_ACTIONS.TRACK_MANUAL : CONST.QUICK_ACTIONS.REQUEST_MANUAL;
    if (isScanRequest) {
        newQuickAction = isSelfDM ? CONST.QUICK_ACTIONS.TRACK_SCAN : CONST.QUICK_ACTIONS.REQUEST_SCAN;
    } else if (isDistanceRequest) {
        newQuickAction = isSelfDM ? CONST.QUICK_ACTIONS.TRACK_DISTANCE : CONST.QUICK_ACTIONS.REQUEST_DISTANCE;
    }
  1. Otherwise, if we want to set it to track quick action on categorizing/sharing we should set the quickActionReportID here to be always the selfDM
    chatReportID: chatReport.reportID,
                    chatReportID: ReportUtils.findSelfDMReportID() ?? chatReport.reportID,

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

We can prepare a test for IOU.trackExpense by simulating categorizing/sharing (by passing a different chat report than the selfDM) and assert that quickAction is properly set (both the action and chatReportID) according to the solution option we follow above.

What alternative solutions did you explore? (Optional)

@isabelastisser
Copy link
Contributor

@eVoloshchak, please review the updated proposal above? Thanks!

@melvin-bot melvin-bot bot added the Overdue label Dec 5, 2024
Copy link

melvin-bot bot commented Dec 6, 2024

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

@isabelastisser
Copy link
Contributor

@eVoloshchak, please provide an update. Thanks!

@isabelastisser
Copy link
Contributor

@eVoloshchak, I DM'd you for visibility. Thanks!

Copy link

melvin-bot bot commented Dec 9, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Dec 10, 2024

@eVoloshchak, @isabelastisser 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@eVoloshchak
Copy link
Contributor

@FitseTLT's proposal looks good to me!
The second option seems to be more universal, let's proceed with that

🎀👀🎀 C+ reviewed!

Copy link

melvin-bot bot commented Dec 10, 2024

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

@FitseTLT
Copy link
Contributor

@jasperhuangg please suggest the option we should follow here. IMO option 1 is correct (categorize/share are more or less the same as creating expense than tracking expense) and @eVoloshchak chose 2. let's know your thoughts.

Copy link

melvin-bot bot commented Dec 13, 2024

@eVoloshchak @isabelastisser @jasperhuangg 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 the Overdue label Dec 13, 2024
@isabelastisser
Copy link
Contributor

Hey @jasperhuangg, can you please share an update? Thanks!

Copy link

melvin-bot bot commented Dec 16, 2024

@eVoloshchak, @isabelastisser, @jasperhuangg Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Dec 16, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@jasperhuangg
Copy link
Contributor

Yeah, I agree that the first option is more intuitive to me. Categories are only available when you request money from a workspace, so categorizing an expense is the same as requesting money on that workspace. Let's move forward with your first approach. @FitseTLT Thanks for asking!

@FitseTLT
Copy link
Contributor

Yeah, I agree that the first option is more intuitive to me. Categories are only available when you request money from a workspace, so categorizing an expense is the same as requesting money on that workspace. Let's move forward with your first approach. @FitseTLT Thanks for asking!

Ok don't forget to assign me 👍

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

melvin-bot bot commented Dec 17, 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 📖

Copy link

melvin-bot bot commented Jan 13, 2025

This issue has not been updated in over 15 days. @eVoloshchak, @isabelastisser, @jasperhuangg, @FitseTLT 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!

@FitseTLT
Copy link
Contributor

@eVoloshchak Are you able to review the PR? please let us know so that we can reassign Thx.

cc @isabelastisser

@isabelastisser
Copy link
Contributor

@eVoloshchak, can you please follow up on the question above? Thanks!

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 4, 2025

Bump @eVoloshchak

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. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests

5 participants