public void MakeTaskClose(int taskId, int projectId)
{
this.taskProcessor.CloseTask(taskId);
HumanTask humanTask = this.taskProcessor.GetTaskById(taskId);
HumanTaskHistory humanTaskHistory = new HumanTaskHistory
{
Action = ChangeHistoryTypes.Close,
ChangeDateTime = DateTime.Now,
NewAssigneeId = humanTask.AssigneeId,
UserId = this.userProcessor.GetUserByName(User.Identity.Name).Id,
NewDescription = humanTask.Description,
NewPriority = humanTask.Priority,
NewName = humanTask.Name,
Task = humanTask,
TaskId = taskId
};
taskProcessor.AddHistory(humanTaskHistory);
this.newsProcessor.CreateNewsForUsersInProject(humanTaskHistory, humanTask.ProjectId);
}