Skip to content

Commit

Permalink
Merge pull request #14276 from opf/fix/43856/lastname-first-name-filter
Browse files Browse the repository at this point in the history
Fix filter order when using lastname, firstname
  • Loading branch information
aaron-contreras committed Nov 29, 2023
2 parents c4b0fd1 + 02b111c commit 1741f3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/queries/filters/shared/user_name_filter.rb
Expand Up @@ -67,11 +67,11 @@ def sql_value

def sql_concat_name
case Setting.user_format
when :firstname_lastname, :lastname_coma_firstname
when :firstname_lastname
"LOWER(CONCAT(users.firstname, CONCAT(' ', users.lastname)))"
when :firstname
'LOWER(users.firstname)'
when :lastname_firstname
when :lastname_firstname, :lastname_coma_firstname
"LOWER(CONCAT(users.lastname, CONCAT(' ', users.firstname)))"
when :lastname_n_firstname
"LOWER(CONCAT(users.lastname, users.firstname))"
Expand Down

0 comments on commit 1741f3d

Please sign in to comment.