You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-04-25] [$500] [Track Expense] Adding Track Expense to Workspace Chats #38971
In this PR, we added the ability for you to track expenses from the global create / selfDM. These would go directly to your self-DM.
In the context menu for a workspace chat, we're going to also add the ability to track expenses. This won't go to your self-DM, but these transactions will instead be added to the new / existing money request chat of the workspace chat.
TrackExpense uses the same parameters as RequestMoney so they should be used in the same way
Something to note here is that for the self-DM, we created IOU reportActions directly on the chat report. However, when we're tracking in a workspace chat - the handling will be very similar to the request money flow where the IOU reportAction is added to the expense report. The only difference is that creating a tracked expense will just add a non-reimbursable expense to the report, so it shouldn't adjust change how much is owed
changed the title [-][Track Expense] Adding Track Expense to Workspace Chats[/-][+][$500] [Track Expense] Adding Track Expense to Workspace Chats[/+]on Mar 26, 2024
The only difference is that creating a tracked expense will just add a non-reimbursable expense to the report, so it shouldn't adjust change how much is owed
Please re-state the problem that we are trying to solve in this issue.
We should allow Track Expense in Workspace Chats
What is the root cause of that problem?
This is a new feature.
What changes do you think we should make in order to solve the problem?
Uncomment these lines so that the Track Expense option will show up in the context menu of a workspace chat
In here, add the logic to get the correct IOU report to track the expense. We can do it similar to existing logic for money request here
Below there Use the iouReport when constructing the expense to track, just like we did in getMoneyRequestInformation, there'll be a couple of related methods that need to be updated to add support for the iouReport, like buildOnyxDataForTrackExpense
Since now we're operating on a workspace chat, the report preview also needs to be created/updated optimistically when tracking the expense, similar to what we did with the money request here.
The iouReport created above will also need to be returned here to populate the API request here
In related operation like deleteTrackExpense, we need to handle to update the IOU report/report preview as well, similar to what we did when deleting the money request here
There might back-end changes required to enable this use case
Those are the main changes required, since there're a lot of changes needed in those steps, I'll be happy to provide a test branch if requested.
What alternative solutions did you explore? (Optional)
Please note this requires quite many changes so the branch is a rough branch as a POC for the solution, so it's incomplete and could have bugs/regressions (which will be addressed during PR phase).
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.62-17 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Issue is ready for payment but no BZ is assigned. @isabelastisser you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
@paultsimura, your payment has now been processed in Upwork.
@shubham1206agra, please accept the offer, and I will process the payment. Note that the Upwork offer expires tomorrow, April 27th. I will DM you for visibility. Thanks!
Activity
[-][Track Expense] Adding Track Expense to Workspace Chats[/-][+][$500] [Track Expense] Adding Track Expense to Workspace Chats[/+]melvin-bot commentedon Mar 26, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0118fd1f0c99c73336
melvin-bot commentedon Mar 26, 2024
Current assignee @shubham1206agra is eligible for the External assigner, not assigning anyone new.
thienlnam commentedon Mar 26, 2024
@shubham1206agra Having you C+ this one since you did the Track Expense on the self-DM and have the context
ShridharGoel commentedon Mar 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Adding Track Expense to Workspace Chats.
What is the root cause of that problem?
New feature.
What changes do you think we should make in order to solve the problem?
This check is currently commented in ReportUtils, we can add it back:
Now, the track expense option will start showing for workspaces.
The UI and click handling is already handled in
AttachmentPickerWithMenuItems.tsx.This would probably need backend changes as well.
tienifr commentedon Mar 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
We should allow Track Expense in Workspace Chats
What is the root cause of that problem?
This is a new feature.
What changes do you think we should make in order to solve the problem?
iouReportwhen constructing the expense to track, just like we did ingetMoneyRequestInformation, there'll be a couple of related methods that need to be updated to add support for the iouReport, likebuildOnyxDataForTrackExpenseiouReportcreated above will also need to be returned here to populate the API request heredeleteTrackExpense, we need to handle to update the IOU report/report preview as well, similar to what we did when deleting the money request hereThose are the main changes required, since there're a lot of changes needed in those steps, I'll be happy to provide a test branch if requested.
What alternative solutions did you explore? (Optional)
NA
Result
shubham1206agra commentedon Mar 26, 2024
@tienifr Can you provide a test branch here?
tienifr commentedon Mar 27, 2024
@shubham1206agra I'll provide one within 24 hours, thanks!
tienifr commentedon Mar 28, 2024
@shubham1206agra Here's the test branch https://github.com/tienifr/App/tree/fix/38971
Please note this requires quite many changes so the branch is a rough branch as a POC for the solution, so it's incomplete and could have bugs/regressions (which will be addressed during PR phase).
Thanks!
8 remaining items
melvin-bot commentedon Apr 11, 2024
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.
[-][$500] [Track Expense] Adding Track Expense to Workspace Chats[/-][+][HOLD for payment 2024-04-25] [$500] [Track Expense] Adding Track Expense to Workspace Chats[/+]melvin-bot commentedon Apr 18, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 18, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.62-17 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-04-25. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 25, 2024
Issue is ready for payment but no BZ is assigned. @isabelastisser you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
isabelastisser commentedon Apr 26, 2024
@paultsimura, your payment has now been processed in Upwork.
@shubham1206agra, please accept the offer, and I will process the payment. Note that the Upwork offer expires tomorrow, April 27th. I will DM you for visibility. Thanks!