Add travel option to workspace duplication#79311
Conversation
- Add travel copy option in WorkspaceDuplicateSelectFeaturesForm when policy.isTravelEnabled is true - Pass travel in parts object to API when duplicating workspace - Add optimistic update for isTravelEnabled in buildDuplicatePolicyData to copy travel enable/disable state
|
@cristipaval Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70106f3dd5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -2727,9 +2728,10 @@ function buildDuplicatePolicyData(policy: Policy, options: DuplicatePolicyDataOp | |||
| areReportFieldsEnabled: isReportsOptionSelected, | |||
| areConnectionsEnabled: isConnectionsOptionSelected, | |||
| arePerDiemRatesEnabled: isPerDiemOptionSelected, | |||
| isTravelEnabled: isTravelOptionSelected ? policy?.isTravelEnabled : undefined, | |||
There was a problem hiding this comment.
Clear travel settings when travel isn’t selected
When duplicating a workspace that already has travel configured, deselecting Travel only flips isTravelEnabled but the new policy is still seeded from ...policy, so travelSettings (e.g., accepted terms / Spotnana IDs) gets copied into the duplicate. Since getTravelStep uses policy.travelSettings.hasAcceptedTerms without checking isTravelEnabled, a user who opted out of copying Travel can still see the duplicated workspace treated as provisioned (e.g., “Book or manage your trip”) if they navigate to the travel page. Consider explicitly clearing travelSettings when parts.travel is false.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
we dont want to copy travelSettings
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
tests are failing |
|
If this requires C+ review and testing, I can help |
|
eslint failing on other PR also, |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/madmax330 in version: 9.3.0-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.3.0-8 🚀
|
Explanation of Change
Fixed Issues
$ #78202
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-01-12.at.12.00.46.AM.mov
Android: mWeb Chrome
Screen.Recording.2026-01-12.at.12.02.24.AM.mov
iOS: Native
Screen.Recording.2026-01-11.at.11.57.41.PM.mov
iOS: mWeb Safari
Screen.Recording.2026-01-11.at.11.53.09.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2026-01-11.at.11.29.46.PM.mov