Uploaded image for project: 'Atlassian Intelligence'
  1. Atlassian Intelligence
  2. AI-1109

User picker APIs not returning matches for middle part of display name

    • Minor

      Issue Summary

      It is common for users to enter the middle part of a name and expect user pickers to return results. This is the case when matching on email addresses, but not display names.

      Steps to Reproduce

      1. Create an app that calls the /rest/api/3/groupuserpicker endpoint.
      2. Ensure a user exists with:
        1. Display name: "Foo Bar"
        2. email address: fbar@example.com
      3. Have the app call the endpoint with ?query=fo and observe the results.
      4. Have the app call the endpoint with ?query=ex and observe the results.
      5. Have the app call the endpoint with ?query=oo and observe the results.

      Expected Results

      At steps 3, 4, and 5, the user is returned in the results.

      Actual Results

      At steps 3 and 4, the user is returned in the results, but at step 5, not the user is not returned in the results.

      Workaround

      None

      Context

      See https://community.developer.atlassian.com/t/how-to-query-users-by-a-string-matching-middle-part-of-the-displayname/44973.

            [AI-1109] User picker APIs not returning matches for middle part of display name

            Sree Hari added a comment -

            See my previous comment 

            Sree Hari added a comment - See my previous comment 

            Sree Hari added a comment - - edited

            User search experiences such as `groupuserpicker` only support search by a prefix. To be precise a prefix of any word in the name should match. So, in the example of `Foo Bar`, both `fo`(prefix of `Foo`) and `ba` (prefix of `Bar`) should match, but not a `oo` or `ar`.

            This part about prefix match is documented in other user search APIs like assignable search The string can match the prefix of the attribute's value.` (Source : https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-assignable-search-get).

            Limited but unsupported partial match on email is available due to the absence of username searching since privacy controls were provided.

            So, in summary, this is not a bug, but that's how its expected to work. We agree that we could improve the API documentation of `groupuserpicker` to make it explicit to avoid any confusion.

            Sree Hari added a comment - - edited User search experiences such as `groupuserpicker` only support search by a prefix. To be precise a prefix of any word in the name should match. So, in the example of `Foo Bar`, both `fo`(prefix of `Foo`) and `ba` (prefix of `Bar`) should match, but not a `oo` or `ar`. This part about prefix match is documented in other user search APIs like assignable search The string can match the prefix of the attribute's value. ` (Source : https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-assignable-search-get ). Limited but unsupported partial match on email is available due to the absence of username searching since privacy controls were provided. So, in summary, this is not a bug, but that's how its expected to work. We agree that we could improve the API documentation of `groupuserpicker` to make it explicit to avoid any confusion.

              shari3 Sree Hari
              dmorrow@atlassian.com Dugald Morrow
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: