Incorrect number updated - Editing Staff Allocation via REST API
search cancel

Incorrect number updated - Editing Staff Allocation via REST API

book

Article ID: 394987

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

An investment (say a Project) is created. Staff is allocated to it already. A change to the allocation amount is now attempted via the REST API. The body of the call being made is as follows:

{
  "_internalId": 0000001,
  "allocationCurve": {
    "isFiscal": false,
    "curveType": "value",
    "dataType": "numeric",
    "_type": "tsv",
    "segmentList": {
      "defaultValue": 0,
      "segments": [
        {
          "start": "0001-01-01T00:00:00",
          "finish": "0002-12-31T00:00:00",
          "value": 30
        }
      ]
    }
  }
}

It is observed that the value "30" does not get updated correctly.

Cause

'workEffortUnit' and 'pattern' related data is missing in the request body.

Resolution

Include values for these fields. An example is as below:

{
  "d": [
      {
          "allocationCurve": {
              "workEffortUnit": "days",
              "pattern": "uniform",
              "periodList": [
                  {
                      "periods": [
                          {
                              "start": "0001-01-01T00:00:00",
                              "finish": "0002-12-31T00:00:00",
                              "value": 30
                          }
                      ]
                  }
              ]
          },
          "_internalId": 0000001
      }
  ]
}