Get Bug Optional Information

2020-03-24 10:59:47
John Ten
3158
Last edited by Taotao on 2020-03-25 10:47:46
Share links
Summary : Request this method to get the relevant information when reporting a bug before linking it to the specified product.
Method Description

Request this method to get the relevant information when reporting a bug before linking it to the specified product.

Example
public function getBugCreateParams()
{
    include_once('../vendor/zentao/zentao.php');
    $zentao      = new \zentao();
    $params      = array('productID' => 1);    // request parameteres
    $extraFields = array('title', 'productID', 'productName', 'projects', 'moduleOptionMenu', 'users', 'stories', 'builds');    // customize fields
    $result      = $zentao->getBugCreateParams($params, $extraFields);
    return $result;
}
Request
GET
Method
getBugCreateParams
Parameter
Name
Type
Required
Description
productID
int Required Linked Product ID
Result
success error
{
    "status": 1,
    "msg": "success",
    "result": {
        // the navbar of ZenTao
        "title": "ZenTao-PHP-SDK-Report Bug",
        // current product ID
        "productID": 1, 
        // current product name
        "productName": "ZenTao-PHP-SDK",
        // a project list of the current product
        "projects": {
            "1": "ZenTao PHP-SDK",
            "_empty_": ""
        },
        // a module list of the current product
        "moduleOptionMenu": [
            "/",
            "/Design",
            "/Dev",
            "/Change",
            "/Test"
        ],
        // users that can be assigned
        "users": {
            "_empty_": "",
            "lisi": "L: Li Si",
            "wangwu": "W: Wang Wu",
            "zhapliu": "Z: Zhao Liu",
            "admin": "A:admin",
            "niuqi": "N: Niu Qi",
            "zhangsan": "Z: Zhang San"
        },
        //stories of the current product
        "stories": {
            "1": "1: Confirm PHP-SDK stories and create PHP-SDK file (Priority:1, Estimates:4)",
            "2": "2: Develope ZenTao SDK API (Priority:1, Estimates:4)",
            "_empty_": ""
        },
        // builds that are affected by the product
        "builds": {
            "trunk": "Trunk"
        }
    }
}
{
    "status": 0,
    "msg": "error",
    "result": []
}

Write a Comment
Comment will be posted after it is reviewed.