Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-36291

Unable to sort by columns returned by /rest/api/2/field endpoint.

    XMLWordPrintable

Details

    Description

      i've got JIRA fields information from this rest endpoint : /rest/api/2/field . this is what i get for affects version/s

      {
          "id": "versions",
          "name": "Affects Version/s",
          "custom": false,
          "orderable": true,
          "navigable": true,
          "searchable": true,
          "schema": {
              "type": "array",
              "items": "version",
              "system": "versions"
          }
      }
      

      i need the column name for applying sorting on it but none of these jql is valid

      status = open ORDER BY "Affects Version/s" ASC
      status = open ORDER BY versions ASC

      the one that does work is
      status = open ORDER BY affectedVersion ASC
      but affectedVersion is not something returned by field endpoint

      Same for security level, provided by rest:

      {
          "id": "security",
          "name": "Security Level",
          "custom": false,
          "orderable": true,
          "navigable": true,
          "searchable": true,
          "schema": {
              "type": "securitylevel",
              "system": "security"
          }
      }
      

      But for sorting, actually we need to sort on level , something like :
      status = open ORDER BY level

      Attachments

        Issue Links

          Activity

            People

              kpham Khoa Pham
              ndang Nguyen Dang
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: