Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting: Edge case of users with name charge or refund appearing in unexpected search results #8783

Open
nagpai opened this issue May 6, 2024 · 0 comments
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.

Comments

@nagpai
Copy link
Contributor

nagpai commented May 6, 2024

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 various View 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 or refund .

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 for charge is used in the Charges 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 or typeIsNot 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

  • Make sure your test site has a few orders
  • Create a couple of more orders where the customer's name is charge
  • Refund one of the transactions
  • Browse to Payments > Transactions and search for charge
  • It will show you all charge type transactions, and also a refund transaction.

Additional context

Came up while working on the View report links on the payment activity widget.

@nagpai nagpai added type: bug The issue is a confirmed bug. focus: reporting type: technical debt This issue/PR represents/solves the technical debt of the project. labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

1 participant