-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[$250] Add a reimbursable toggle on the expense form in New Expensify #58588
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
Comments
Current assignee @flaviadefaria is eligible for the NewFeature assigner, not assigning anyone new. |
Job added to Upwork: https://www.upwork.com/jobs/~021902042013735835234 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha ( |
Seems pretty straight-forward to me. Where does a user enable the option to display this toggle? (asking mostly out of curiosity) |
Agree, seems pretty straight forward. Similar question as Danny, though I am wondering if we are just going to show it for all expenses on a workspace for feature parity with OldDot? |
🚨 Edited by proposal-police: This proposal was edited at 2025-03-18 18:33:08 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Add a non-reimbursable toggle on the expense form in New Expensify What is the root cause of that problem?New feature What changes do you think we should make in order to solve the problem?Note The following reimbursable values are set to reflect default
{
item: (
<View
key={Str.UCFirst(translate('iou.reimbursable'))}
style={[styles.flexRow, styles.justifyContentBetween, styles.alignItemsCenter, styles.ml5, styles.mr8, styles.optionRow]}
>
<ToggleSettingOptionRow
switchAccessibilityLabel={Str.UCFirst(translate('iou.reimbursable'))}
title={Str.UCFirst(translate('iou.reimbursable'))}
onToggle={(isOn) => onToggleReimbursable?.(isOn)}
isActive={iouIsReimbursable}
disabled={isReadOnly}
wrapperStyle={styles.flex1}
/>
</View>
),
shouldShow: shouldShowReimbursable,
isSupplementary: true,
}, With new props introduced are:
setReimbursable={setReimbursable}
iouIsReimbursable={transaction?.reimbursable ?? policy?.defaultReimbursable} Before that we need to add
const shouldShowReimbursable = policy?.disabledFields?.reimbursable === false && !isCardTransaction(transaction);
First we need to update the misspelled Line 380 in af28497
Then add
reimbursable: transaction.reimbursable OR we can add Line 203 in af28497
and add
Then in Line 4725 in af28497
with
Note To make the toggle work, we need to make a new API endpoint similar to
Again, with logics similar to Billable toggle. For all the translations, we can use Lines 1106 to 1107 in af28497
And optional to capitalize first letter ![]() Here's the result: Screen.Recording.2025-03-19.at.01.11.27.mp4What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None, New feature 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. |
|
This will be enabled by default on all expenses
Exactly this is dor parity with OldDot so that we can migrated coming cohorts. |
Right on—thanks! |
I think we'd want it placed after all the fields on the expense, so the toggles are at the bottom.
For the avoidance of doubt, we want the toggle to be named Further, for the proposals and implementation...
@flaviadefaria regarding this one, for existing collect workspaces that have this feature set to non-reimbursable by default or "Always xx" via OldDot workspace settings, are we going to abide by that while the feature exists to configure on OldDot? 🤔 I'm a bit on the fence for cross-platform consistency. CC: @JmillsExpensify too. If we do, then we'll want to include the following instructions:
I think that's all I had to add, excited for this one! 🚀 |
PROPOSAL UPDATEDUpdate proposal to apply suggested changes in #58588 (comment) |
Yes, this was my intention. I wanted it to come before the Billable toggle but after everything else.
Correct, I realize now I wrote different things in different places. Thanks for catching it.
Yes, to all of that! Thanks for flagging these other use cases.
I don’t think so - this would overcomplicate the implementation. If the plan is not to support this feature in New Collect, then I think we should just default to reimbursable unless cards are connected. Since this isn’t a toggle that Collect customers can disable, not showing it on the expense form shouldn’t be an option. |
Cool, I'm happy to not abide by what exists in the interim while this feature setting can be changed via OldDot.
Do you just mean not show it on card transactions here? or dynamically behind the scenes switch the default on expense creation depending on if the user has a managed card assigned to them or not? |
I don't see why we'd ignore a setting we suppport on OldDot. Basically, I think the choices are: upgrade anyone that won't be supported moving forward to Control; alternatively, support full backward compatibility for now and address the upgrade to Control later. For what it's worth, the "always" cases are quite rare, a super small percentage on Control (I don't think we have a sense on Collect). |
Ok, let's align on this here. We agreed no rules would be possible in NewDot so all expenses will be defaulted to reimbursable (as the mainline case when no credit cards are connected), everyone else will be upgrade to Control: Default to reimbursable - this will be possible in Collect New Dot I do not have any data for the latter two options so I'll need to ask @nkuoch to add it to the query. |
It's ~4% use one of the I think we're in agreement about upgrading people to Control that use those settings. I think it's just a question of timing. If we build this feature tomorrow ("set the reimbursability of a newly created "cash" expense based on the workspace setting for it"), it's still configurable on Collect via OldDot in the meantime. Do we abide by that in the interim? |
@inimaga our wires were crossed in the issue with the reference to "expense report". We for sure need to add this toggle to the "expense" level form, so we're going to need help with the BE it sounds like. Would you be able to help with that? It should be fairly similar to the billable toggle that exists. CC: @Gonals |
This issue has not been updated in over 15 days. @inimaga, @getusha, @flaviadefaria, @daledah 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! |
The PR is being reviewed. |
@getusha Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@getusha Still overdue 6 days?! Let's take care of this! |
@getusha Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
@getusha 10 days overdue. Is anyone even seeing these? Hello? |
This issue has not been updated in over 14 days. @inimaga, @getusha, @flaviadefaria, @daledah eroding to Weekly issue. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
@flaviadefaria The PR from this issue might have caused a regression. Checking on the potential regression here |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
@flaviadefaria Just saw your comment. Updating the PR description of the original post to include the tracking table. |
Amazing, thank you for doing that @inimaga! |
Uh oh!
There was an error while loading. Please reload this page.
I HAVE UPDATED THIS OP TO ACCOUNT FOR ALL THE PLANNING DISCUSSIONS THAT TOOK PLACE ON THE ISSUE, THIS IS ALL YOU NEED TO READ FOR YOUR PROPOSAL:
Billable
toggle displays when enabled.The placement for this toggle should be after all expense fields but before the billable toggle, so:
- Expense fields
- Reimbursable toggle
- Billable toggle
The Reimbursable toggle should be enabled by default if no credit cards are connected (more details below)
- An imported card transaction is non-reimbursable and cannot be changed, so the toggle should not be displayed at all on card transactions (like OldDot).
- The toggle should only be displayed on expenses you create to submit to a workspace, as it's a workspace feature. (e.g don't show it on expenses you submit to a friend in a DM).
- The toggle should abide by the same permission logic as the
date
andamount
fields when it comes to editing, which I believe is as follows:- Submitter: can't edit the toggle on
processing
reports after first level approval.- Non-admin manager: can't edit the toggle after they've approved (i.e no longer the report's managerID)
- Admins: can't edit the toggle if it's on a report in the
approved
,reimbursed
orclosed
state.Then for cross-platform consistency we'll want to include the following instructions:
Default reimbursable
is set via OldDot, show the toggle enabled by default on expense creation.Default non-reimbursable
is set via OldDot, show the toggle disabled by default on expense creation.Always non-reimbursable
is set via OldDot, don't show the toggle at all and create the cash expense as non-reimbursable.Always reimbursable
is set via OldDot, don't show the toggle at all and create the cash expense as reimbursable.cc @Expensify/design in case you have any additional input you want to share.
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @getushaAdding here the list of issues that need to be fixed with a new PR:
Keys:
🔴 Not started
🟡 In Progress
🟢 Completed
The text was updated successfully, but these errors were encountered: