Filters and wildcards on Reports

After our upgrade to V6, we have noticed that report filters behave differently.

By setting a Filter for a field to a wildcard “%”, I expect to get all records, just as if the filter was not present. However, a filter with the wildcard ‘%’ suppresses all records.
Removing the same filter then causes the report to display all records. See screenshots illustrating both cases

With wildcard filter Customer like "%" :

Customer like "%" filter removed:

Anyone else run into this issue?
-Jev

Isn’t adding just % redundant? Like adding no filter.

Also % is now added automatically in like filters.

@rmehta yes, it is a redundant filter. The reason it is there is as follows;

I save some reports with predefined filters all set to like = #. When a user opens the reports, they can quickly edit the existing filter, instead of adding a new filter, choosing the field name, choosing the ‘like’ operator, and setting the filter value.

I tested this on v6.4.6, the default filter value when choosing like is “” empty string. “%” doesn’t work either, in that no records return. like “%next%” works, in that it will match anything with the string ‘next’ in it.

I just found that specifying two % symbols works

Given the following Customer names:

  • next
  • erpnext
  • erpnext inc

And given a filter of Customer like. I get the following behaviour;

  • Customer like "" no results
  • Customer like "%" no results
  • Customer like "%next% 3 results
  • Customer like "%%" 3 results

I’d argue that the filter Customer like "%" is not working as one would reasonably expect.

Can you fix it, happy to accept a PR