Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-78553

The Create Issue V3 API increments the project pcounter when it fails with CONTENT_LIMIT_EXCEEDED

    XMLWordPrintable

Details

    Description

      Issue Summary

      When using the Create Issue V3 Rest API, if you provide a description greater than 32767 characters, the API call will fail with the following error:

      {
          "errorMessages": [
              "CONTENT_LIMIT_EXCEEDED"
          ],
          "errors": {}
      }
      

      Despite the error, it will increase the project's pcounter (current issue number), impacting on the number of the next created tickets.

      Steps to Reproduce

      1. Make an API call to the Create Issue V3 endpoint: /rest/api/3/issue
      2. Make sure the description used has more than 32767 characters
      3. After the failure, create a ticket via the UI and check if the ticket number is sequential

      Expected Results

      Error 400 - Bad Request
      API fails and project's pcounter not incremented.

      Actual Results

      Error 400 - Bad Request
      API fails and project's pcounter is being incremented.

      Additional notes

      The Issue ID will also be incremented alongside the pcounter

      Workaround

      • Add a treatment on the description to limit it to 32767 characters before making the API call
      • Or use the Create Issue V2 Rest API: /rest/api/2/issue. It doesn't cause the issue.
      Update 22 March 2022

      The incrementation of the pcounter is not limited to the description limit. Any 400 received from this endpoint can result in the issue counter being incremented.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              64c8f1937384 André Sinatora
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: