private void AddNewUpdate() { var wi = new WorkItemUpdateViewModel { Fields = _fields, Relations = _relations }; _updates.Add(wi); }
private bool WasResolvedByTeamMember(WorkItemUpdateViewModel update, WorkItemResolutionRequest request) { var assignedTo = update[WorkItemAssignedToField].IsEmpty() ? request.WorkItem[WorkItemAssignedToField] : update[WorkItemAssignedToField].OldValue; var resolvedBy = update[WorkItemResolvedByField].NewValue; return(update[WorkItemStateField].NewValue == WorkItemStateResolved && update[WorkItemStateField].OldValue != WorkItemStateClosed && request.Team.Any(t => (!string.IsNullOrEmpty(assignedTo) && assignedTo.Contains(t.Email)) || (!string.IsNullOrEmpty(resolvedBy) && resolvedBy.Contains(t.Email)))); }
public VstsWorkItemUpdate(WorkItemUpdateViewModel update) { _update = update; }