SOAP API - mc_issue_add - doesn't like reporter id

Get help from other users here.

Moderators: Contributor, Developer

SOAP API - mc_issue_add - doesn't like reporter id

Postby sketa » Jun 11, 2014 9:44 am

I am using the mc_issue_add api to add new issues to mantis. The thing is that I am storing the reporter's id in the $uid variable. When I use the code below, it returns an error. If I remove the 'reporter'=>array('id'=>$uid), line, it works just fine. Any suggestions would be appreciated.

Code: Select all
$issue = array (
                    'summary' => $summary,
                    'description' => $descr,
                                        array('field' => array('id'=>1,'name'=>'Reporter Name'),'value'=>$urealname),
                                        array('field' => array('id'=>3,'name'=>'Page Filename'),'value'=>$pg)
$bid = $mantisClient->mc_issue_add($username, $password, $issue);

Error with the reporter line:
Code: Select all
<br />
<b>Fatal error</b>:  Uncaught SoapFault exception: [SOAP-ENV:Server] Error Type: APPLICATION ERROR #401,
Error Description: Database query failed. Error received from database was #0: [Microsoft][ODBC SQL Server Driver]Invalid parameter number for the query:
         SELECT, f.type, f.access_level_r, f.default_value, f.type, s.value
         FROM mantis_custom_field_project_table p
            INNER JOIN mantis_custom_field_table f ON = p.field_id
            LEFT JOIN mantis_custom_field_string_table s
               ON s.field_id = p.field_id AND s.bug_id = ?
         WHERE p.project_id = ?
         ORDER BY p.sequence ASC, ASC. in C:\~HIDDEN~\includes\savecomment.php:147
Stack trace:
#0 C:\~HIDDEN~\includes\savecomment.php(147): SoapClient-&gt;__call('mc_issue_add', Array)
#1 C:\~HIDDEN~\includes\savecomment.php(147): SoapClient-&gt;mc_issue_add('aviewer', 'W76d!ffr+5#i4J...', Array)
#2 {main}
  thrown in <b>C:\~HIDDEN~\includes\savecomment.php</b> on line <b>147</b><br />

One thing is that even with the above error, the data/information is submitted to mantis correctly and the issue is created. It is just that the call does not return the bug/issue ID.
Mantis 1.2.17
PHP 5.5
Windows Server 2012
Posts: 1
Joined: Jun 11, 2014 9:30 am

Re: SOAP API - mc_issue_add - doesn't like reporter id

Postby atrol » Jun 13, 2014 1:20 am

I recommend to write also to mantisbt-soap-dev mailing list for such kind of questions
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
Site Admin
Posts: 6327
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: SOAP API - mc_issue_add - doesn't like reporter id

Postby paul » Jun 13, 2014 2:37 pm

Hi Sketa,

From the error message you receive, it looks like you are using MSSQL - I personally run MSSQL with Mantis in production at work, and have been a developer on mantis for the last 10 years. It is a known issue that support for non-MySQL is problematic in the current release - we are planning to fix this properly by replacing the current database layer shortly after the 1.3 release ( I've been told previously by others in the team we can aim to do with within a month of the 1.3 release), so for now, you may be better off using MySQL or manually patching the issue.

I've been using the following text on the bug tracker for issues relating to other databases:

MantisBT currently supports Mysql and has support for other database engines.

The support for other databases is known to be problematic.

Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer.

If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at

In the meantime, I'd advise running Mantis with Mysql Only to avoid issues.

Would you be interested in testing support for non-mysql backends for MantisBT? if yes, please email
Posts: 43
Joined: Mar 11, 2005 6:18 am

Return to Help

Who is online

Users browsing this forum: No registered users and 17 guests