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

API 2.0: DTO fields not always set in JSON response for Objectives/Milestones endpoint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.120.0
    • 10.117.2
    • REST API
    • 1
    • Severity 3 - Minor
    • No

      Issue Summary

      When making a GET request to the Objectives/Milestones API 2.0 endpoint we see that some of the fields are not returned if no value is set.
      For example, we see always see, in the JSON response, the field "featureIds" even if no features were associated with the Objective/Milestone.
      This is not true for the "epicIds" field. It is only returned, in the JSON response, if there is at least one Epic specified in the Objective/Milestone.
      According to the 'MilestoneDto', the 'EpicIds' should be part of the JSON response.

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Create Portfolio Objectives and fill in all the required fields.
      2. Issue a GET call to the Objectives/Milestones API 2.0 endpoint

      Expected Results

      All the fields of the dto schema are output in the JSON response.
      For example, the "epicIds" field is returned, in the JSON response

      {
          "id": 1011,
          "tier": 4,
          "programId": null,
          "type": 1,
          "isBlocked": 0,
          "ownerId": "661802",
          "createDate": "2023-03-07T00:00:00Z",
          "name": "TestObjAPI2",
          "description": "TestObjAPI2",
          "status": 8,
          "notes": null,
          "startInitiationDate": null,
          "endDate": null,
          "category": 1,
          "targetSyncSprintId": null,
          "plannedValue": null,
          "themeId": null,
          "deliveredValue": null,
          "blockedReason": null,
          "lastUpdatedDate": "2023-03-07T11:13:44Z",
          "lastUpdatedBy": "661802",
          "targetCompletionDate": null,
          "portfolioAskDate": null,
          "health": null,
          "parentId": null,
          "score": null,
          "portfolioId": 125,
          "goalId": null,
          "solutionId": null,
          "notificationStartDate": null,
          "notificationFrequency": null,
          "reference": null,
          "programIds": [
              413,
             [...]
              1111,
              1179
          ],
          "releaseIds": [],
          "epicIds": [],
          "featureIds": [],
          "impedimentIds": [],
          "riskIds": [],
          "dependencyIds": [],
          "customFields": [
              {
                  "customfield_91036": null
              },
              {
                  "customfield_91039": []
              },
              {
                  "customfield_91033": null
              },
              {
                  "customfield_91035": null
              }
          ],
          "teamIds": [],
          "links": [],
          "self": "https://<itename>.jiraalign.com/rest/align/api/2/milestones/1011"
      }
      

      Actual Results

      The "epicIds" field is not returned, in the JSON response, while the one for the "featureIds" is, as shown below:

      {
          "id": 1011,
          "tier": 4,
          "programId": null,
          "type": 1,
          "isBlocked": 0,
          "ownerId": "661802",
          "createDate": "2023-03-07T00:00:00Z",
          "name": "TestObjAPI2",
          "description": "TestObjAPI2",
          "status": 8,
          "notes": null,
          "startInitiationDate": null,
          "endDate": null,
          "category": 1,
          "targetSyncSprintId": null,
          "plannedValue": null,
          "themeId": null,
          "deliveredValue": null,
          "blockedReason": null,
          "lastUpdatedDate": "2023-03-07T11:13:44Z",
          "lastUpdatedBy": "661802",
          "targetCompletionDate": null,
          "portfolioAskDate": null,
          "health": null,
          "parentId": null,
          "score": null,
          "portfolioId": 125,
          "goalId": null,
          "solutionId": null,
          "notificationStartDate": null,
          "notificationFrequency": null,
          "reference": null,
          "programIds": [
              413,
             [...]
              1111,
              1179
          ],
          "releaseIds": [],
          "featureIds": [],
          "impedimentIds": [],
          "riskIds": [],
          "dependencyIds": [],
          "customFields": [
              {
                  "customfield_91036": null
              },
              {
                  "customfield_91039": []
              },
              {
                  "customfield_91033": null
              },
              {
                  "customfield_91035": null
              }
          ],
          "teamIds": [],
          "links": [],
          "self": "https://<itename>.jiraalign.com/rest/align/api/2/milestones/1011"
      }
      

      Workaround

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

              csmith1@atlassian.com Cap Smith
              646db21d89d1 Francois Panaget
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: