Creating a Standalone Change Issue with Affected Objects
You can create a standalone Change Issue (Problem Report or Variance) with 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. To create such Change Issues, you must have Create permission. You must also adhere to the “Attribute Constraints” and “Cascading Attribute Rules” as specified in the Type and Attribute Manager.
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 Issue. If you specify any such objects to be added as Affected Objects, the request fails and returns an error.
Example: Creating a Standalone Problem Report with Multiple Affected Objects
This example shows you how to create a standalone Problem Report with multiple Affected Objects. In this example, the request creates a standalone Problem Report with four Changeable objects (parts, in this example) as its Affected Objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/ProblemReports
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "Problem Report with Multi Objects",
"Description": "DesCription 2",
"State": {
"Value": "OPEN",
"Display": "Open"
},
"Latest": true,
"DescriptionSummary": "Problem Report",
"LifeCycleTemplateName": "Problem Report Life Cycle",
"Category": {
"Value": "DESIGN_ISSUE",
"Display": "Design Issue"
},
"IssuePriority": {
"Value": "MEDIUM",
"Display": "Medium"
},
"CabinetName": "Default",
"FolderLocation": "/GOLF_CART",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:122008')",
"ReservedBy": null,
"TeamTemplateName": "Problem Report Team",
"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')"
]
}
If you do not specify Changeables OIDs, then the request creates a standalone Problem Report but does not add Affected Objects to it.
Example: Creating a Standalone Subtype of a Problem Report with Multiple Affected Objects
This example shows you how to create a standalone subtype of a Problem Report with multiple Affected Objects. In this example, the request creates the TestWTChangeIssue subtype of a Problem Report with four Changeable objects (parts, in this example) as its Affected Objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/ProblemReports
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "Soft Type Problem Report",
"Description": "Description 2",
"State": {
"Value": "OPEN",
"Display": "Open"
},
"Latest": true,
"DescriptionSummary": "Problem Report",
"LifeCycleTemplateName": "Problem Report Life Cycle",
"Category": {
"Value": "DESIGN_ISSUE",
"Display": "Design Issue"
},
"IssuePriority": {
"Value": "MEDIUM",
"Display": "Medium"
},
"CabinetName": "Default",
"FolderLocation": "/GOLF_CART",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:122008')",
"ReservedBy": null,
"TeamTemplateName": "Problem Report Team",
"@odata.type": "#PTC.ChangeMgmt.TestWTChangeIssue",
"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')"
]
}
If you do not specify Changeables OIDs, then the request creates a standalone subtype but does not add Affected Objects to it.
Example: Creating a Standalone Subtype of a Problem Report with a Model/Soft Attribute and an Affected Object
This example shows you how to create a standalone subtype of a Problem Report with a soft attribute and an Affected Object specified in the request body. In this example, the request creates a standalone subtype of a Problem Report with the specified soft attribute and a Changeable object (a part, in this example) as its Affected Object. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/ProblemReports
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "Soft Type Problem Report",
"Description": "DesCription 2",
"State": {
"Value": "OPEN",
"Display": "Open"
},
"Latest": true,
"DescriptionSummary": "Problem Report",
"LifeCycleTemplateName": "Problem Report Life Cycle",
"Category": {
"Value": "DESIGN_ISSUE",
"Display": "Design Issue"
},
"IssuePriority": {
"Value": "MEDIUM",
"Display": "Medium"
},
"CabinetName": "Default",
"FolderLocation": "/GOLF_CART",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:122008')",
"ReservedBy": null,
"TeamTemplateName": "Problem Report Team",
"@odata.type": "#PTC.ChangeMgmt.TestWTChangeIssue"
"TestAttribute":"Test Soft Attribute",
"AffectedObjects@odata.bind": [
"Changeables('OR:wt.part.WTPart:122856')"
]
}
Example: Creating a Standalone Variance with Multiple Affected Objects
This example shows you how to create a standalone Variance with multiple Affected Objects. In this example, the request creates a standalone Variance with four Changeable objects (parts, in this example) as its Affected Objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/Variances
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": " Deviation Multi Obj",
"Description": "Test Description",
"IsRemote": false,
"Latest": true,
"LifeCycleTemplateName": "Variance Life Cycle",
"NeedDate": null,
"ResolutionDate": null,
"Revision": "",
"FolderName": null,
"ObjectType": "Deviation",
"Reason": null,
"ReasonSummary": null,
"VarianceCategory": {
"Value": "CRITICAL",
"Display": "Critical"
},
"CabinetName": "Default",
"FolderLocation": "/GOLF_CART",
"Recurring": false,
"ReservedBy": null,
"DescriptionSummary": null,
"VarianceOwners@odata.bind": "Users('OR:wt.org.WTUser:12')",
"TeamTemplateName": "Variance Team",
"ApprovedQuantity": 0,
"@odata.type": "#PTC.ChangeMgmt.Deviation",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:122008')",
"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')"
]
}
If you do not specify Changeable OIDs, then the request creates a standalone Variance but does not add an Affected Objects to it.
Example: Creating a Standalone Subtype of a Variance with Multiple Affected Objects
This example shows you how to create a standalone subtype of a Variance with multiple Affected Objects. In this example, the request creates the TestDevSubType subtype of a Variance with four Changeable objects (parts, in this example) as its Affected Objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/Variances
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "Test Deviation Sub Type",
"Description": "Test Description",
"IsRemote": false,
"Latest": true,
"LifeCycleTemplateName": "Variance Life Cycle",
"NeedDate": null,
"ResolutionDate": null,
"Revision": "",
"FolderName": null,
"ObjectType": "Deviation",
"Reason": null,
"ReasonSummary": null,
"VarianceCategory": {
"Value": "CRITICAL",
"Display": "Critical"
},
"CabinetName": "Default",
"FolderLocation": "/GOLF_CART",
"Recurring": false,
"ReservedBy": null,
"DescriptionSummary": null,
"VarianceOwners@odata.bind": "Users('OR:wt.org.WTUser:12')",
"TeamTemplateName": "Variance Team",
"ApprovedQuantity": 0,
"@odata.type": "#PTC.ChangeMgmt.TestDevSubType",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:122008')",
"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')"
]
}
If you do not specify Changeable OIDs, then the request creates a standalone subtype but does not add Affected Objects to it.
Example: Creating a Standalone Subtype of a Variance with a Model/Soft Attribute and Multiple Affected Objects
This example shows you how to create a standalone subtype of a Variance with a soft attribute and multiple Affected Objects specified in the request body. In this example, the request creates a standalone subtype of a Variance with the specified soft attribute and four Changeable objects (parts, in this example) as its Affected Objects. Use the following POST URI with the request body.
URI
POST /Windchill/servlet/odata/ChangeMgmt/Variances
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "Test Deviation Model/Soft",
"Description": "Model Description",
"IsRemote": false,
"Latest": true,
"LifeCycleTemplateName": "Variance Life Cycle",
"NeedDate": null,
"ResolutionDate": null,
"Revision": "",
"FolderName": null,
"ObjectType": "Deviation",
"Reason": null,
"ReasonSummary": null,
"VarianceCategory": {
"Value": "CRITICAL",
"Display": "Critical"
},
"CabinetName": "Default",
"FolderLocation": "/GOLF_CART",
"Recurring": false,
"ReservedBy": null,
"DescriptionSummary": null,
"VarianceOwners@odata.bind": "Users('OR:wt.org.WTUser:12')",
"TeamTemplateName": "Variance Team",
"ApprovedQuantity": 578,
"@odata.type": "#PTC.ChangeMgmt.Deviation",
"TestAttribute": "Test Soft Attribute",
"Context@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:122008')",
"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')"
]
}
Was this helpful?