Closed thienlnam closed 6 months ago
Job added to Upwork: https://www.upwork.com/jobs/~0118fd1f0c99c73336
Current assignee @shubham1206agra is eligible for the External assigner, not assigning anyone new.
@shubham1206agra Having you C+ this one since you did the Track Expense on the self-DM and have the context
Adding Track Expense to Workspace Chats.
New feature.
This check is currently commented in ReportUtils, we can add it back:
if (canUseTrackExpense && isPolicyExpenseChat(report) && report?.isOwnPolicyExpenseChat) {
options = [...options, CONST.IOU.TYPE.TRACK_EXPENSE];
}
Now, the track expense option will start showing for workspaces.
The UI and click handling is already handled in AttachmentPickerWithMenuItems.tsx
.
[CONST.IOU.TYPE.TRACK_EXPENSE]: {
icon: Expensicons.DocumentPlus,
text: translate('iou.trackExpense'),
onSelected: () => IOU.startMoneyRequest(CONST.IOU.TYPE.TRACK_EXPENSE, report?.reportID ?? ''),
}
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
This would probably need backend changes as well.
We should allow Track Expense in Workspace Chats
This is a new feature.
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
iouReport
created 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.
NA
@tienifr Can you provide a test branch here?
@tienifr Can you provide a test branch here?
@shubham1206agra I'll provide one within 24 hours, thanks!
@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!
π£ @shubham1206agra π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @paultsimura π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
β οΈ Looks like this issue was linked to a Deploy Blocker 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.
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.62-17 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-04-25. :confetti_ball:
For reference, here are some details about the assignees on 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!
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
Upwork Automation - Do Not Edit