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-06-03] [$250] Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense #41939
@MitchExpensify 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.
Please re-state the problem that we are trying to solve in this issue.
When submtting a new expense with an empty merchant that is previously filled, the merchant shows Expense.
What is the root cause of that problem?
When we start a new money request flow, the default merchant is (none). If it's (none), we show nothing in the merchant field. If we submit an expense with a merchant of (none), the merchant stays as (none).
If we set the merchant to something else first, for example "test", then the transaction draft merchant becomes "test". merchant: 'test'
Then, if we clear it, then it becomes empty string. merchant: ''
If we submit an expense with an empty string of merchant, the BE response will return "Expense" as the merchant.
What changes do you think we should make in order to solve the problem?
Fallback to (none) if the merchant is empty, just like what we did for edit case.
changed the title [-]Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense[/-][+][$250] Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense[/+]on May 12, 2024
changed the title [-][$250] Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense[/-][+][HOLD for payment 2024-06-03] [$250] Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense[/+]on May 27, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.75-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@ikevin127] The PR that introduced the bug has been identified. Link to the PR:
[@ikevin127] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@ikevin127] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@ikevin127] Determine if we should create a regression test for this bug.
[@ikevin127] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@MitchExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@ikevin127] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: ❌
No need to take additional steps or update the PR review checklist as this issue happened during TS migration because functionality was changed without carefully considering / testing the logic, when this shouldn't have happened in the first place.
[@ikevin127] Determine if we should create a regression test for this bug.
[@ikevin127] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Activity
melvin-bot commentedon May 9, 2024
Triggered auto assignment to @MitchExpensify (
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.kbecciv commentedon May 9, 2024
We think that this bug might be related to #wave-collect - Release 1
kbecciv commentedon May 9, 2024
@MitchExpensify 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.
bernhardoj commentedon May 10, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
When submtting a new expense with an empty merchant that is previously filled, the merchant shows Expense.
What is the root cause of that problem?
When we start a new money request flow, the default merchant is (none). If it's (none), we show nothing in the merchant field. If we submit an expense with a merchant of (none), the merchant stays as (none).
If we set the merchant to something else first, for example "test", then the transaction draft merchant becomes "test".
merchant: 'test'Then, if we clear it, then it becomes empty string.
merchant: ''If we submit an expense with an empty string of merchant, the BE response will return "Expense" as the merchant.

What changes do you think we should make in order to solve the problem?
Fallback to (none) if the merchant is empty, just like what we did for edit case.
App/src/pages/iou/request/step/IOURequestStepMerchant.tsx
Lines 101 to 103 in db469d6
nkdengineer commentedon May 10, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Merchant row is populated with "Expense" when merchant field is filled then removed when submitting the expense.
What is the root cause of that problem?
The default merchant is
(none). But when we clear a merchant and save, we store it as empty string and then BE returns it asexpense.App/src/pages/iou/request/step/IOURequestStepMerchant.tsx
Line 100 in db469d6
What changes do you think we should make in order to solve the problem?
For the create flow and edit split bill, we should fallback the merchant to
CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANTwhen we save itApp/src/pages/iou/request/step/IOURequestStepMerchant.tsx
Line 89 in db469d6
App/src/pages/iou/request/step/IOURequestStepMerchant.tsx
Line 100 in db469d6
Beside, we shouldn't also call
IOU.setMoneyRequestMerchantfor the edit flow.What alternative solutions did you explore? (Optional)
NA
melvin-bot commentedon May 12, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01282159a7ab4f2452
[-]Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense[/-][+][$250] Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense[/+]melvin-bot commentedon May 12, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (
External)18 remaining items
[-][$250] Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense[/-][+][HOLD for payment 2024-06-03] [$250] Expense - Merchant shows "Expense" when merchant is filled then removed when creating expense[/+]melvin-bot commentedon May 27, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 27, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.75-1 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-06-03. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 27, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
MitchExpensify commentedon May 30, 2024
Reminder set to pay on the 3rd. @ikevin127 - Thoughts on the testing stesps?
ikevin127 commentedon May 30, 2024
Thanks! Sure, I'll complete the checklist tomorrow (PST), making sure to include regression test 👍
ikevin127 commentedon May 30, 2024
No need to take additional steps or update the PR review checklist as this issue happened during TS migration because functionality was changed without carefully considering / testing the logic, when this shouldn't have happened in the first place.
Regression Test Proposal
Do we agree 👍 or 👎.
MitchExpensify commentedon Jun 3, 2024
Payment summary:
MitchExpensify commentedon Jun 3, 2024
Paid and contracts ended