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 2025-01-13][$250] Invoice - In search, Invoice doesn't displays merchant text "expense" #50794
@JmillsExpensify 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.
In search, Invoice doesn't displays merchant text "expense".
What is the root cause of that problem?
Sometime when we create a send invoice, merchant param is an empty string then BE returns merchant as Expense.
I think the current problem here is the Expense merchant appears in REPORTPREVIEW action. That is how we're displaying merchant in other places like here, here and here
What changes do you think we should make in order to solve the problem?
We should fix to not display Expense merchant in the report preview action. To do that we can add the same check that we use to display the merchant in other places
ALTERNATIVE 2
Also the merchant set to Expense because the merchant param we pass to the API is empty string, if we want to set it to empty or (none) can can update the following code
@luacmartins is this by design in a sense? In that we require a merchant for all expenses, and set a default one for certain cases, but we don't show them in previews and potentially search? If not, I'll triage I just wasn't sure.
Hmm maybe in this case we'd expect it show. The design doc says:
The Merchant and Description columns will show based on the same logic already in use for the expense previews in Inbox. In other words, Merchant will always be shown for workspace expenses, because Merchant is required and triggers violations. Off-workspace, we’ll show Merchant as long as at least one value isn’t “Expense” or “Unknown merchant”, based on existing logic. In all other cases, we’ll show Description as long as at least one expense has one (and if a description is long, we’ll truncate with an ellipsis, just like any other column).
Given this is a workspace expense, we should show it according to the doc. That being said, we are definitely intentionally hiding it, but I can't recall if we decided to change the behavior in another discussion or it was just a mistake during implementation.
Activity
melvin-bot commentedon Oct 15, 2024
Triggered auto assignment to @JmillsExpensify (
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.IuliiaHerets commentedon Oct 15, 2024
@JmillsExpensify 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
mkzie2 commentedon Oct 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
In search, Invoice doesn't displays merchant text "expense".
What is the root cause of that problem?
Sometime when we create a send invoice,
merchantparam is an empty string then BE returnsmerchantasExpense.I think the current problem here is the
Expensemerchant appears inREPORTPREVIEWaction. That is how we're displaying merchant in other places like here, here and hereWhat changes do you think we should make in order to solve the problem?
We should fix to not display
Expensemerchant in the report preview action. To do that we can add the same check that we use to display the merchant in other placesApp/src/components/ReportActionItem/ReportPreview.tsx
Line 351 in e9de4f2
What alternative solutions did you explore? (Optional)
When we create a send invoice, we can fallback merchant as
CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANThereApp/src/libs/actions/IOU.ts
Line 1871 in e9de4f2
NJ-2020 commentedon Oct 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Invoice - In search, Invoice doesn't displays merchant text "expense"
What is the root cause of that problem?
Right here if the merchant value is equal to
Expensewe return empty stringApp/src/libs/SearchUtils.ts
Line 85 in e9de4f2
merchant === CONST.TRANSACTION.DEFAULT_MERCHANT ? ''What changes do you think we should make in order to solve the problem?
We should remove this code:
merchant === CONST.TRANSACTION.DEFAULT_MERCHANT ? ''What alternative solutions did you explore? (Optional)
nyomanjyotisa commentedon Oct 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Invoice - In search, Invoice doesn't displays merchant text "expense"
What is the root cause of that problem?
We don't display the merchant if the merchant is 'Expense'
App/src/libs/SearchUtils.ts
Line 85 in a59bbc3
What changes do you think we should make in order to solve the problem?
If we need to display the merchant although it is
Expensefor Invoices we can update the following codeApp/src/libs/SearchUtils.ts
Line 85 in a59bbc3
And update this to show the merchant column
App/src/libs/SearchUtils.ts
Line 119 in a59bbc3
What alternative solutions did you explore? (Optional)
ALTERNATIVE 1
If we want to always display the merchant for all reportType change to the following
ALTERNATIVE 2
Also the merchant set to Expense because the merchant param we pass to the API is empty string, if we want to set it to empty or (none) can can update the following code
App/src/libs/actions/IOU.ts
Line 3678 in a59bbc3
melvin-bot commentedon Oct 18, 2024
@JmillsExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Oct 22, 2024
@JmillsExpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
JmillsExpensify commentedon Oct 24, 2024
@luacmartins is this by design in a sense? In that we require a merchant for all expenses, and set a default one for certain cases, but we don't show them in previews and potentially search? If not, I'll triage I just wasn't sure.
luacmartins commentedon Oct 24, 2024
Hmm maybe in this case we'd expect it show. The design doc says:
Given this is a workspace expense, we should show it according to the doc. That being said, we are definitely intentionally hiding it, but I can't recall if we decided to change the behavior in another discussion or it was just a mistake during implementation.
78 remaining items
melvin-bot commentedon Jan 13, 2025
Payment Summary
Upwork Job
BugZero Checklist (@JmillsExpensify)
melvin-bot commentedon Jan 13, 2025
@JmillsExpensify, @luacmartins, @MonilBhavsar, @NJ-2020, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
JmillsExpensify commentedon Jan 13, 2025
Payment summary:
It looks like the Upwork automation failed. Is that right?
NJ-2020 commentedon Jan 13, 2025
Yes
ishpaul777 commentedon Jan 13, 2025
yes thats correct @JmillsExpensify
melvin-bot commentedon Jan 17, 2025
@JmillsExpensify, @luacmartins, @MonilBhavsar, @NJ-2020, @ishpaul777 Whoops! This issue is 2 days overdue. Let's get this updated quick!
ishpaul777 commentedon Jan 17, 2025
this is awaiting payment
melvin-bot commentedon Jan 21, 2025
@JmillsExpensify, @luacmartins, @MonilBhavsar, @NJ-2020, @ishpaul777 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
JmillsExpensify commentedon Jan 21, 2025
Apologies both. Offers sent.
NJ-2020 commentedon Jan 22, 2025
Done offer accepted
JmillsExpensify commentedon Jan 22, 2025
All contracts paid out. Thanks everyone.