Reporting: Edge case of users with name charge
or refund
appearing in unexpected search results
#8783
Labels
focus: reporting
type: bug
The issue is a confirmed bug.
type: technical debt
This issue/PR represents/solves the technical debt of the project.
We recently enabled exact search by
type
to allow searching / filtering multiple types. This was done as a part of a requirement to have relevant transactions displayed for variousView report
links within the Payment activity widget. We can now get transactions of multiple types by passing each type as a search param. This however introduces a technical debt.While this solution does help us to get the required results ( i.e. Transactions of specific multiple types ), it introduces a bug for edge cases where users have a first or last name as
charge
orrefund
.E.g. if we have a user whose name is charge, and they get a refund. The refund transaction will appear within a search for
charge
. The search param forcharge
is used in theCharges
tile of the Payment activity widget and that would end up showing the refund transaction of Mr. / Mrs./charge
!The method to use exact search of type names to filter out multiple types, is best a temporary one.
Long term solution
A probable robust solution would involve making the filter component accept multiple
typeIs
ortypeIsNot
parameters via an array. This involves more complex changes, but it will help us overcome the bug explained above. Further, it will also help us implement merchant-facing enhancements, such as the advanced filter allowing multiple types for include/exclude filters.Steps to reproduce bug
charge
Payments > Transactions
and search forcharge
charge
type transactions, and also arefund
transaction.Additional context
Came up while working on the
View report
links on the payment activity widget.The text was updated successfully, but these errors were encountered: