Modifying a Change Task
You can modify an existing Change Task to add one or more Affected Objects or Resulting Objects by providing the required attributes and the Changeables OIDs that you want to add as Affected Objects or Resulting Objects, in the request body. The Change Task may or may not have existing Affected Objects or Resulting Objects associated with it. To create and modify Change Tasks, you must have Create and Modify permissions. To modify an existing Change Task, you must first reserve it. After you modify the Change Task, you must unreserve it.
The Affected Objects or Resulting Objects that you want to add must exist and you must have Read permission to those. You can add the Affected Objects or Resulting Objects according to the defined association rules.
You can add any of the Changeables such as parts, documents, subtypes of parts, or subtypes of documents as Affected Objects or Resulting Objects.
* 
You cannot add Change Management Revision (BOM Redline) objects as Affected Objects or Resulting Objects to a Change Task. If you specify any such objects to be added as Affected Objects or Resulting Objects, the request fails and returns an error.
Example: Adding Multiple Affected Objects to an Existing Change Task
This example shows you how to add multiple Affected Objects to an existing Change Task. In this example, the request adds four Changeable objects (parts, in this example) as Affected Objects to the existing Change Task specified in the request URI. If the Change Task has one existing Affected Object associated with it, then the total number of Affected Objects now associated with the Change Task is five. Use the following PATCH URI with the request body.
URI
PATCH /Windchill/servlet/odata/ChangeMgmt/ChangeTasks('OR:wt.change2.WTChangeTask2:266601')
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Description": "Updated Description 7",
"AffectedObjects@odata.bind": [
"Changeables('OR:wt.part.WTPart:122556')",
"Changeables('OR:wt.part.WTPart:123864')",
"Changeables('OR:wt.part.WTPart:123833')",
"Changeables('OR:wt.part.WTPart:123771')"
]
}
Example: Adding Multiple Resulting Objects to an Existing Change Task
This example shows you how to add multiple Resulting Objects to an existing Change Task. In this example, the request adds four Changeable objects (Parts, in this example) as Resulting Objects to the existing Change Task specified in the request URI. If the Change Task has one existing Resulting Object associated with it, then the total number of Resulting Objects now associated with the Change Task is five. Use the following PATCH URI with the request body.
URI
PATCH /Windchill/servlet/odata/ChangeMgmt/ChangeTasks('OR:wt.change2.WTChangeTask2:266601')
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Description": "Updated Description 7",
"ResultingObjects@odata.bind": [
"Changeables('OR:wt.part.WTPart:122556')",
"Changeables('OR:wt.part.WTPart:123864')",
"Changeables('OR:wt.part.WTPart:123833')",
"Changeables('OR:wt.part.WTPart:123771')"
]
}
Was this helpful?