public WorkItem Fetch(string itemId) { var tfsWorkItemProvider = new WorkItemProvider(serviceLocatorSelector); var workItem = tfsWorkItemProvider.Fetch(itemId); return workItem.Project.Name.Equals("StudyGlobal", StringComparison.InvariantCultureIgnoreCase) ? MapWorkItem(workItem) : null; }
public void MigrateFrom(string itemId, string migratedId, bool close, string comment) { var tfsWorkItemProvider = new WorkItemProvider(serviceLocatorSelector); var workItem = tfsWorkItemProvider.Fetch(itemId); var title = workItem.Fields[CoreField.Title].Value; workItem.Fields[CoreField.Title].Value = string.Format(WorkItemTitleFormat, migratedId, title); workItem.Fields[CoreField.Description].Value = comment + "<br /><br />" + workItem.Fields[CoreField.Description].Value; workItem.Save(); }