Clarity

 View Only
  • 1.  Edit staff allocationcurve in projects via rest api

    Posted Apr 17, 2025 09:59 AM

    Hi all, 

    i'm trying to edit allocationcurve from staff in a project using rest api with  a simple process, however  the expected result in the UIX is not correct i am getting 261 instead 10 : 

    i'm trying to send 288000 s ( 10 manday). Here is a part of the script:

    <core:set var="REST_URL">/projects/6064011/teams/6659379</core:set>
     
    <core:set escapeText="false" var="JSON_DATA">
    {
    "_internalId": 6659379,
    "allocationCurve": {
    "isFiscal": false,
    "curveType": "value",
    "dataType": "numeric",
    "_type": "tsv",
    "segmentList": {
      "defaultValue": 0,
      "segments": [ 
     
    {
      "start": "2025-01-01T00:00:00",
      "finish":"2025-12-31T00:00:00",
      "value": 288000
    }
     
      ]
    }
      } 
     
    }
    </core:set>

     

    do you have any idea to resolve this problem ? 

    thank you



  • 2.  RE: Edit staff allocationcurve in projects via rest api

    Posted Apr 18, 2025 07:32 AM

    Hello Omar, 

    You would have to include "workEffortUnit". Try the following two approaches, both should work fine :

          {
            "_internalId": 6659379,
            "allocationCurve":
                {
                "finish": "2025-12-31T17:00:00",
                "pattern": "uniform",
                "start": "2025-01-01T00:00:00",
                "total": 80,
                "workEffortUnit": "hours"
                }
            }

    OR 

    {
    "_internalId": 6659379,
    "defaultAllocationPercent": 0,
    "allocationCurve": {
            "isFiscal": false,
            "curveType": "value",
            "dataType": "numeric",
            "_type": "tsv",
            "workEffortUnit": "hours",
            "segmentList": {
                "defaultValue": 0,
                "segments": [
                    {
                        "start": "2025-01-01T00:00:00",
                        "finish": "2025-12-31T17:00:00",
                        "value": 80
                    }
                ]
            }
        }
    }




  • 3.  RE: Edit staff allocationcurve in projects via rest api

    Posted Apr 22, 2025 04:09 AM

    Great, it work's, thank you for the help !