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

[$500] [Dstance] - distance request money allows to request 0 amount after it show route exceeds maximum limitation error #27099

Closed
1 of 6 tasks
kbecciv opened this issue Sep 10, 2023 · 12 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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

Comments

@kbecciv
Copy link

kbecciv commented Sep 10, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Click '+' FAB
  2. Click on request money and go to distance tab
  3. Give start and finish that are far away and click next
  4. Choose workspace and request the money
  5. You can see it has requested 0 amount

Expected Result:

The next button won't allow user to proceed

Actual Result:

The next button allows user to proceed

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1,3,66,3
Reproducible in staging?: y
Reproducible in production?: y
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
Notes/Photos/Videos: Any additional supporting documentation

max.distance.request.0.amount.mp4
Recording.4357.mp4

Expensify/Expensify Issue URL:
Issue reported by: @lidiyakelay
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693900129869839

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019d2c09a29868a725
  • Upwork Job ID: 1700775335250837504
  • Last Price Increase: 2023-09-10
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 10, 2023
@dukenv0307
Copy link
Contributor

Proposal

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

[distance] - distance request money allows to request 0 amount after it show route exceeds maximum limitation error

What is the root cause of that problem?

We only disable the next button if we don't select two different waypoints.

isDisabled={_.size(validatedWaypoints) < 2}

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

We should also disable the next button if we have the route error

const transactionRouteError = ErrorUtils.getLatestErrorField(transaction, 'route');

<Button
    success
    style={[styles.w100, styles.mb4, styles.ph4, styles.flexShrink0]}
    onPress={() => IOU.navigateToNextPage(iou, iouType, reportID, report)}
    isDisabled={_.size(validatedWaypoints) < 2 || !_.isEmpty(transactionRouteError)}
    text={translate('common.next')}
/>

isDisabled={_.size(validatedWaypoints) < 2}

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot changed the title [Dstance] - distance request money allows to request 0 amount after it show route exceeds maximum limitation error [$500] [Dstance] - distance request money allows to request 0 amount after it show route exceeds maximum limitation error Sep 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 10, 2023

Triggered auto assignment to @sophiepintoraetz (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 10, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 10, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Sep 10, 2023

Triggered auto assignment to @alexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 10, 2023

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

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Sep 10, 2023

Proposal

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

The next button is active even if there is an error.

What is the root cause of that problem?

The button does not have a condition if there is an error.

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

We can add a hasRouteError condition(that is used to display the error text) so that the button is disabled.

<Button
success
style={[styles.w100, styles.mb4, styles.ph4, styles.flexShrink0]}
onPress={() => IOU.navigateToNextPage(iou, iouType, reportID, report)}
isDisabled={_.size(validatedWaypoints) < 2}
text={translate('common.next')}
/>

            <Button
                success
                style={[styles.w100, styles.mb4, styles.ph4, styles.flexShrink0]}
                onPress={() => IOU.navigateToNextPage(iou, iouType, reportID, report)}
                isDisabled={_.size(validatedWaypoints) < 2 || hasRouteError}
                text={translate('common.next')}
            />

What alternative solutions did you explore? (Optional)

NA

@alexpensify alexpensify removed their assignment Sep 11, 2023
@alexpensify
Copy link
Contributor

It looks like Melvin assigned @sophiepintoraetz first, so I'm removing my assignment to avoid doubling up work.

@paultsimura
Copy link
Contributor

Should have been fixed in the current main branch by this PR: #26705.

@allroundexperts
Copy link
Contributor

That's correct. Let's close this!

@melvin-bot melvin-bot bot added the Overdue label Sep 14, 2023
@sophiepintoraetz
Copy link
Contributor

Okay but I still need to pay @lidiyakelay the $50 reporting bonus. @lidiyakelay - please can you apply for the job here and let me know here once you have done so?

@melvin-bot melvin-bot bot removed the Overdue label Sep 15, 2023
@lidiyakelay
Copy link

@sophiepintoraetz I have applied for the job

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. Daily KSv2 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
Projects
None yet
Development

No branches or pull requests

8 participants