How I'm trying to do it now is erroring. I can see that the value is not part of the $custom but can't figure out how I should be inserting that.
Code: Select all
The property 'Value' cannot be found on this object. Verify that the property exists and can be set.
Any help gratefully received!
Code: Select all
ID Name value
-- ---- -----
248 Control ID
145 CSG Director Bloggs
200 Complexity
279 Platform
Code: Select all
$mantis = New-WebServiceProxy -Uri "http://tickets.mycompany.com/api/soap/mantisconnect.php?wsdl"
$ticketinfo = $mantis.mc_issue_get($($Sec.Username),$($Sec.Password),$ticket)
$ticketUpdate = $ticketinfo
$Custom = New-Object "Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy3pi_soap_mantisconnect_php_wsdl.ObjectRef"
$Custom.Value = 'ibarnetson'
$Custom.id = 145
$ticketUpdate.custom_fields = $Custom
$mantis.mc_issue_update($($Sec.Username),$($Sec.Password),$ticket,$ticketUpdate)