1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/docs/en/md/Bitrix24/Tasks-managment/Create-tasks-dependencies.md
2024-08-13 15:52:26 +03:00

2.3 KiB

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


:::tip Method at API documentation: task.dependence.add :::

  FromID        = FunctionParameters["Bitrix24_HookTaskID"];
  DestinationID = FunctionParameters["Bitrix24_TaskID"];
  LinkType      = 0;
  
  URL = FunctionParameters["Bitrix24_URL"];
  
  Result = OPI_Bitrix24.CreateTasksDependencies(URL, FromID, DestinationID, LinkType);
  
  OPI_TestDataRetrieval.WriteLog(Result, "CreateTasksDependencies (wh)", "Bitrix24");
  
  OPI_TestDataRetrieval.WriteLog(Result, "DeleteTasksDependencies (wh)", "Bitrix24");
  
  FromID        = FunctionParameters["Bitrix24_TaskID"];
  DestinationID = FunctionParameters["Bitrix24_HookTaskID"];
  LinkType      = 2;
  
  URL   = FunctionParameters["Bitrix24_Domain"];
  Token = FunctionParameters["Bitrix24_Token"];
  
  Result = OPI_Bitrix24.CreateTasksDependencies(URL, FromID, DestinationID, LinkType, Token);
    
  oint bitrix24 CreateTasksDependencies --url "b24-ar17wx.bitrix24.by" --taskfrom "1080" --taskto "1078" --linktype "2" --token "fe3fa966006e9f06006b12e400000001000..."

{
  "result": [],
  "time": {
  "start": 1720186655.56394,
  "finish": 1720186656.29235,
  "duration": 0.728404998779297,
  "processing": 0.692660093307495,
  "date_start": "2024-07-05T13:37:35+00:00",
  "date_finish": "2024-07-05T13:37:36+00:00",
  "operating_reset_at": 1720187255,
  "operating": 0.692637920379639
  }
  }