Open IuliiaHerets opened 3 weeks ago
Triggered auto assignment to @puneetlath (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
The same RCA with https://github.com/Expensify/App/issues/48238
Thanks @nkdengineer. Going to put on hold for that issue.
Job added to Upwork: https://www.upwork.com/jobs/~021837147636277169515
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External
)
@puneetlath, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!
Is this still on hold?
Looks like it doesn't need to be anymore. I removed the hold and I'll ask QA to re-test.
In the first invoice created, the text " Expense ut it is displayed in other invoice created.
merchant
as (none)
then it works as expected. After that, the transaction draft still exists because this logictransactionDraft
first and then open the IOURequestStartPage
which will initiate the money request. That problem starts here, the draft transaction is updated after we call initMoneyRequest
(let's see the log below, the transaction change log is logged here). https://github.com/user-attachments/assets/1f91d69a-58a1-4c9d-ad18-2f82b746eb09
We move to this case because the transaction still exists as mentioned in point 1. Then the transaction draft is init with merchant
as undefined
because the current transaction
value in the storage is null
then we send merchant
as an empty string to SendInvoice
API. As expected, BE returns the merchant
as Expense
.
We have some options to solve this issue
Promise.all
to ensure the draft transaction is cleared before we start another money requestfunction startMoneyRequest(iouType: ValueOf<typeof CONST.IOU.TYPE>, reportID: string, requestType?: IOURequestType, skipConfirmation = false) {
Promise.all([clearMoneyRequest(CONST.IOU.OPTIMISTIC_TRANSACTION_ID, skipConfirmation)]).then(() => {
switch (requestType) {
case CONST.IOU.REQUEST_TYPE.MANUAL:
Navigation.navigate(ROUTES.MONEY_REQUEST_CREATE_TAB_MANUAL.getRoute(CONST.IOU.ACTION.CREATE, iouType, CONST.IOU.OPTIMISTIC_TRANSACTION_ID, reportID));
return;
case CONST.IOU.REQUEST_TYPE.SCAN:
Navigation.navigate(ROUTES.MONEY_REQUEST_CREATE_TAB_SCAN.getRoute(CONST.IOU.ACTION.CREATE, iouType, CONST.IOU.OPTIMISTIC_TRANSACTION_ID, reportID));
return;
case CONST.IOU.REQUEST_TYPE.DISTANCE:
Navigation.navigate(ROUTES.MONEY_REQUEST_CREATE_TAB_DISTANCE.getRoute(CONST.IOU.ACTION.CREATE, iouType, CONST.IOU.OPTIMISTIC_TRANSACTION_ID, reportID));
return;
default:
Navigation.navigate(ROUTES.MONEY_REQUEST_CREATE.getRoute(CONST.IOU.ACTION.CREATE, iouType, CONST.IOU.OPTIMISTIC_TRANSACTION_ID, reportID));
}
});
}
transaction
value from the component to initMoneyRequest
instead of getting it from allTransactionDrafts
CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT
instead of empty stringif (formattedMerchant && formattedMerchant !== CONST.TRANSACTION.DEFAULT_MERCHANT && formattedMerchant !== CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT && formattedMerchant !== CONST.TRANSACTION.DEFAULT_MERCHANT) {
useEffect
with a cleanup function in IOURequestStartPage
to clear the transaction draft when this page is unmounted if the action
param is create
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@puneetlath, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick!
reviewing proposal above
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.28 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
In the first invoice created, the text " Expense " is not shown
Actual Result:
In the first invoice created, the text " Expense ut it is displayed in other invoice created.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/cb33e405-030e-4125-a913-64c4601dbad3
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @aimane-chnaif