task.elapseditem.getlist
Returns a list of entries about elapsed time for a task.
Method Parameters
Parameter | Description |
---|---|
TASKID | Task identifier. Required parameter. |
ORDER | Array for result sorting. Sorting field may take the following values:
|
FILTER | Array of the time {"filtered_field": "filter value" [, ...]}. Filtered field can take the following values:
Optional. By default entries are not filtered. |
PARAMS | Array for call options. The array NAV_PARAMS type {"call option": 'value' [, ...]} is the element that stores the following options:
|
SELECT | Array of record fields to be returned by the method. Only the required fields can be specified. If the "*" value is available in the array - all available fields are returned. Default value - empty array array() , meaning that all fields of the request table will be returned. |
Attention! Compliance to parameter sequence in the request is mandatory. If sequence is not observed, the request will be completed with errors.
Please be advised on some specifics of manually adding information about worktime expended on the work completed several days ago. In this case, the following field values are changed:
- CREATED_DATE - start date;
- DATE_START - date entry created;
- DATE_STOP - date entry created;
Example
// Obtaining all entries about elapsed time with sorting by descending ID. // Only entries with fewer than 50 IDs will be filtered. BX24.callMethod( 'task.elapseditem.getlist', [1, {'ID': 'desc'}, {'<ID': 50}], function(result){ console.info(result.data()); console.log(result); } );
Retrieving selection by the time spent based on the general filter conditions. For example, select data on working hours at the specified date:
BX24.callMethod( 'task.elapseditem.getlist', [{'ID': 'desc'}, {'>=CREATED_DATE': '2018-02-16'}], function(result){ console.info(result.data()); console.log(result); } );
Example of working with php:
// Example of working with php // Obtain GET request for data selection. $appParams = array( "auth" => '92006f4ae0c55d400f1e6e09428af64a', "ORDER" => array("ID" => "DESC"), // Sorting by ID - descending "FILTER" => array(">ID" => 1), // Filter "SELECT" => array('ID', 'TASK_ID'), // Selection - only record and task ID "PARAMS" => array('NAV_PARAMS' => array( // Pagewise navigation parameters "nPageSize" => 2, // per 2 items per page 'iNumPage' => 2 // page number 2 )), ); $appRequestUrl = 'http://test-domain.ru/rest/task.elapseditem.getlist.xml?'.http_build_query($appParams); print(urldecode($appRequestUrl));;
© «Bitrix24», 2001-2024