mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-16 11:38:11 +02:00
2.4 KiB
2.4 KiB
sidebar_position |
---|
5 |
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
Parameter | CLI option | Type | Description |
---|---|---|---|
URL | --url | String | URL of webhook or a Bitrix24 domain, when token used |
TaskID | --task | String, Number | Task ID |
RecordID | --record | String, Number | Time record ID |
Time | --amount | String, Number | Time spent in seconds |
Text | --text | String | Comment text |
SetupDate | --date | String | Date the record was set |
Token | --token | String | Access 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
:::
URL = FunctionParameters["Bitrix24_URL"];
TaskID = FunctionParameters["Bitrix24_ElapsedTaskID"];
RecordID = FunctionParameters["Bitrix24_HookTimeID"];
Text = "The text I forgot last time";
Time = 4800;
Result = OPI_Bitrix24.UpdateTaskTimeAccounting(URL, TaskID, RecordID, Time, Text);
OPI_TestDataRetrieval.WriteLog(Result, "UpdateTaskTimeAccounting (wh)", "Bitrix24");
URL = FunctionParameters["Bitrix24_Domain"];
Token = FunctionParameters["Bitrix24_Token"];
RecordID = FunctionParameters["Bitrix24_TimeID"];
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 "1088" --record "308" --amount "4800" --text "The text I forgot last time" --date %date% --token "fe3fa966006e9f06006b12e400000001000..."
{
"result": null,
"time": {
"start": 1720816585.70407,
"finish": 1720816585.77088,
"duration": 0.0668020248413086,
"processing": 0.0276288986206055,
"date_start": "2024-07-12T20:36:25+00:00",
"date_finish": "2024-07-12T20:36:25+00:00",
"operating_reset_at": 1720817185,
"operating": 0
}
}