Confirm Bug Optional Information

2020-03-24 11:01:07
John Ten
3067
Last edited by Taotao on 2020-03-25 13:51:54
Share links
Summary : Request this method to get detailed information about current bugs and information you might use to confirm bug resolution.

Method Description

Request this method to get detailed information about current bugs and information you might use to confirm bug resolution.

Example
public function getBugResolveParams()
{
    include_once('../vendor/zentao/zentao.php');
    $zentao      = new \zentao();
    $params      = array('bugID' => 14);    // request parameteres
    $extraFields = array('title', 'products', 'bug', 'users', 'builds', 'actions');    // customize fields
    $result      = $zentao->getBugResolveParams($params, $extraFields);
    return $result;
}
Request
GET
Method

getBugResolveParams

Parameter
Name
Type
Required
Description
bugID
int Required Bug ID
Result
success error
{
    "status": 1,
    "msg": "success",
    "result": {
         // the navbar of ZenTao
        "title": "ZenTao-PHP-SDK-Resolve",
        // the product list
        "products": {
            "1": "ZenTao-PHP-SDK"
        },
        //Bug details【Refer to Chapter 2.12 Get Bug List for descriptions】
        "bug": {
            "id": "5",
            "product": "1",
            "branch": "0",
            "module": "2",
            "project": "1",
            "plan": "0",
            "story": "0",
            "storyVersion": "1",
            "task": "0",
            "toTask": "0",
            "toStory": "0",
            "title": "Add Test 2 for bugs",
            "keywords": "Edit bug",
            "severity": "2",
            "pri": "1",
            "type": "codeerror",
            "os": "windows",
            "browser": "ie11",
            "hardware": "",
            "found": "",
            "steps": "Repro steps for Test 2 for bugs",
            "status": "active",
            "subStatus": "",
            "color": "#2dbdb2",
            "confirmed": "1",
            "activatedCount": "0",
            "activatedDate": "",
            "mailto": "lisi",
            "openedBy": "admin",
            "openedDate": "2019-11-21 16:45:13",
            "openedBuild": "trunk",
            "assignedTo": "lisi",
            "assignedDate": "2019-11-22 15:22:21",
            "deadline": "2019-11-21",
            "resolvedBy": "",
            "resolution": "",
            "resolvedBuild": "",
            "resolvedDate": "",
            "closedBy": "",
            "closedDate": "",
            "duplicateBug": "0",
            "linkBug": "",
            "case": "0",
            "caseVersion": "1",
            "result": "0",
            "testtask": "0",
            "lastEditedBy": "admin",
            "lastEditedDate": "2019-11-22 15:22:21",
            "deleted": "0",
            "projectName": "ZenTao PHP-SDK",
            "storyTitle": null,
            "storyStatus": null,
            "latestStoryVersion": null,
            "taskName": null,
            "planName": null,
            "toCases": [],
            "files": [],
            "delay": 1
        },
        // user list【 for Assignto】
        "users": {
            "_empty_": "",
            "admin": "A:admin",
            "lisi": "L: Li Si",
            "niuqi": "N: Niu Qi",
            "wangwu": "W: Wang Wu",
            "zhangsan": "Z: Zhang San",
            "zhapliu": "Z: Zhao Liu"
        },
        // available builds【for resolved builds】
        "builds": {
            "_empty_": "",
            "trunk": "Trunk"
        },
        // Bug details
        "actions": {
            "791": {
                "id": "791",
                "objectType": "bug",
                "objectID": "5",
                "product": ",1,",
                "project": "1",
                "actor": "admin",
                "action": "bugconfirmed",
                "date": "2019-11-22 15:22:21",
                "comment": "",
                "extra": "",
                "read": "0",
                "history": [
                    {
                        "id": "216",
                        "action": "791",
                        "field": "confirmed",
                        "old": "0",
                        "new": "1",
                        "diff": ""
                    }
                ]
            }
        }
    }
}
{
    "status": 0,
    "msg": "error",
    "result": []
}

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