Patching a Capability via API with a hypothesis over 250 characters fails

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 11.9.1
    • Component/s: Capabilities

      Issue Summary

      When attempting to patch a Capability via API with a Hypothesis containing more than 250 characters, the request fails with a 400 Error. The UI, however, allows Hypotheses to exceed this character limit without any errors, leading to inconsistent behavior between the API and UI.

      Steps to Reproduce

      1. Create a PATCH Call on /rest/align/api/2/Capabilities/[CapabilityID] by using a payload with a hypothesis field exceeding 250 characters:

      [
        {
          "value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer euismod, eros non laoreet malesuada, nunc felis dictum magna, et convallis est odio ut velit. Curabitur scelerisque, nisl a facilisis ultrices, nunc lacus commodo sapien, ac dapibus er MORE THAN 250 CHARACTERS",
          "path": "hypothesis",
          "op": "replace"
        }
      ]
      

      2. Execute the API request using Jira Align Swagger, Postman, Curl, or any API client.

      Expected Results

      The API should allow updating Capabilities with Hypotheses longer than 250 characters, matching the behavior observed in the UI.

      Actual Results

      • API call fails when attempting to patch a Capability with a Hypothesis exceeding 250 characters.
      • Error message received:
        Code 400 - Error: response status is 400
        Cannot update capability with id [ID]. hypothesis must be between 0 and 250 characters.
        

      Workaround

      • Update the Capability Hypothesis using the Jira Align UI, which does not enforce the 250-character limit.
      • Reduce the Hypothesis length to 250 characters or less before attempting to patch via API.

            Assignee:
            Yannick Genin
            Reporter:
            Rodrigo San Vicente
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: