Finish Task

2020-03-24 10:50:39
John Ten
3207
Last edited by Taotao on 2020-03-25 09:43:38
Share links
Summary : This method is requested to confirm the user who finished the task and the time consumed when a task is finished.

Example

This method is requested to confirm the user who finished the task and the time consumed when a task is finished.

Example
public function addTaskFinish()
{
    include_once('../vendor/zentao/zentao.php');
    $zentao = new \zentao();
    $params = array(
        'taskID'          => 16,
        'currentConsumed' => 1,
        'consumed'        => 19,
        'assignedTo'      => 'lisi',
        'finishedDate'    => '2019-11-12',
        'comment'         => 'Finish task description'
    );    // request parameteres
    $result = $zentao->addTaskFinish($params);
    return $result;
}
Request
POST
Method
addTaskFinish
Parameter
Name
Type
Required
Description
taskID
int Required
Task ID
currentConsumed
int
Required
Current Cost【hour】
consumed
int Required
Cost last time【hour, which can be get from task->consumed】
assignedTo
string
Required
Assign to finishby user【e.g. admin】
finishedDate
string
Required
Actual finished date【format: 2019-12-12】
comment
string
Optional Finish a comment
Result
success error
{
    "status": 1,
    "msg": "success",
    "result": []
}
{
    "status": 0,
    "msg": "error",
    "result": []
}
Write a Comment
Comment will be posted after it is reviewed.