-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Hi,
I am trying to Bundle/Un-bundle, and possibly Merge tickets automatically and I am not seeing a clear way to do this through here.
It looks like the Bundle-ing may be through this endpoint and the Child>Parent Merge operation through this endpoint
For the un-bundling (removing children) I am thinking that Update-CWMTicket might work? But perhaps not, since I can't find a field that directly lists the ChildTicket IDs
I did try this, in hopes it would be able to mimic the /service/tickets/{parentId}/attachChildren path and Add 143061 as a child to 141378
$UpdateParam = @{
ID = 141378
Operation = 'add'
Path = 'attachChildren'
Value = $("childTicketIDs=143061")
}
Update-CWMTicket @UpdateParam -verboseBut it was attempting to essentially Patch the Ticket 141378 with a node attachChildren to the value of childTicketIDs=143061
Probably roughly equivalent to this method? patchServiceTicketsById
playing with Debugging.... this seems to work, but Invoke-CWMNewMaster isn't exposed as public
$paramlist = @{
childTicketIds=@(143061)
}
Invoke-CWMNewMaster -Arguments $paramlist -Endpoint '/service/tickets/141378/attachChildren'Or for invalid situations on Bundle
#Intentionally Trying to Merge a parent-with-children into a different ticket, which is invalid)
$paramlist = @{
childTicketIds=@(141378)
}
Invoke-CWMNewMaster -Arguments $paramlist -Endpoint '/service/tickets/143061/attachChildren'it even gives helpful error messages

Still trying to figure out removing children/un-bundling
Possibly set ParentID to empty/0 on Child tickets?
