Please advice me how to get the feedback entered by users in My Site(PHP) get entered into Mantis. Right now I am emailing the feedback to my ID.
PS: I am basically a Java programmer. But i want this done using PHP as the site is done with PHP.
Please advice me how to get the feedback entered by users in My Site(PHP) get entered into Mantis. Right now I am emailing the feedback to my ID.
PS: I am basically a Java programmer. But i want this done using PHP as the site is done with PHP.
I wasn't able to get Robert's to work because I had two projects where we stored issues, thus it required me to supply the project id, which I found in the html of the dropdown list for the projects.
So, I took Robert's answer another step forward and added some code to allow submitting to custom fields.
This is working great with the latest mantis version.
$c = new SoapClient("http://www.yoursite.com/path_to_mantis/api/soap/mantisconnect.php?wsdl");
$username = 'user';
$password = 'pass';
$issue = array (
'summary' => 'Rone My test issue',
'description' => 'Rone Some description',
'project'=>array('id'=>2),
'category'=>'General',
'custom_fields'=>array(
array('field' => array('id'=>1,'name'=>'Account #'),'value'=>1),
array('field' => array('id'=>2,'name'=>'Account Name'),'value'=>'Name Goes here')
)
);
$c->mc_issue_add($username, $password, $issue);
Mantis has a SOAP API which you can use to programatically interact with the bug tracker . A simple implementation of creating an issue (not double-checked against a Mantis instance) is
$c = new SoapClient("http://example.org/mantis/api/soap/mantisconnect.php?wsdl");
$username = 'xxx';
$password = 'xxx';
$issue = array ( 'summary' => 'My test issue' , 'description' => 'Some description');
$c->mc_issue_add($username, $password, $issue);
Just in case someone runs into the same trouble as me. Make sure you are using proper utf8 fpr username and especially for the password (when using special chars and stuff):
$issue = $c->mc_issue_get($username, utf8_encode($password), $id);
For your setup it sounds like the EmailReporting plugin would be the best way to go:
http://www.mantisbt.org/wiki/doku.php/mantisbt:emailreporting