1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-06-15 00:15:19 +02:00
Files
OpenIntegrations/docs/en/md/Bitrix24/Tasks-managment/Create-tasks-dependencies.md

73 lines
2.0 KiB
Markdown
Raw Normal View History

---
sidebar_position: 23
---
# Create tasks dependencies
Creates the dependency of one task to another
`Function CreateTasksDependencies(Val URL, Val FromID, Val DestinationID, Val LinkType, Val Token = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| URL | --url | String | URL of webhook or a Bitrix24 domain, when token used |
| FromID | --taskfrom | String, Number | From task ID |
| DestinationID | --taskto | String, Number | To task ID |
| LinkType | --linktype | String, Number | Link type: 0 start>start, 1 start>finish, 2 finish>start, 3 finish>finish |
| Token | --token | String | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
Method at API documentation: [task.dependence.add](https://dev.1c-bitrix.ru/rest_help/tasks/task/dependence/task_dependence_add.php)
:::
<br/>
```bsl title="Code example"
2024-10-03 20:35:39 +03:00
FromID = "2262";
DestinationID = "2264";
2024-08-13 16:47:32 +03:00
LinkType = 0;
2024-09-24 11:38:18 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
2024-08-13 16:47:32 +03:00
Result = OPI_Bitrix24.CreateTasksDependencies(URL, FromID, DestinationID, LinkType);
2024-10-03 20:35:39 +03:00
FromID = "2264";
DestinationID = "2262";
2024-08-13 16:47:32 +03:00
LinkType = 2;
2024-09-24 11:38:18 +03:00
URL = "b24-ar17wx.bitrix24.by";
2024-10-03 20:35:39 +03:00
Token = "37d1fe66006e9f06006b12e400000001000...";
2024-08-13 16:47:32 +03:00
Result = OPI_Bitrix24.CreateTasksDependencies(URL, FromID, DestinationID, LinkType, Token);
```
```sh title="CLI command example"
oint bitrix24 CreateTasksDependencies --url "b24-ar17wx.bitrix24.by" --taskfrom "1080" --taskto "1078" --linktype "2" --token "fe3fa966006e9f06006b12e400000001000..."
```
```json title="Result"
2024-08-14 09:06:31 +03:00
{
2024-10-06 16:55:08 +03:00
"result": [],
"time": {
2024-10-08 20:15:58 +03:00
"start": 1728329092.20682,
"finish": 1728329092.36801,
"duration": 0.16118597984314,
"processing": 0.134482145309448,
"date_start": "2024-10-07T22:24:52+03:00",
"date_finish": "2024-10-07T22:24:52+03:00",
"operating_reset_at": 1728329692,
"operating": 0.134455919265747
2024-10-06 16:55:08 +03:00
}
}
```