public void CompleteTask( long taskId, CompleteTaskModel model )
Complete task
Syntax
public void CompleteTask( long taskId, CompleteTaskModel model )
Parameters
- taskId
- Type: System Int64
ID of the task to complete
- model
- Type: CompleteTaskModel
Task completion model
Remarks
Examples
//create the CompleteTaskModel structure and fill it in var model = new CompleteTaskModel(); //fill in the "notify coexecutors" field model.alertCoexecuters = true; //fill in the "Start date" field model.startDate = DateTime.Now; //fill in the "Time report" field (in minutes) model.worklogMinutes = 120; //create ICommentActionModel var commentModel = InterfaceActivator.Create<ICommentActionModel>(); //create object IComment var comment = InterfaceActivator.Create<IComment>(); //fill in the "Comment text" field comment.Text = "Comment"; //fill in the "Creation date" field comment.CreationDate = DateTime.Now; //fill in the "Comment author" field comment.CreationAuthor = PublicAPI.Portal.Security.User.GetCurrentUser(); //сохраняем comment comment.Save(); //fill in the "Comment" field commentModel.Comment = comment; //fill in the CommentActionModel model.actionModel = commentModel; //complete the task PublicAPI.Portal.TaskBase.Task.CompleteTask(taskId, model);
See Also