Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-65089

User search startAt parameter is not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 8.7.0, 8.6.1
    • 6.4.10, 7.2.7, 7.4.0, 7.3.3, 7.10.0, 7.9.2, 8.2.2, 7.13.9, 8.5.0, 8.5.3, 8.5.5
    • REST API

      Summary

      The user search result is truncated to the first 1000 users on the instance. For example: with parameters &startAt=0&maxResults=1000 we get the first 1,000 users but setting &startAt=1001 results in no users being returned. Using startAt=600, we only have 400 users returned.

      Environment

      • JIRA 7.3.3 or latest

      Steps to Reproduce

      1. Create 1,300 user in JIRA
      2. Send a GET HTTP request to the endpoint <JIRA-Base-URL>/rest/api/2/user/search?username=.&includeInactive=false&startAt=1001&maxResults=1000

      Expected Results

      Return user 1001-1300 in the list

      Actual Results

      No users are returned.

      Workaround

      If you exclusively require the use of REST API

      You may stream users in batches based on a wildcard search for the string provided. For example, the following call will return the following test elements:

      https://HOST/rest/api/latest/user/search?username='123'&startAt=1&endAt=10&maxResults=10&order=key&includeInactive=true

      1. email= test123@gmail.com or email= 123email@gmail.com
      2. username = ab123 or username= 123ab
      3. displayname = ab123 or displayname= 123ab

      If any of those have more than 1000 results, search for 'aa', 'ab', etc...

      If it's feasible to query the database

      You may retrieve similar information by querying the cwd_user table in JIRA's database.

              drauf Daniel Rauf
              vkharisma vkharisma (Inactive)
              Votes:
              56 Vote for this issue
              Watchers:
              76 Start watching this issue

                Created:
                Updated:
                Resolved: