Skip to main content

Update task time accounting

Update time accounting record data

Function UpdateTaskTimeAccounting(Val URL, Val TaskID, Val RecordID, Val Time, Val Text = "", Val SetupDate = "", Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
TaskID--taskString, NumberTask ID
RecordID--recordString, NumberTime record ID
Time--amountString, NumberTime spent in seconds
Text--textStringComment text
SetupDate--dateStringDate the record was set
Token--tokenStringAccess token, when app auth method used

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


tip

Method at API documentation: task.elapseditem.update


1C:Enterprise/OneScript code example
    URL      = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
TaskID = "2698";
RecordID = "946";

Text = "The text I forgot last time";
Time = 4800;

Result = OPI_Bitrix24.UpdateTaskTimeAccounting(URL, TaskID, RecordID, Time, Text);

URL = "b24-ar17wx.bitrix24.by";
Token = "35c31667006e9f06006b12e400000001000...";
RecordID = "948";

Text = "New time record";
Time = 4800;
SetupDate = AddMonth(OPI_Tools.GetCurrentDate(), -1);

Result = OPI_Bitrix24.UpdateTaskTimeAccounting(URL
, TaskID
, RecordID
, Time
, Text
, SetupDate
, Token);
    oint bitrix24 UpdateTaskTimeAccounting \
--url "b24-ar17wx.bitrix24.by" \
--task "2934" \
--record 1034 \
--amount 4800 \
--text "New time record" \
--date "2024-09-30T16:36:01.5072486" \
--token "***"
Result
{
"result": null,
"time": {
"start": 1728454838.1335,
"finish": 1728454838.20827,
"duration": 0.0747687816619873,
"processing": 0.0432851314544678,
"date_start": "2024-10-09T09:20:38+03:00",
"date_finish": "2024-10-09T09:20:38+03:00",
"operating_reset_at": 1728455438,
"operating": 0
}
}