Content
API to create work package worked on v8.3 but not on v10.3.1
Added by forgiven sinner over 4 years ago
Following powershell snippet works fine on v8.3 but not on v10.3.1:
try {
$CRdata = '
{
"_type": "WorkPackage",
"subject": "' + $title_CR + '",
"lockVersion": "0",
"status":{"href":"' + $api + 'statuses/' + $CRStatus + '"},
'+$CHANGEID_customField+'-' + $suffix.ToString($mask) + '"'+',
'+$CATGEORY_customField+',
"description": {
"format": "textile",
"raw": "' + $description_CR +'"
},
"_links": {
"type": {"href":"' + $changeRequestWorkPackageType._links.self.href + '"}
}
}
'
$wp = $null
$wp = Call-API-OP -api_uri $apiAction.href -method $apiAction.method -payload $CRdata