General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
Posts: 11
Joined: 07 Feb 2017, 17:23


Post by Firmbyte »

I'm Newbie to this and I'm trying to add notes to a ticket using mc_issue_note_add but without success.
I'm doing this:

Code: Select all

$id = "C:\Users\me\Documents\me.xml"
# Read XML configuration file
[xml]$config = Get-Content $id
$UserName = $config.ID.UserName
$Password = $config.ID.Password
$mantis = New-WebServiceProxy -Uri
$ticket = "0198346"
$note = @(
             ('testing mc_issue_note_add')
And get this:
Cannot convert argument "note", with value: "System.Object[]", for "mc_issue_note_add" to type
"Cannot convert the "System.Object[]" value of type "System.Object[]" to type
At line:1 char:1
+ $mantis.mc_issue_note_add($username,$password,$ticket,$note)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument
Any guidance gratefully received.
Posts: 66
Joined: 05 Nov 2009, 08:43

Re: mc_issue_note_add

Post by rombert »


My C# knowledge is rather rusty, but this looks like a compiler error. The mc_issue_note_add expects a IssueNoteData object, but you're passing in an Object array.
Post Reply