Modifying a Change Request
You can modify an existing Change Request to add one or more Affected Objects by providing the required attributes and the Changeables OIDs that you want to add as Affected Objects, in the request body. The Change Request may or may not have existing Affected Objects associated with it. You can also modify the model or soft attributes for an existing Change Request. To create and modify Change Requests, you must have Create and Modify permissions. To modify an existing Change Request, you must first reserve it. After you modify the Change Request, you must unreserve it.
The Affected Objects that you want to add must exist and you must have Read permission to those. You can add the Affected 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.
* 
You cannot add Change Management Revision (BOM Redline) objects as Affected Objects to a Change Request. If you specify any such objects to be added as Affected Objects, the request fails and returns an error.
Example: Adding Multiple Affected Objects to an Existing Change Request
This example shows you how to add multiple Affected Objects to an existing Change Request. In this example, the request adds four Changeable objects (parts, in this example) as Affected Objects to the existing Change Request specified in the request URI. If the Change Request has one existing Affected Object associated with it, then the total number of Affected Objects now associated with the Change Request is five. Use the following PATCH URI with the request body.
URI
PATCH /Windchill/servlet/odata/ChangeMgmt/ChangeRequests('OR:wt.change2.WTChangeRequest2:266601')
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "ChangeRequest",
"Description": "ChangeRequest Description",
"DescriptionSummary": "DescriptionSummary1_demo",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:122008')",
"NonRecurringCost": "10",
"ProposedSolution": "PS",
"ProposedSolutionSummary": "PSS",
"RecurringCost": "20",
"@odata.type": "#PTC.ChangeMgmt.ChangeRequest",
"RequestPriority": {
"Value": "LOW"
},
"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: Modifying a Model/Soft Attribute of an Existing Change Request
This example shows you how to modify a soft attribute of an existing Change Request specified in the request URI. Use the following PATCH URI with the request body.
URI
PATCH /Windchill/servlet/odata/ChangeMgmt/ChangeRequests('VR:wt.change2.WTChangeRequest2:266601')
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "ChangeRequest",
"Description": "ChangeRequest Description",
"DescriptionSummary": "DescriptionSummary1_demo",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:122008')",
"NonRecurringCost": "10",
"ProposedSolution": "PS",
"ProposedSolutionSummary": "PSS",
"RecurringCost": "20",
"@odata.type": "#PTC.ChangeMgmt.ChangeRequest",
"RequestPriority": {
"Value": "LOW"
},
"TestAttribute": "Test Soft Attribute - updated",
"AffectedObjects@odata.bind": [
"Changeables('OR:wt.part.WTPart:122556')"
]
}