Skip to content

Commit

Permalink
Преобразование OPI -> OInt (workflow)
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalyTheAlpaca committed Jul 3, 2024
1 parent 1590090 commit 2824a56
Show file tree
Hide file tree
Showing 8 changed files with 3,618 additions and 3,618 deletions.
7,024 changes: 3,512 additions & 3,512 deletions service/dictionaries/en.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/en/OInt/core/Modules/OPI_Bitrix24.os
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ Function GetPosts(Val URL, Val PostID = "", Val Filter = "UA", Val Token = "") E

EndFunction

// Create comment
// Add comment to post
// Adds a comment to the post
//
// Parameters:
Expand All @@ -323,7 +323,7 @@ EndFunction
//
// Returns:
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
Function CrateComment(Val URL, Val PostID, Val Text, Val Token = "") Export
Function AddPostComment(Val URL, Val PostID, Val Text, Val Token = "") Export

Parameters = NormalizeAuth(URL, Token, "log.blogcomment.add");

Expand Down Expand Up @@ -873,7 +873,7 @@ Function GetTaskCommentsList(Val URL, Val TaskID, Val Filter = "", Val Token = "

EndFunction

// Create comment
// Add comment to task
// Create new comment to the task
//
// Parameters:
Expand All @@ -884,7 +884,7 @@ EndFunction
//
// Returns:
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
Function CreateComment(Val URL, Val TaskID, Val Text, Val Token = "") Export
Function AddTaskComment(Val URL, Val TaskID, Val Text, Val Token = "") Export

Parameters = NormalizeAuth(URL, Token, "task.commentitem.add");

Expand All @@ -911,7 +911,7 @@ EndFunction
//
// Returns:
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
Function DeleteComment(Val URL, Val TaskID, Val CommentID, Val Token = "") Export
Function DeleteTaskComment(Val URL, Val TaskID, Val CommentID, Val Token = "") Export

Parameters = NormalizeAuth(URL, Token, "task.commentitem.delete");
OPI_Tools.AddField("TASKID", TaskID , "String", Parameters);
Expand Down
36 changes: 18 additions & 18 deletions src/en/OInt/tests/Modules/internal/OPI_Tests.os
Original file line number Diff line number Diff line change
Expand Up @@ -2876,7 +2876,7 @@ Procedure B24_PostsManagment() Export
Bitrix24_UpdatePost(TestParameters);
Bitrix24_GetImportantPostViewers(TestParameters);
Bitrix24_GetPosts(TestParameters);
Bitrix24_CreateComment(TestParameters);
Bitrix24_AddPostComment(TestParameters);
Bitrix_AddPostRecipients(TestParameters);
Bitrix24_DeletePost(TestParameters);

Expand Down Expand Up @@ -2999,8 +2999,8 @@ Procedure B24_CommentsManagment() Export
OPI_TestDataRetrieval.WriteParameter("Bitrix24_CommentsTaskID", TaskID);
TestParameters.Insert("Bitrix24_CommentsTaskID", TaskID);

Bitrix24_CreateComment(TestParameters);
Bitrix24_DeleteComment(TestParameters);
Bitrix24_AddTaskComment(TestParameters);
Bitrix24_DeleteTaskComment(TestParameters);

OPI_Bitrix24.DeleteTask(URL, TaskID);

Expand Down Expand Up @@ -6274,27 +6274,27 @@ Procedure Bitrix24_GetPosts(FunctionParameters)

EndProcedure

Procedure Bitrix24_CreateComment(FunctionParameters)
Procedure Bitrix24_AddPostComment(FunctionParameters)

Text = "Comment for post";
PostID = FunctionParameters["Bitrix24_PostID"];
URL = FunctionParameters["Bitrix24_URL"];

Result = OPI_Bitrix24.CrateComment(URL, PostID, Text);
Result = OPI_Bitrix24.AddPostComment(URL, PostID, Text);

OPI_TestDataRetrieval.WriteLog(Result, "CreateComment (wh)", "Bitrix24");
OPI_TestDataRetrieval.WriteLog(Result, "AddPostComment (wh)", "Bitrix24");

Check_BitrixNumber(Result); // SKIP

Text = "Another comment";
URL = FunctionParameters["Bitrix24_Domain"];
Token = FunctionParameters["Bitrix24_Token"];

Result = OPI_Bitrix24.CrateComment(URL, PostID, Text, Token);
Result = OPI_Bitrix24.AddPostComment(URL, PostID, Text, Token);

// END

OPI_TestDataRetrieval.WriteLog(Result, "CrateComment", "Bitrix24");
OPI_TestDataRetrieval.WriteLog(Result, "AddPostComment", "Bitrix24");

Check_BitrixNumber(Result);

Expand Down Expand Up @@ -7641,16 +7641,16 @@ Procedure Bitrix24_UnmuteTask(FunctionParameters)

EndProcedure

Procedure Bitrix24_CreateComment(FunctionParameters)
Procedure Bitrix24_AddTaskComment(FunctionParameters)

URL = FunctionParameters["Bitrix24_URL"];
TaskID = FunctionParameters["Bitrix24_CommentsTaskID"];

Text = "Task impossible, let's split up";

Result = OPI_Bitrix24.CreateComment(URL, TaskID, Text);
Result = OPI_Bitrix24.AddTaskComment(URL, TaskID, Text);

OPI_TestDataRetrieval.WriteLog(Result, "CreateComment (wh)", "Bitrix24");
OPI_TestDataRetrieval.WriteLog(Result, "AddTaskComment (wh)", "Bitrix24");

Check_BitrixNumber(Result); // SKIP

Expand All @@ -7663,11 +7663,11 @@ Procedure Bitrix24_CreateComment(FunctionParameters)

Text = "Task uninpossible, don't split up";

Result = OPI_Bitrix24.CreateComment(URL, TaskID, Text, Token);
Result = OPI_Bitrix24.AddTaskComment(URL, TaskID, Text, Token);

// END

OPI_TestDataRetrieval.WriteLog(Result, "CreateComment", "Bitrix24");
OPI_TestDataRetrieval.WriteLog(Result, "AddTaskComment", "Bitrix24");

Check_BitrixNumber(Result);

Expand All @@ -7677,27 +7677,27 @@ Procedure Bitrix24_CreateComment(FunctionParameters)

EndProcedure

Procedure Bitrix24_DeleteComment(FunctionParameters)
Procedure Bitrix24_DeleteTaskComment(FunctionParameters)

URL = FunctionParameters["Bitrix24_URL"];
TaskID = FunctionParameters["Bitrix24_CommentsTaskID"];
CommentID = FunctionParameters["Bitrix24_HookCommentID"];

Result = OPI_Bitrix24.DeleteComment(URL, TaskID, CommentID);
Result = OPI_Bitrix24.DeleteTaskComment(URL, TaskID, CommentID);

OPI_TestDataRetrieval.WriteLog(Result, "DeleteComment (wh)", "Bitrix24");
OPI_TestDataRetrieval.WriteLog(Result, "DeleteTaskComment (wh)", "Bitrix24");

Check_BitrixTrue(Result); // SKIP

URL = FunctionParameters["Bitrix24_Domain"];
Token = FunctionParameters["Bitrix24_Token"];
CommentID = FunctionParameters["Bitrix24_CommentID"];

Result = OPI_Bitrix24.DeleteComment(URL, TaskID, CommentID, Token);
Result = OPI_Bitrix24.DeleteTaskComment(URL, TaskID, CommentID, Token);

// END

OPI_TestDataRetrieval.WriteLog(Result, "DeleteComment", "Bitrix24");
OPI_TestDataRetrieval.WriteLog(Result, "DeleteTaskComment", "Bitrix24");

Check_BitrixTrue(Result);

Expand Down
10 changes: 5 additions & 5 deletions src/en/OPI/src/CommonModules/OPI_Bitrix24/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ Function GetPosts(Val URL, Val PostID = "", Val Filter = "UA", Val Token = "") E

EndFunction

// Create comment
// Add comment to post
// Adds a comment to the post
//
// Parameters:
Expand All @@ -323,7 +323,7 @@ EndFunction
//
// Returns:
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
Function CrateComment(Val URL, Val PostID, Val Text, Val Token = "") Export
Function AddPostComment(Val URL, Val PostID, Val Text, Val Token = "") Export

Parameters = NormalizeAuth(URL, Token, "log.blogcomment.add");

Expand Down Expand Up @@ -873,7 +873,7 @@ Function GetTaskCommentsList(Val URL, Val TaskID, Val Filter = "", Val Token = "

EndFunction

// Create comment
// Add comment to task
// Create new comment to the task
//
// Parameters:
Expand All @@ -884,7 +884,7 @@ EndFunction
//
// Returns:
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
Function CreateComment(Val URL, Val TaskID, Val Text, Val Token = "") Export
Function AddTaskComment(Val URL, Val TaskID, Val Text, Val Token = "") Export

Parameters = NormalizeAuth(URL, Token, "task.commentitem.add");

Expand All @@ -911,7 +911,7 @@ EndFunction
//
// Returns:
// Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
Function DeleteComment(Val URL, Val TaskID, Val CommentID, Val Token = "") Export
Function DeleteTaskComment(Val URL, Val TaskID, Val CommentID, Val Token = "") Export

Parameters = NormalizeAuth(URL, Token, "task.commentitem.delete");
OPI_Tools.AddField("TASKID", TaskID , "String", Parameters);
Expand Down
36 changes: 18 additions & 18 deletions src/en/OPI/src/CommonModules/OPI_Tests/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -2876,7 +2876,7 @@ Procedure B24_PostsManagment() Export
Bitrix24_UpdatePost(TestParameters);
Bitrix24_GetImportantPostViewers(TestParameters);
Bitrix24_GetPosts(TestParameters);
Bitrix24_CreateComment(TestParameters);
Bitrix24_AddPostComment(TestParameters);
Bitrix_AddPostRecipients(TestParameters);
Bitrix24_DeletePost(TestParameters);

Expand Down Expand Up @@ -2999,8 +2999,8 @@ Procedure B24_CommentsManagment() Export
OPI_TestDataRetrieval.WriteParameter("Bitrix24_CommentsTaskID", TaskID);
TestParameters.Insert("Bitrix24_CommentsTaskID", TaskID);

Bitrix24_CreateComment(TestParameters);
Bitrix24_DeleteComment(TestParameters);
Bitrix24_AddTaskComment(TestParameters);
Bitrix24_DeleteTaskComment(TestParameters);

OPI_Bitrix24.DeleteTask(URL, TaskID);

Expand Down Expand Up @@ -6274,27 +6274,27 @@ Procedure Bitrix24_GetPosts(FunctionParameters)

EndProcedure

Procedure Bitrix24_CreateComment(FunctionParameters)
Procedure Bitrix24_AddPostComment(FunctionParameters)

Text = "Comment for post";
PostID = FunctionParameters["Bitrix24_PostID"];
URL = FunctionParameters["Bitrix24_URL"];

Result = OPI_Bitrix24.CrateComment(URL, PostID, Text);
Result = OPI_Bitrix24.AddPostComment(URL, PostID, Text);

// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateComment (wh)", "Bitrix24");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "AddPostComment (wh)", "Bitrix24");

Check_BitrixNumber(Result); // SKIP

Text = "Another comment";
URL = FunctionParameters["Bitrix24_Domain"];
Token = FunctionParameters["Bitrix24_Token"];

Result = OPI_Bitrix24.CrateComment(URL, PostID, Text, Token);
Result = OPI_Bitrix24.AddPostComment(URL, PostID, Text, Token);

// END

// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CrateComment", "Bitrix24");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "AddPostComment", "Bitrix24");

Check_BitrixNumber(Result);

Expand Down Expand Up @@ -7641,16 +7641,16 @@ Procedure Bitrix24_UnmuteTask(FunctionParameters)

EndProcedure

Procedure Bitrix24_CreateComment(FunctionParameters)
Procedure Bitrix24_AddTaskComment(FunctionParameters)

URL = FunctionParameters["Bitrix24_URL"];
TaskID = FunctionParameters["Bitrix24_CommentsTaskID"];

Text = "Task impossible, let's split up";

Result = OPI_Bitrix24.CreateComment(URL, TaskID, Text);
Result = OPI_Bitrix24.AddTaskComment(URL, TaskID, Text);

// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateComment (хуto)", "Bitrix24");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "AddTaskComment (wh)", "Bitrix24");

Check_BitrixNumber(Result); // SKIP

Expand All @@ -7663,11 +7663,11 @@ Procedure Bitrix24_CreateComment(FunctionParameters)

Text = "Task uninpossible, don't split up";

Result = OPI_Bitrix24.CreateComment(URL, TaskID, Text, Token);
Result = OPI_Bitrix24.AddTaskComment(URL, TaskID, Text, Token);

// END

// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateComment", "Bitrix24");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "AddTaskComment", "Bitrix24");

Check_BitrixNumber(Result);

Expand All @@ -7677,27 +7677,27 @@ Procedure Bitrix24_CreateComment(FunctionParameters)

EndProcedure

Procedure Bitrix24_DeleteComment(FunctionParameters)
Procedure Bitrix24_DeleteTaskComment(FunctionParameters)

URL = FunctionParameters["Bitrix24_URL"];
TaskID = FunctionParameters["Bitrix24_CommentsTaskID"];
CommentID = FunctionParameters["Bitrix24_HookCommentID"];

Result = OPI_Bitrix24.DeleteComment(URL, TaskID, CommentID);
Result = OPI_Bitrix24.DeleteTaskComment(URL, TaskID, CommentID);

// !OInt OPI_TestDataRetrieval.WriteLog(Result, "DeleteComment (хуto)", "Bitrix24");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "DeleteCommentTasks (хуto)", "Bitrix24");

Check_BitrixTrue(Result); // SKIP

URL = FunctionParameters["Bitrix24_Domain"];
Token = FunctionParameters["Bitrix24_Token"];
CommentID = FunctionParameters["Bitrix24_CommentID"];

Result = OPI_Bitrix24.DeleteComment(URL, TaskID, CommentID, Token);
Result = OPI_Bitrix24.DeleteTaskComment(URL, TaskID, CommentID, Token);

// END

// !OInt OPI_TestDataRetrieval.WriteLog(Result, "DeleteComment", "Bitrix24");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "DeleteCommentTasks", "Bitrix24");

Check_BitrixTrue(Result);

Expand Down
Loading

0 comments on commit 2824a56

Please sign in to comment.