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

REST API: Enable to change the state of ReleaseVehicles with a PUT call

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 10.104.0
    • 10.101.2
    • REST API
    • 1
    • Severity 2 - Major
    • No

    Description

      Issue Summary

      Attempts to change the status of a ReleaseVehicle (for example from Launched to Closed) using a PUT request result in the following error:

      Cannot update Release Vehicle with id XXX. lastUpdatedDate cannot be set when status is set to 4.

      Steps to Reproduce

      1. Issue a GET call https://<host>/rest/align/api/2/releasevehicles/184 and copy the returned json response; for example:
        {
            "id": 184,
            "name": "ReleaseVTest4",
            "shipDate": "2021-11-25T00:00:00Z",
            "releaseId": 275,
            "startDate": "2021-10-12T00:00:00Z",
            "health": 4,
            "externalId": null,
            "goLiveDate": "2021-11-25T00:00:00Z",
            "connectorId": null,
            "ownerId": "661802",
            "jiraProjectKey": null,
            "status": 3,
            "closedDate": null,
            "type": 3,
            "createDate": "2021-11-12T06:00:49Z",
            "externalProjectId": null,
            "lastUpdatedDate": "2021-11-12T11:02:34Z",
            "isTimeTrackingOnly": 0,
            "teamIds": [],
            "programIds": [],
            "self": "https://<host>/rest/align/api/2/releasevehicles/184"
        }
        
      2. Issue a PUT call to https://<host>/rest/align/api/2/releasevehicles/184 using the json body modified with the new status and health values ("status":4 and "health":1) like below:
        {
            "name": "ReleaseVTest4",
            "shipDate": "2021-11-25T00:00:00Z",
            "releaseId": 275,
            "startDate": "2021-10-12T00:00:00Z",
            "health": 1,
            "externalId": null,
            "goLiveDate": "2021-11-25T00:00:00Z",
            "connectorId": null,
            "ownerId": "661802",
            "jiraProjectKey": null,
            "status": 4,
            "closedDate": null,
            "type": 3,
            "createDate": "2021-11-12T06:00:49Z",
            "externalProjectId": null,
            "lastUpdatedDate": "2021-11-12T10:59:24Z",
            "isTimeTrackingOnly": 0,
            "teamIds": [],
            "programIds": []
        }
        

        Expected Results

        The PUT is successful and the status is changed accordingly.

        Actual Results

        The following error is thrown:

        "Cannot update Release Vehicle with id 184. lastUpdatedDate cannot be set when status is set to 4."

      Workaround

      Currently there is no known workaround for this behavior using the PUT method. A workaround will be added here when available.

      If you have the ability to use the PATCH method instead of the PUT, here is an example of the json body to change the status from Launched to Closed.

      [
          {
              "op": "replace",
              "path": "/status",
              "value": 4
          },
          {
              "op": "replace",
              "path": "/health",
              "value": 1
          }
      ]
         

      Attachments

        Issue Links

          Activity

            People

              njones3@atlassian.com Nathan Jones (Inactive)
              646db21d89d1 Francois Panaget
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync