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

Setting jira.search.views.default.max to -1 breaks maxResults parameter in JIRA rest api's rest/api/2/search

    XMLWordPrintable

Details

    Description

      steps to reproduce

      expected results

      • Only one issue as specified in maxResults=1 is returned

      actual results

      • All the results matching the filter query are returned.
      • Examining the returned JSON object you can see that maxResults value is registered as maxResults=2147483647 instead of 1 which was sent in the request.

      other notes

      • setting jira.search.views.default.max to an actual limit (lower than or equal to the value of jira.search.views.max.limit ) e.g. 1000 or removing it's setting entirely actually resolves the problem. (This can be used as a workaround)
      • According to documentation, jira.search.views.default.max is defined as a default soft limit for maximum number of issues to be retrieved, it seems to be acting like a hard limit on the number of issues returned here. Note that even when maxResults is lower than the configured jira.search.views.default.max, it is still ignored.

      Attachments

        Issue Links

          Activity

            People

              fchan@atlassian.com Ferd
              takindele Taiwo Akindele (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: