mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-04 16:12:39 +01:00
FIX #19294 implement detailed timespent in task of project API
This commit is contained in:
@@ -228,7 +228,7 @@ class Projects extends DolibarrApi
|
||||
* See also API /tasks
|
||||
*
|
||||
* @param int $id Id of project
|
||||
* @param int $includetimespent 0=Return only list of tasks. 1=Include a summary of time spent, 2=Include details of time spent lines (2 is no implemented yet)
|
||||
* @param int $includetimespent 0=Return only list of tasks. 1=Include a summary of time spent, 2=Include details of time spent lines
|
||||
* @return int
|
||||
*
|
||||
* @url GET {id}/tasks
|
||||
@@ -253,9 +253,8 @@ class Projects extends DolibarrApi
|
||||
if ($includetimespent == 1) {
|
||||
$timespent = $line->getSummaryOfTimeSpent(0);
|
||||
}
|
||||
if ($includetimespent == 1) {
|
||||
// TODO
|
||||
// Add class for timespent records and loop and fill $line->lines with records of timespent
|
||||
if ($includetimespent == 2) {
|
||||
$timespent = $line->fetchTimeSpentOnTask();
|
||||
}
|
||||
array_push($result, $this->_cleanObjectDatas($line));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user