Php 以编程方式获取对螳螂的反馈
请建议我如何将用户在我的网站(PHP)中输入的反馈输入Mantis。 现在我正在通过电子邮件向我的ID发送反馈Php 以编程方式获取对螳螂的反馈,php,mantis,Php,Mantis,请建议我如何将用户在我的网站(PHP)中输入的反馈输入Mantis。 现在我正在通过电子邮件向我的ID发送反馈 PS:我基本上是一个Java程序员。但是我希望使用PHP来完成这项工作,因为网站是用PHP来完成的。对于您的设置来说,EmailReporting插件似乎是最好的方式: Mantis有一个SOAP API,您可以使用它与bug跟踪器进行编程交互。创建问题的一个简单实现(不针对Mantis实例进行双重检查)是 我无法让Robert's工作,因为我有两个存储问题的项目,因此需要我提供项目
PS:我基本上是一个Java程序员。但是我希望使用PHP来完成这项工作,因为网站是用PHP来完成的。对于您的设置来说,EmailReporting插件似乎是最好的方式:
Mantis有一个SOAP API,您可以使用它与bug跟踪器进行编程交互。创建问题的一个简单实现(不针对Mantis实例进行双重检查)是
我无法让Robert's工作,因为我有两个存储问题的项目,因此需要我提供项目id,我在项目下拉列表的html中找到了项目id 因此,我将Robert的回答向前推进了一步,并添加了一些代码以允许提交到自定义字段 这是伟大的工作与最新的螳螂版本
$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);
以防有人遇到和我一样的麻烦。 确保您使用的是正确的utf8 fpr用户名,尤其是密码(使用特殊字符时):
可能有用:尝试此致命错误时出错:未捕获SoapFault异常:[客户端]访问被拒绝。有什么线索吗?请更正您的用户名/密码,并确保您拥有足够的权限。在库存安装中,您需要至少由一名开发人员完成。我认为我们缺少项目Id。可能的话,请参阅实际文档
$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);
$issue = $c->mc_issue_get($username, utf8_encode($password), $id);