Skip to content

[Due for payment 2025-03-31] [$250] Only show the travel modal if the user is enabling travel #58564

Closed

Description

@stitesExpensify

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: 9.1.10-6
Reproducible in staging?: y
Reproducible in production?: y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: n/a
**If this was caught during regression testing, add the test name, ID and link from TestRail:**n/a
Email or phone of affected tester (no customers): n/a
Logs: https://stackoverflow.com/c/expensify/questions/4856 n/a
Expensify/Expensify Issue URL: n/a
Issue reported by: @JmillsExpensify
Slack conversation (hyperlinked to channel name): (internal) https://expensify.slack.com/archives/C05S5EV2JTX/p1742213137145989

Action Performed:

  1. Sign in on an account that has travel already enabled
  2. Click FAB
  3. Click "book travel"

Expected Result:

You should be brought to Expensify Travel immediately

Actual Result:

A modal is surfaced asking to book a demo or then go to Expensify travel

Image

Workaround:

Click book travel in the modal to go to travel

Summary:

Currently the flow when enabling travel for a workspace is the following, and should not change:

  1. Click FAB
  2. Click "book travel"
  3. The modal appears and you can book a demo, or enable travel

Currently the flow when going to book travel on a travel enabled workspace is:

  1. Click FAB
  2. Click "book travel"
  3. The modal appears and you can book a demo, or click book travel a second time which brings you to Expensify Travel.

This behavior should change. We should only show the modal if travel has not yet been enabled for the workspace. If the workspace is already travel enabled, then "book travel" in the FAB should take the user directly to Expensify Travel

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/~021901652729502566491
  • Upwork Job ID: 1901652729502566491
  • Last Price Increase: 2025-03-17
  • Automatic offers:
    • nkdengineer | Contributor | 106576745
Issue OwnerCurrent Issue Owner: @RachCHopkins

Activity

  1. added
    Bug
    Daily
    External
    Help Wanted
    on Mar 17, 2025
  2. changed the title [-]Only show the travel modal if the user is enabling travel[/-] [+][$250] Only show the travel modal if the user is enabling travel[/+] on Mar 17, 2025
  3. melvin-bot commented on Mar 17, 2025

    @melvin-bot
  4. melvin-bot commented on Mar 17, 2025

    @melvin-bot

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

  5. melvin-bot commented on Mar 17, 2025

    @melvin-bot

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

  6. nkdengineer commented on Mar 17, 2025

    @nkdengineer
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-03-17 16:50:17 UTC.

    Proposal

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

    A modal is surfaced asking to book a demo or then go to Expensify travel

    What is the root cause of that problem?

    We always navigate to the book travel page of the App when clicking on Book travel.

    onSelected: () => interceptAnonymousUser(() => Navigation.navigate(ROUTES.TRAVEL_MY_TRIPS)),

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

    We should use the same logic in BookTravelButton in the case we open the Expensify Travel here to check the user is enabling travel or not. If it's not, open the travel modal otherwise open the Expensify Travel

    const openTravel = useCallback(() => {
        const isPolicyProvisioned = activePolicy?.travelSettings?.spotnanaCompanyID ?? activePolicy?.travelSettings?.associatedTravelDomainAccountID;
        const isTravelEnabled = activePolicy?.travelSettings?.hasAcceptedTerms ?? (travelSettings?.hasAcceptedTerms && isPolicyProvisioned);
    
        if (!!isBlockedFromSpotnanaTravel || (!primaryContactMethod || Str.isSMSLogin(primaryContactMethod)) || !isPaidGroupPolicy(activePolicy)) {
            Navigation.navigate(ROUTES.TRAVEL_MY_TRIPS);
            return;
        }
    
        if (isTravelEnabled) {
            openTravelDotLink(activePolicy?.id)
                ?.then(() => {})
                ?.catch(() => {
                    Navigation.navigate(ROUTES.TRAVEL_MY_TRIPS);
                });
        } else {
            Navigation.navigate(ROUTES.TRAVEL_MY_TRIPS);
        }
    }, [activePolicy, isBlockedFromSpotnanaTravel, primaryContactMethod, travelSettings?.hasAcceptedTerms]);
    
    onSelected: () => interceptAnonymousUser(() => openTravel()),
    

    onSelected: () => interceptAnonymousUser(() => Navigation.navigate(ROUTES.TRAVEL_MY_TRIPS)),

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

    It's an UI bug

    What alternative solutions did you explore? (Optional)

    NA

    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.

  7. github-actions commented on Mar 17, 2025

    @github-actions
    Contributor

    ⚠️ @nkdengineer Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

  8. 24 remaining items

  9. melvin-bot commented on Mar 28, 2025

    @melvin-bot

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

  10. added
    Daily
    and removed
    Weekly
    on Mar 28, 2025
  11. CortneyOfstad commented on Mar 28, 2025

    @CortneyOfstad
    Contributor

    Hey @RachCHopkins! I'm heading OoO until April 7, so reassigned this so there would not be a delay in payment!

    Payment Summary is here
    Regression Test GH is here

    Thanks!

  12. RachCHopkins commented on Mar 31, 2025

    @RachCHopkins
    Contributor

    Damn, she forgot to Star me! I'll get this paid out tomorrow, guys!

  13. added
    Daily
    and removed
    Daily
    on Mar 31, 2025
  14. RachCHopkins commented on Mar 31, 2025

    @RachCHopkins
    Contributor

    Payment Summary:

    • Contributor: @nkdengineer to be paid $250 via Upwork
    • Contributor+: @jjcoffee to be paid $250 via NewDot Manual Request

    Upwork job here

  15. RachCHopkins commented on Mar 31, 2025

    @RachCHopkins
    Contributor

    Contributor has been paid, the contract has been completed, and the Upwork post has been closed.

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions