• 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.

          Form Name

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

            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. 

            Thanks for the context Michal...

            I think our route (looking toward Jira 9.0) will be to either
            (a) re-architect the UI interaction to work more like Jira does, using the version of API that does targeted search direct to Jira (with some server side caching etc)
            (b) ignore the "assignable" element of this, and just populate our server side cache using /rest/user/search (and error handle cases where we pick a user we can't use)
            (c) populate our server side cache of users using /rest/user/search (or some other source of user account info e.g. ldap) and then post process that (as a background task) by making a lot of very specific (and hopefully very quick) calls to /rest/user/assignable API

            So, lots of ways to skin the cat, but you've saved us trawling the API docs in a search for something that doesn't exist (yet)

            Alfa Product Team added a comment - Thanks for the context Michal... I think our route (looking toward Jira 9.0) will be to either (a) re-architect the UI interaction to work more like Jira does, using the version of API that does targeted search direct to Jira (with some server side caching etc) (b) ignore the "assignable" element of this, and just populate our server side cache using /rest/user/search (and error handle cases where we pick a user we can't use) (c) populate our server side cache of users using /rest/user/search (or some other source of user account info e.g. ldap) and then post process that (as a background task) by making a lot of very specific (and hopefully very quick) calls to /rest/user/assignable API So, lots of ways to skin the cat, but you've saved us trawling the API docs in a search for something that doesn't exist (yet)

            At the beginning I'm sorry it turned out like we didn't care, I assure you this is not the case. Changes that impacted this endpoints, and now cause problems for you, was made to provide reliable way of lookups for assignable and mentionable users. Before these changes such operation could cause serious performance problems, for example:

            Our perspective with this endpoints was to improve user pickers and we changed this functionality with them in mind at the first place.

            Can you provide a different way how we can provide the functionality to our users? We have a bunch of integrations that depend on this API

            As f4cb74b5c51b mentioned, 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.

            We don't want that screen to directly interact from the browser to Jira, all our interaction with Jira needs to come from the server side of our application. We also don't want to be doing passthru requests on every key press as a user types in more of the user name (I did ask).

            Referring to f4cb74b5c51b use case, server side integration can work as a proxy for requests even with some caching and other improvements if needed.

            In Jira we also avoid making request on every key press by introduce debouncing mechanism on Jira frontend side since 8.19. User pickers with such mechanism have some short delay before sending requests to get more specific query to make. Maybe it would help in this case as well.

            We will be grateful for any comments if this workarounds can meet your requirements and suggestions if you see any other potential solution we can provide.

            In case current form of workaround and possible solutions were not acceptable for you, we create a feature request for Jira 9.0 to providing other way of obtaining all assignable and/or mentionable users. You can find it here: JRASERVER-73362

            Michał Błajet added a comment - At the beginning I'm sorry it turned out like we didn't care, I assure you this is not the case. Changes that impacted this endpoints, and now cause problems for you, was made to provide reliable way of lookups for assignable and mentionable users. Before these changes such operation could cause serious performance problems, for example: https://jira.atlassian.com/browse/JRASERVER-66816 https://jira.atlassian.com/browse/JRASERVER-61939 https://jira.atlassian.com/browse/JRASERVER-38532 https://jira.atlassian.com/browse/JSWSERVER-20844 https://jira.atlassian.com/browse/JRASERVER-70934 Our perspective with this endpoints was to improve user pickers and we changed this functionality with them in mind at the first place. Can you provide a different way how we can provide the functionality to our users? We have a bunch of integrations that depend on this API As f4cb74b5c51b mentioned, 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. We don't want that screen to directly interact from the browser to Jira, all our interaction with Jira needs to come from the server side of our application. We also don't want to be doing passthru requests on every key press as a user types in more of the user name (I did ask). Referring to f4cb74b5c51b use case, server side integration can work as a proxy for requests even with some caching and other improvements if needed. In Jira we also avoid making request on every key press by introduce debouncing mechanism on Jira frontend side since 8.19. User pickers with such mechanism have some short delay before sending requests to get more specific query to make. Maybe it would help in this case as well. We will be grateful for any comments if this workarounds can meet your requirements and suggestions if you see any other potential solution we can provide. In case current form of workaround and possible solutions were not acceptable for you, we create a feature request for Jira 9.0 to providing other way of obtaining all assignable and/or mentionable users. You can find it here: JRASERVER-73362

            We also have a few integrations that depend on this API. We have use cases where we'd want to return more than 100 users. 

            If the current version is 8.22.0 what is the date for 8.20.7?

            Olivia Krowicka added a comment - We also have a few integrations that depend on this API. We have use cases where we'd want to return more than 100 users.  If the current version is 8.22.0 what is the date for 8.20.7?

            Hiya Shari
            8.20 is the Long Term Support version series, so Atlassian will back port fixes into that (as well as making them in the next full release)
            https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html

            We were hoping they'd be able to get the API working again in 8.20.x as then we'd pick that up as part of our regular application of updates on the LTS version series... but guess we're going to be stuck with our workaround for now (and will need to find something different when we upgrade to the next LTS version and the deprecated API we're now using goes away).

            Alfa Product Team added a comment - Hiya Shari 8.20 is the Long Term Support version series, so Atlassian will back port fixes into that (as well as making them in the next full release) https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html We were hoping they'd be able to get the API working again in 8.20.x as then we'd pick that up as part of our regular application of updates on the LTS version series... but guess we're going to be stuck with our workaround for now (and will need to find something different when we upgrade to the next LTS version and the deprecated API we're now using goes away).

            MichaelB - The latest JS version is 8.22.0, so am confused by your comment yesterday regarding a fix in Jira 8.20.7.  Please advise thanks!

            Shari Barchus added a comment - MichaelB - The latest JS version is 8.22.0, so am confused by your comment yesterday regarding a fix in Jira 8.20.7.  Please advise thanks!

            Alfa Product Team added a comment - - edited

            It is not a huge surprise to us that this was an unintended side effect of an attempt to improve stability of the existing API. These things happen.

            What is surprising is that the response for paying customers who are impacted by the negative side effects of the changes is that we're just told "The documentation will be updated" i.e. tough, we don't care whether it used to support more users, it doesn't any more, we are effectively dropping this API and replacing it with a replacement that has the same name but does something different.

            We have a couple of questions

            1. Can Atlassian provide details of a working API that they will provide continued support for that will allow us to get a list of Jira users, using paging if required, which will covers more than 100 users?
            Our particular use case is we want to know who we can assign new issues too... and as we noted above, we've found a temporary solution, but that API is also on the cards for getting shut down (at least it's been flagged up as being deprecated first though)

            In the short term we have found a workaround by switching over to calling
            rest/api/2/user/permission/search?projectKey=OURPROJECT&startAt=0&maxResults=1000&permissions=ASSIGNABLE_USER
            but that (a) requires a user with project admin access, and (b) is a deprecated API

            Is there another way to get a list of users who can have issues assigned?
            Or do we need to head to /rest/user/search and just cross our fingers about whether they're actually able to be used as the assignee on a particular project?

            2. Can you share with us details of Atlassian's policy with respect to deprecating and making backwards incompatible changes to the API?
            We need to understand what the Enterprise Support we are paying for gets us if it doesn't stretch as far as maintaining the functionality of published APIs.
            And we need to understand whether there is a way we can know which API methods have regression testing cover and can be relied on to work from one version to the next, and which API methods have the potential to break without warning as part of an upgrade.

            Thanks
            Antony Moss
            Alfa Financial Software

            Alfa Product Team added a comment - - edited It is not a huge surprise to us that this was an unintended side effect of an attempt to improve stability of the existing API. These things happen. What is surprising is that the response for paying customers who are impacted by the negative side effects of the changes is that we're just told "The documentation will be updated" i.e. tough, we don't care whether it used to support more users, it doesn't any more, we are effectively dropping this API and replacing it with a replacement that has the same name but does something different . We have a couple of questions 1. Can Atlassian provide details of a working API that they will provide continued support for that will allow us to get a list of Jira users, using paging if required, which will covers more than 100 users? Our particular use case is we want to know who we can assign new issues too... and as we noted above, we've found a temporary solution, but that API is also on the cards for getting shut down (at least it's been flagged up as being deprecated first though) In the short term we have found a workaround by switching over to calling rest/api/2/user/permission/search?projectKey=OURPROJECT&startAt=0&maxResults=1000&permissions=ASSIGNABLE_USER but that (a) requires a user with project admin access, and (b) is a deprecated API Is there another way to get a list of users who can have issues assigned? Or do we need to head to /rest/user/search and just cross our fingers about whether they're actually able to be used as the assignee on a particular project? 2. Can you share with us details of Atlassian's policy with respect to deprecating and making backwards incompatible changes to the API? We need to understand what the Enterprise Support we are paying for gets us if it doesn't stretch as far as maintaining the functionality of published APIs. And we need to understand whether there is a way we can know which API methods have regression testing cover and can be relied on to work from one version to the next, and which API methods have the potential to break without warning as part of an upgrade. Thanks Antony Moss Alfa Financial Software

            Are you saying that the fix for not being able to lookup more than 100 assignable users is to formalize the limit of the first 100 assignable users by removing the {{ startAt }} parameter and changing the documentation so we are not confused? This is not a fix. You are saying there is no way to access more than 100 assignable users. Also any hope of using pagination is going away since you are removing the parameter required to implement pagination.

            If Jira is to be officially limited to 100 users I expect the billing to also only charge for the first 100 users.   

            Mike Madore added a comment - Are you saying that the fix for not being able to lookup more than 100 assignable users is to formalize the limit of the first 100 assignable users by removing the {{ startAt }} parameter and changing the documentation so we are not confused? This is not a fix. You are saying there is no way to access more than 100 assignable users. Also any hope of using pagination is going away since you are removing the parameter required to implement pagination. If Jira is to be officially limited to 100 users I expect the billing to also only charge for the first 100 users.   

            Can you provide an different way how we can provide the functionality to our users? We have a bunch of integrations that depend on this API

            georg.brunmayr added a comment - Can you provide an different way how we can provide the functionality to our users? We have a bunch of integrations that depend on this API

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

                Created:
                Updated:
                Resolved: