I'm trying to insert to fields in custom_fields in a ticket. I'll have to insert/update all the custom_fields, but specifically, in the ticket there is a field called " CSG Director" and I want to insert when I create a new ticket and update the value if existing. 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.
The fields in the Mantis ticket are like this
ID Name value
-- ---- -----
248 Control ID
145 CSG Director Bloggs
200 Complexity
279 Platform
$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)
I've also tried using
"Microsoft.PowerShell.Commands.NewWebserviceProxy.AutogeneratedTypes.WebServiceProxy1pi_soap_mantisconnect_php_wsdl.CustomFieldValueForIssueData"
I get this error
The property 'Value' cannot be found on this object. Verify that the property exists and can be set.
Any help greatfully received.
I got it cracked, not pretty but does the job....