Fix: Reimbursable Toggle Missing for Collect Workspace Users — Expenses Defaulting to Non-Reimbursable#72098
Conversation
…s Defaulting to Non-Reimbursable
Reviewer Checklist
Screenshots/Videos |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| const shouldShowReimbursable = isPolicyExpenseChat && policy?.disabledFields?.reimbursable === false && !isCardTransaction(transaction) && !isTypeInvoice; | ||
| const shouldShowReimbursable = | ||
| isPolicyExpenseChat && | ||
| (policy?.disabledFields?.reimbursable === false || (policy?.disabledFields?.reimbursable === undefined && policy?.defaultReimbursable === undefined)) && |
There was a problem hiding this comment.
@jjcoffee do you think we should ease this condition and only check for policy?.disabledFields?.reimbursable === undefined ?
There was a problem hiding this comment.
saying so cause the work of policy?.defaultReimbursable is only to have the toggle enabled by default, but by looking at the bug data of the customer , they don't have defaultReimbursable, so should we keep this as is or update?
There was a problem hiding this comment.
They don't have either from the looks of it. I think you're right that it doesn't make sense to check for defaultReimbursable here. I think we can just do policy?.disabledFields?.reimbursable != true unless I'm mistaken?
There was a problem hiding this comment.
yeahh makes sense to me, lets take this to slack for better and faster communication 😄
|
@puneetlath I don't know if you want to trigger a build and test against the workspace where the issue was occurring? I couldn't replicate it with a new workspace, so I just simulated based on the data @trjExpensify provided here. |
|
✋ 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/puneetlath in version: 9.2.28-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.2.28-5 🚀
|






Explanation of Change
Fixed Issues
$ #71831
PROPOSAL: #71831 (comment)
Tests
Offline tests
QA Steps
Log in as a user in a Collect workspace who doesn't have
disabledFieldsanddefaultReimbursablein their policy onyx dataNavigate to Workspaces → Rules → confirm Rules section is unavailable
Create a new expense in NewDot
On the confirmation page , look for the
ReimbursabletoggleIf you do not have a workspace with the above requirement then do the following in the console:
perform the following in console:
Verify that you can see the toggle and it is defaulted to enabled
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop