MCPcopy Create free account
hub / github.com/GmpABR/NexusFlow / SetTaskLabelsAsync

Method SetTaskLabelsAsync

backend/Services/TaskService.cs:885–899  ·  view source on GitHub ↗
(int taskId, List<int> labelIds, int userId)

Source from the content-addressed store, hash-verified

883 }
884
885 public async Task<bool> SetTaskLabelsAsync(int taskId, List<int> labelIds, int userId)
886 {
887 var existing = await _db.TaskLabels.Where(tl => tl.TaskCardId == taskId).ToListAsync();
888 _db.TaskLabels.RemoveRange(existing);
889
890 foreach (var lid in labelIds.Distinct())
891 {
892 _db.TaskLabels.Add(new TaskLabel { TaskCardId = taskId, LabelId = lid });
893 }
894
895 await _db.SaveChangesAsync();
896 await LogActivity(taskId, userId, "Labels Updated", "Updated task labels");
897
898 return true;
899 }
900
901 // Attachment Methods
902 public async Task<List<AttachmentDto>> GetAttachmentsAsync(int taskId, int userId)

Callers 1

SetLabelsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected