POST and PATCH API Calls Fail for Objectives if teamId property is not included

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: High
    • 10.97.2
    • Affects Version/s: 10.96
    • Component/s: REST API

      Issue Summary

      When trying to create an Objective with Target Sync Sprint and release through an API call it fails if the teamId property is not included.

      Steps to Reproduce

      1. The following is an example of an API call to create a New Objective:
        POST https://xyz.jiraalign.xyz/rest/align/api/2/Objectives

      With the following JSON

       

      {   
      "tier": 4,    
      "programId": null,    
      "type": 1,    
      "blocked": 0,    
      "ownerId": "184214",    
      "name": "Test User",    
      "description": "Test",    
      "status": 7,    
      "notes": null,    
      "startDate": "2021-07-23T00:00:00Z",    
      "endDate": "2022-06-23T00:00:00Z",    
      "category": 1,    
      "targetSyncSprintId": 1626,    
      "plannedValue": null,    
      "themeId": 0,    
      "deliveredValue": null,    
      "blockedReason": null,    
      "targetDate": "2021-08-23T00:00:00Z",    
      "estimateDate": "2021-06-23T00:00:00Z",    
      "health": 0,    
      "parentId": null,    
      "score": null,    
      "portfolioId": 629,    
      "yearlyGoal": null,    
      "solutionId": null,    
      "notificationStartDate": null,    
      "notificationFrequency": null,    
      "reference": null,    
      "programIds": [        788    ],    
      "releaseIds": [        676    ]
      }
      

       

      Expected Results

      Objective is created successfully

      Actual Results

      Error: Cannot create milestone. Value cannot be null. (Parameter 'source')

      Workaround

      Include the teamIds property in the body of the call, or use the same API call but with no Target Sync Sprint and no Release.

      {
        "tier": 4,
        "programId": null,
        "type": 1,
        "blocked": 0,
        "ownerId": "184214",
        "name": "Test",
        "description": "Test",
        "status": 7,
        "notes": null,
        "startDate": "2021-07-23T20:01:42.451Z",
        "endDate": "2022-06-23T20:01:42.451Z",
        "category": 1,
        "targetSyncSprintId": null,
        "plannedValue": null,
        "themeId": 0,
        "deliveredValue": null,
        "blockedReason": null,
        "targetDate": "2021-08-23T20:01:42.451Z",
        "estimateDate": "2021-06-23T20:01:42.451Z",
        "health": 0,
        "parentId": null,
        "portfolioId": 629,
        "yearlyGoal": null,
        "solutionId": null,
        "notificationStartDate": null,
        "notificationFrequency": null,
        "reference": null,
        "programIds": [
          788
        ]
      }
      

      If we try to update an existing Objective with Target Sync Sprints and Release by using the PATCH call, it also fails.

            Assignee:
            Roman
            Reporter:
            Mario Sojo
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: