TaskServices.SetTaskAssigneeAsync
Description
The API re-assigns the specified task ID to the provided user ID inside the AI Command Center.
Signature [C#]
Task SetTaskAssigneeAsync(int userId, int taskId)
Properties
Input
| Property | Description |
|---|---|
| userId | Specify the user ID to re-assign the task. |
| taskId | Specify the task ID to be assigned to a user. |
Remarks
Use SetTaskAssigneeAsync API to re-assign the task to a specified user from the connected AI Command Center.
Example
C#
public void ReAssignTask()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
int userId = 1;
int taskId = 1;
Task.Run(() => context.Tasks.SetTaskAssigneeAsync(userId, taskId)).Wait();
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;
connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);
context.Open();
return context;
}