Method Description |
Request this method to add the relevant information, such as the product, project, priority, and assignee when adding a bug.
|
Example |
public function addBug()
{
include_once('../vendor/zentao/zentao.php');
$zentao = new \zentao();
$params = array(
'product' => 1,
'module' => 2,
'project' => 1,
'openedBuild' => array('trunk', 3, 2),
'assignedTo' => 'lisi',
'deadline' => '2019-11-21',
'type' => 'codeerror',
'os' => 'windows',
'browser' => 'ie11',
'title' => 'Add test 4 for bugs',
'color' => '#2dbdb2',
'severity' => 2,
'pri' => 1,
'steps' => 'Repro steps to describe test 4 for bugs',
'story' => 0,
'task' => 0,
'mailto' => array('lisi', 'Zhang San'),
'keywords' => 'bug4'
); // request parameteres
$result = $zentao->addBug($params);
return $result;
}
|
{
"status": 1,
"msg": "success",
"result": "Saved"
}
|
{
"status": 0,
"msg": "error",
"result": {
"title": [
"『Bug Title』 should not be empty."
]
}
}
|