Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4799 Widoki

Hi,

is there a way to group by a field in a search view in a case insensitive way?

i.e. grouping "leo" and "Leo" together.

Thanks!

Awatar
Odrzuć
Najlepsza odpowiedź

AFAIK you have to redefine ``read_group`` to fit your needs.

 

 

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Nicolas is right: to do that I have to change read_group. It is a big method with no hooks, so the solution for now has been to copy all of it in my module and add a few lines similar to those the handle dates in the original code.

Date handling in the original is somewhat similar: dates from the same month are grouped together, while I wanted to group together string fields that are equal ignoring case.

That has been refactored in trunk to be hookable.

Thanks!

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
maj 24
1749
1
lip 21
2727
0
kwi 16
4254
1
maj 15
3934
0
sty 25
2422