Uploaded image for project: 'Jira Align'
  1. Jira Align
  2. JIRAALIGN-4150

Irrelevant error message when wrong data type was passed while running PUT request on Releases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.109.0
    • 10.107.3
    • REST API
    • 1
    • Severity 3 - Minor
    • No

      Issue Summary

      Irrelevant error message while wrong data type was running for PUT request on Releases. The filed lastUpdatedBy has a data type of String(value within " "). However, if you enter the value as an integer(value without " "), an error message is thrown that is irrelevant:

      Error message: "Cannot update release with id 3. Value for releaseId is invalid."

      The field releaseId does not even exist for Releases.

      Steps to Reproduce

      Run the below curl PUT request to edit the whole Release:

      curl -X PUT "https://XXXXXXX.jiraalign.com/rest/align/api/2/Releases/8" -H "accept: */*" -H "Authorization: bearer XXXXXXXXXX" -H "Content-Type: application/json;odata.metadata=minimal;odata.streaming=true" -d "{ \"id\": 8, \"title\": \"putTest22\", \"shortName\": \"putT\", \"type\": 1, \"status\": 2, \"description\": \"description\", \"startDate\": \"2019-01-18T00:00:00Z\", \"endDate\": \"2020-12-27T00:00:00Z\", \"lastUpdatedBy\": 11, \"testSuite\": 1, \"releaseNumber\": \"TR-Rel\", \"portfolioId\": 7, \"createDate\": \"2021-01-12T13:53:52Z\", \"lastUpdatedDate\": null, \"scheduleType\": 2, \"roadmap\": 1, \"budget\": 0, \"predecessorId\": null, \"health\": 4, \"score1\": null, \"score2\": null, \"score3\": null, \"score4\": null, \"blendedHourlyRate\": 40, \"divisionId\": null, \"programIds\": [ 8 ], \"anchorSprintIds\": [ 89, 90, 91, 92, 93, 94 ], \"self\": \"https://XXXXXX.jiraalign.com/rest/align/api/2/releases/8\" },"
      

      Expected Results

      The error thrown should say that the data type for lastUpdatedBy should be String and the value within the " ".

      Actual Results

      The following error message is thrown
      Error message: "Cannot update release with id 3. Value for releaseId is invalid."

      The field releaseId does not even exist for Releases and does not show any indication to lastUpdatedBy field.

      Workaround

      The correct PUT request will be where lastUpdatedBy value is a String, hence, within " ":

      curl -X PUT "https://XXXXXX.jiraalign.com/rest/align/api/2/Releases/8" -H "accept: */*" -H "Authorization: bearer XXXXXXXXXX" -H "Content-Type: application/json;odata.metadata=minimal;odata.streaming=true" -d "{ \"id\": 8, \"title\": \"putTest22\", \"shortName\": \"putT\", \"type\": 1, \"status\": 2, \"description\": \"description\", \"startDate\": \"2019-01-18T00:00:00Z\", \"endDate\": \"2020-12-27T00:00:00Z\", \"lastUpdatedBy\": \"11\", \"testSuite\": 1, \"releaseNumber\": \"TR-Rel\", \"portfolioId\": 7, \"createDate\": \"2021-01-12T13:53:52Z\", \"lastUpdatedDate\": null, \"scheduleType\": 2, \"roadmap\": 1, \"budget\": 0, \"predecessorId\": null, \"health\": 4, \"score1\": null, \"score2\": null, \"score3\": null, \"score4\": null, \"blendedHourlyRate\": 40, \"divisionId\": null, \"programIds\": [ 8 ], \"anchorSprintIds\": [ 89, 90, 91, 92, 93, 94 ], \"self\": \"https://XXXXXXX.jiraalign.com/rest/align/api/2/releases/8\" },"
      

              kforeman@atlassian.com Kyle Foreman
              spasha@atlassian.com Syed Parveez Pasha
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: