← Back to team overview

mahara-contributors team mailing list archive

[Bug 1612481] Re: "Exact user search" doesn't work intuitively with names containing spaces

 

Hm, just realize that I accidentally used "||" as both concatenation and
OR in the above SQL snippet. What I meant to say was that if you wanted
to compare the entire search query against the firstname, lastname, and
a concatenation of them both (in both orders to account for
internationalization), it'd be something like this:

u.firstname = <query>
OR u.lastname = <query>
OR u.lastname || ' ' || u.firstname = <query>
OR u.firstname || ' ' || u.lastname = <query>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1612481

Title:
  "Exact user search" doesn't work intuitively with names containing
  spaces

Status in Mahara:
  Confirmed

Bug description:
  Steps to replicate:

  Make sure that the setting "Exact user searches" set to Yes on
  admin/extensions/pluginconfig.php?plugintype=search&pluginname=internal

  Create a user with multi word lastname, e.g Bla Bla Bla
  Navigate to /admin/users/search.php
  Type this in search form:

   Bla Bla Bla

  Expected result: User is in the search results, because you've typed their exact last name.
  Actual result: User is not in the search results

  Workaround: Enclose the firstname and/or lastname *by itself* in
  double quotes. e.g., for the user Aaron von Wells, search for:

    Aaron "von Wells"

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1612481/+subscriptions


References