• 8.19
    • 17
    • Severity 3 - Minor
    • 98
    • Hide
      Atlassian Update – 29 Mar 2022

      Hi everyone,

      as the tweak for affected endpoints have been released, we also create a feature request you can find here: https://jira.atlassian.com/browse/JRASERVER-73362 to vote for creating new way to obtain all assignable users for given project.

      For now please to check-out the Alternatives section in the issue description to find out what are possible solutions to cover use cases mentioned in this issue.

      Thank you,
      Michał Błajet
      Jira Developer

      Show
      Atlassian Update – 29 Mar 2022 Hi everyone, as the tweak for affected endpoints have been released, we also create a feature request you can find here: https://jira.atlassian.com/browse/JRASERVER-73362 to vote for creating new way to obtain all assignable users for given project. For now please to check-out the Alternatives section in the issue description to find out what are possible solutions to cover use cases mentioned in this issue. Thank you, Michał Błajet Jira Developer

      Issue Summary

      Running any of the user assignable searches API will return results inconsistent with expectations

      1)

      /rest/user/assignable/multiProjectSearch

      startAt=1000 and maxResults=1000 does not show results post 1000 records. The output is empty

      2) 

      /rest/user/assignable/search

      startAt=1000 and maxResults=1000 does not show results post 1000 records. The output is empty

      Steps to Reproduce

      1. Create around 2000 users using the Data Generator plugin
      2. Add these users to a project under users and roles
      3. This API will produce 1000 results
      4. This API will produce 0 results
      5. The results after 1000 records are not produced.

      Expected Results

      API calls to /rest/user/assignable/multiProjectSearch return all results using the:
      startAt=0 and maxResults=1000
      startAt=1000 and maxResults=1000
      startAt=2000 and maxResults=1000 and so on

      Actual Results

      • maxResults appears to be ignored and only the default number of results is returned (either 1000 or 100 results).
      • The API call /rest/user/assignable/multiProjectSearch with startAt=1000 and maxResults=2000 does not show results

      Note: The same behavior is observed when making a request to /rest/user/search (the behavior is not limited to rest/user/assignable)

      Workaround

      Currently, there is no known workaround for this behavior, i.e. to fetch more than 1000 users.

       

      Steps to Reproduce 2

      1. Create around 2000 users using the Data Generator plugin
      2. Add these users to a project under users and roles
      3. This API will produce 1000 results
      4. This API will produce the same 0 results
      5. The results after 1000 records are not produced.

      Expected Results

      API calls to /rest/user/assignable/search return all results using the:

      startAt=0 and maxResults=1000
      startAt=1000 and maxResults=1000
      startAt=2000 and maxResults=1000 and so on

      Actual Results

      The API call /rest/user/assignable/search with startAt=1000 and maxResults=2000 does not show results

       

      Workaround

      There is workaround for use cases that have a large amount of users but do not need everyone in the list only a smaller subset.

      This leverages the "Assignable User" permission for the given project(s).

      You can create a separate group(s), that has a small subset of specific that really need to be the only assignable users on the project(s)

      Then change the "Assignable User" permission for the project(s) so that it is restricted to the new smaller group(s) only.

      Retry the rest endpoint and you will get the desired results of the smaller subset of users.

      Ensure that when you call the endpoint you pass in only the project key and this permission will be checked.

       Alternatives

      There is a rest endpoint rest/api/2/user/permission/search that allows you do exactly what user/assignable/search and user/assignable/multiProjectSearch does but with working pagination. The cons of this endpoint are
      1) it require admin permission
      2) it can cause some performance issues like user/assignable/search and user/assignable/multiProjectSearch does before our changes

      This endpoint is deprecated because of performance issues and will be deleted any time in Jira 9.x, but no specific version has been given yet. However, it will remain in Jira 8.x.

      Since Jira user pickers for assignable and mentionable users was improved, other possible solution may be delegating such integration directly to Jira. It also avoids redoing the searches Jira did to return all users. Server side integration can work as a proxy for requests even with some caching and other improvements if needed.

            [JSWSERVER-21156] API: Limited results with API GET request(1000 or 100)

            Tiziana Marchionni made changes -
            Remote Link Original: This issue links to "UCACHE-176 (Bulldog)" [ 600827 ] New: This issue links to "UCACHE-176 (JIRA Server (Bulldog))" [ 600827 ]
            Mihaela Lita made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 747544 ]
            Michał Błajet made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 719165 ]

            In case anyone else is having this problem. It seems once we upgraded from 8.20.6 to 8.20.10 (which includes this fix) the Micro Focus ALM Synchronizer plugin what synchronizes with Jira is broken for us. I have a call logged with Atlassian and ALM to look into this. Adding here for visibility in case others have the same issue and to see if they have any workaround. I've already tried limiting the assignable users on the project but that didn't work. 

            Gaj Umapathy added a comment - In case anyone else is having this problem. It seems once we upgraded from 8.20.6 to 8.20.10 (which includes this fix) the Micro Focus ALM Synchronizer plugin what synchronizes with Jira is broken for us. I have a call logged with Atlassian and ALM to look into this. Adding here for visibility in case others have the same issue and to see if they have any workaround. I've already tried limiting the assignable users on the project but that didn't work. 

            Also, Activision Blizzard King (ABK) is affected by this ticket. Here is the support ticket: https://getsupport.atlassian.com/browse/PS-92671 This ticket is confusing because the Fix Version is 8.20.7 however that is what they just upgraded to when the problem starting happening to them. 

            Suzanne Seaton (Inactive) added a comment - Also, Activision Blizzard King (ABK) is affected by this ticket. Here is the support ticket: https://getsupport.atlassian.com/browse/PS-92671 This ticket is confusing because the Fix Version is 8.20.7 however that is what they just upgraded to when the problem starting happening to them. 
            Jarrod Price (Inactive) made changes -
            Remote Link New: This issue links to "Wiki Page (Atlassian Documentation)" [ 630812 ]
            Michał Błajet made changes -
            Description Original: h3. Issue Summary

            Running any of the user assignable searches API will return results inconsistent with expectations

            1)

            /rest/user/assignable/multiProjectSearch

            startAt=1000 and maxResults=1000 does not show results post 1000 records. The output is empty

            2) 

            /rest/user/assignable/search

            startAt=1000 and maxResults=1000 does not show results post 1000 records. The output is empty
            h3. Steps to Reproduce
             # Create around 2000 users using the Data Generator plugin
             # Add these users to a project under users and roles
             # This API will produce 1000 results
             -- [http://localhost:8080/rest/api/2/user/assignable/multiProjectSearch?projectKeys=TEST&startAt=0&maxResults=1000&expand=changelog]
             # This API will produce 0 results
             -- [http://localhost:8080/rest/api/2/user/assignable/multiProjectSearch?projectKeys=TEST&startAt=1000&maxResults=1000&expand=changelog]
             # The results after 1000 records are not produced.

            h3. Expected Results

            API calls to /rest/user/assignable/multiProjectSearch return all results using the:
            startAt=0 and maxResults=1000
            startAt=1000 and maxResults=1000
            startAt=2000 and maxResults=1000 and so on
            h3. Actual Results
            * maxResults appears to be ignored and only the default number of results is returned (either 1000 or 100 results).
            * The API call /rest/user/assignable/multiProjectSearch with startAt=1000 and maxResults=2000 does not show results

            *Note:* The same behavior is observed when making a request to /rest/user/search (the behavior is not limited to rest/user/assignable)

            h3. Workaround

            Currently, there is no known workaround for this behavior, i.e. to fetch more than 1000 users.

             

            *Steps to Reproduce 2*
             # Create around 2000 users using the Data Generator plugin
             # Add these users to a project under users and roles
             # This API will produce 1000 results
             -- [http://localhost:8080/rest/api/2/user/assignable/search?projectKeys=TEST&startAt=0&maxResults=1000|http://localhost:8080/rest/api/2/user/assignable/multiProjectSearch?projectKeys=TEST&startAt=0&maxResults=1000&expand=changelog]
             # This API will produce the same 0 results
             -- [http://localhost:8080/rest/api/2/user/assignable/search?projectKeys=TEST&startAt=1000&maxResults=1000|http://localhost:8080/rest/api/2/user/assignable/multiProjectSearch?projectKeys=TEST&startAt=0&maxResults=1000&expand=changelog]
             # The results after 1000 records are not produced.

            h3. Expected Results

            API calls to /rest/user/assignable/search return all results using the:

            startAt=0 and maxResults=1000
            startAt=1000 and maxResults=1000
            startAt=2000 and maxResults=1000 and so on
            h3. Actual Results

            The API call /rest/user/assignable/search with startAt=1000 and maxResults=2000 does not show results

             

            Workaround

            There is workaround for use cases that have a large amount of users but do not need everyone in the list only a smaller subset.

            This leverages the "Assignable User" permission for the given project(s).

            You can create a separate group(s), that has a small subset of specific that really need to be the only assignable users on the project(s)

            Then change the "Assignable User" permission for the project(s) so that it is restricted to the new smaller group(s) only.

            Retry the rest endpoint and you will get the desired results of the smaller subset of users.

            Ensure that when you call the endpoint you pass in only the project key and this permission will be checked.
            New: h3. Issue Summary

            Running any of the user assignable searches API will return results inconsistent with expectations

            1)

            /rest/user/assignable/multiProjectSearch

            startAt=1000 and maxResults=1000 does not show results post 1000 records. The output is empty

            2) 

            /rest/user/assignable/search

            startAt=1000 and maxResults=1000 does not show results post 1000 records. The output is empty
            h3. Steps to Reproduce
             # Create around 2000 users using the Data Generator plugin
             # Add these users to a project under users and roles
             # This API will produce 1000 results
             -- [http://localhost:8080/rest/api/2/user/assignable/multiProjectSearch?projectKeys=TEST&startAt=0&maxResults=1000&expand=changelog]
             # This API will produce 0 results
             -- [http://localhost:8080/rest/api/2/user/assignable/multiProjectSearch?projectKeys=TEST&startAt=1000&maxResults=1000&expand=changelog]
             # The results after 1000 records are not produced.

            h3. Expected Results

            API calls to /rest/user/assignable/multiProjectSearch return all results using the:
            startAt=0 and maxResults=1000
            startAt=1000 and maxResults=1000
            startAt=2000 and maxResults=1000 and so on
            h3. Actual Results
             * maxResults appears to be ignored and only the default number of results is returned (either 1000 or 100 results).
             * The API call /rest/user/assignable/multiProjectSearch with startAt=1000 and maxResults=2000 does not show results

            *Note:* The same behavior is observed when making a request to /rest/user/search (the behavior is not limited to rest/user/assignable)
            h3. Workaround

            Currently, there is no known workaround for this behavior, i.e. to fetch more than 1000 users.

             

            *Steps to Reproduce 2*
             # Create around 2000 users using the Data Generator plugin
             # Add these users to a project under users and roles
             # This API will produce 1000 results
             -- [http://localhost:8080/rest/api/2/user/assignable/search?projectKeys=TEST&startAt=0&maxResults=1000|http://localhost:8080/rest/api/2/user/assignable/multiProjectSearch?projectKeys=TEST&startAt=0&maxResults=1000&expand=changelog]
             # This API will produce the same 0 results
             -- [http://localhost:8080/rest/api/2/user/assignable/search?projectKeys=TEST&startAt=1000&maxResults=1000|http://localhost:8080/rest/api/2/user/assignable/multiProjectSearch?projectKeys=TEST&startAt=0&maxResults=1000&expand=changelog]
             # The results after 1000 records are not produced.

            h3. Expected Results

            API calls to /rest/user/assignable/search return all results using the:

            startAt=0 and maxResults=1000
            startAt=1000 and maxResults=1000
            startAt=2000 and maxResults=1000 and so on
            h3. Actual Results

            The API call /rest/user/assignable/search with startAt=1000 and maxResults=2000 does not show results

             

            Workaround

            There is workaround for use cases that have a large amount of users but do not need everyone in the list only a smaller subset.

            This leverages the "Assignable User" permission for the given project(s).

            You can create a separate group(s), that has a small subset of specific that really need to be the only assignable users on the project(s)

            Then change the "Assignable User" permission for the project(s) so that it is restricted to the new smaller group(s) only.

            Retry the rest endpoint and you will get the desired results of the smaller subset of users.

            Ensure that when you call the endpoint you pass in only the project key and this permission will be checked.

            h3. Alternatives
            There is a rest endpoint rest/api/2/user/permission/search that allows you do exactly what user/assignable/search and user/assignable/multiProjectSearch does but with working pagination. The cons of this endpoint are
            1) it require admin permission
            2) it can cause some performance issues like user/assignable/search and user/assignable/multiProjectSearch does before our changes

            This endpoint is deprecated because of performance issues and will be deleted any time in Jira 9.x, but no specific version has been given yet. However, it will remain in Jira 8.x.

            Since Jira user pickers for assignable and mentionable users was improved, other possible solution may be delegating such integration directly to Jira. It also avoids redoing the searches Jira did to return all users. Server side integration can work as a proxy for requests even with some caching and other improvements if needed.
            Michał Błajet made changes -
            Fix Version/s New: 8.20.7 [ 99497 ]
            Michał Błajet made changes -
            Resolution New: Done [ 17 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Michał Błajet made changes -
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]

              cb173a7ca7c0 Michał Błajet
              f956e0e022e9 skavatekar
              Affected customers:
              28 This affects my team
              Watchers:
              55 Start watching this issue

                Created:
                Updated:
                Resolved: