Finish Task Optional Information

2020-03-24 10:50:16
John Ten
1495
Final Edition:tengfei De 2020-03-25 08:34:00
Introduction:By requesting this method, you can get the project details, task details, and task actions, and the list of users for assigning when finishing a task.

Method Description

By requesting this method, you can get the project details, task details, and task actions, and the list of users for assigning when finishing a task.

Example
public function getTaskFinishParams()
{
    include_once('../vendor/zentao/zentao.php');
    $zentao      = new \zentao();
    $params      = array('taskID' => 1);    // request parameters
    $extraFields = array('title', 'users', 'task', 'project', 'actions');    // customize fields
    $result      = $zentao->getTaskFinishParams($params, $extraFields);
    return $result;
}
Request
GET
Method
getTaskFinishParams
Parameter
Name
Type
Required
Description
taskID
int Required Task ID
Result
success error
{
    "status": 1,
    "msg": "success",
    "result": {
         // the navbar of ZenTao
        "title": "ZenTao PHP-SDK - Finish",
        // users that the task can be assigned to
        "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"
        },
        // task details
        "task": {
            "id": "1",
            "parent": "0",
            "project": "1",
            "module": "1",
            "story": "1",
            "storyVersion": "1",
            "fromBug": "0",
            "name": "Confirm ZenTao PHP-SDK stories and create PHP-SDK files",
            "type": "design",
            "pri": "1",
            "estimate": "4",
            "consumed": "6",// man-hour【hour】 cost
            "left": "0",
            "deadline": "2019-11-11",
            "status": "done",
            "subStatus": "",
            "color": "",
            "mailto": "",
            "desc": "Create zentao.sdk.class, integrate user authentication, do story planning and start developing.",
            "openedBy": "admin",
            "openedDate": "2019-11-11 15:29:27",
            "assignedTo": "admin",
            "assignedDate": "2019-11-20 15:30:15",
            "estStarted": "2019-11-11",
            "realStarted": "2019-11-11",
            "finishedBy": "admin",
            "finishedDate": "2019-11-20 15:30:15",
            "finishedList": "",
            "canceledBy": "",
            "canceledDate": "",
            "closedBy": "",
            "closedDate": "",
            "closedReason": "",
            "lastEditedBy": "admin",
            "lastEditedDate": "2019-11-20 15:30:15",
            "deleted": "0",
            "storyID": "1",
            "storyTitle": "Confirm ZenTao PHP-SDK stories and create PHP-SDK files",
            "latestStoryVersion": "1",
            "storyStatus": "active",
            "assignedToRealName": "admin",
            "children": [],
            "team": [],
            "files": [],
            "cases": [],
            "needConfirm": false,
            "progress": 100,
            "nextBy": "admin"
        },
        // details of linked project
        "project": {
            "id": "1",
            "isCat": "0",
            "catID": "0",
            "type": "sprint",
            "parent": "0",
            "name": "ZenTao PHP-SDK",
            "code": "002",
            "begin": "2019-11-11",
            "end": "2019-11-23",
            "days": "10",
            "status": "doing",
            "subStatus": "",
            "statge": "1",
            "pri": "1",
            "desc": "ZenTao PHP-SDK Dev is used to manage projects via PHPer more efficiently",
            "openedBy": "admin",
            "openedDate": "2019-11-11 15:24:14",
            "openedVersion": "11.6.4",
            "closedBy": "",
            "closedDate": "0000-00-00 00:00:00",
            "canceledBy": "",
            "canceledDate": "0000-00-00 00:00:00",
            "PO": "lisi",
            "PM": "lisi",
            "QD": "lisi",
            "RD": "lisi",
            "team": "Lei Yong Dev",
            "acl": "custom",
            "whitelist": "1,2",
            "order": "5",
            "deleted": "0",
            "totalHours": "420.0",
            "totalEstimate": 28,
            "totalConsumed": 33,
            "totalLeft": 5
        },
        // details of task actions
        "actions": {
            "14": {
                "id": "14",
                "objectType": "task",
                "objectID": "1",
                "product": ",1,",
                "project": "1",
                "actor": "wangwu",
                "action": "started",
                "date": "2019-11-11 15:30:33",
                "comment": "",
                "extra": "",
                "read": "0",
                "history": [
                    {
                        "id": "2",
                        "action": "14",
                        "field": "realStarted",
                        "old": "0000-00-00",
                        "new": "2019-11-11",
                        "diff": ""
                    },
                    {
                        "id": "3",
                        "action": "14",
                        "field": "consumed",
                        "old": "0",
                        "new": "3",
                        "diff": ""
                    },
                    {
                        "id": "4",
                        "action": "14",
                        "field": "status",
                        "old": "wait",
                        "new": "doing",
                        "diff": ""
                    }
                ]
            }
        }
    }
}
{
    "status": 0,
    "msg": "error",
    "result": []
}

Commenter
Commentaires reçus après vérification。