Ich verwende Team Foundation Server 2015 Update 3. Ich versuche Arbeitselemente aus meinem C# -Projekt zu erstellen. Ich erstelle Arbeitselemente mit tfs api von Microsoft.TeamFoundation.WorkItemTracking.Client und Microsoft.TeamFoundation.Client.TFS konnte Workitem nicht speichern
Und es kann Arbeitselement nicht vor dem Speichern validieren.
Problem mit dem zugewiesenen Feld. Ich habe versucht, Werte wie "Alexey Solovyev" (Mein Anzeigename), ASolovyev (Login) und DOMAIN \ ASolovyev zu setzen. In allen Fällen habe ich eine Meldung in Arraylist von ValidationErrors "InvalidListValue".
Was ist hier falsch?
public static bool Save(WorkItem wi)
{
ArrayList validationErrors = wi.Validate();
if (validationErrors.Count == 0)
{
try {
wi.Save();
}
catch (Exception e)
{
wi.Fields["Conditions_plain"].Value = "Exception Message";
wi.Save();
}
return true;
}
else
return false;
}
public static bool createTask()
{
Project proj = _wiStore.Projects["MyProject"];
WorkItem wi = new WorkItem(proj.WorkItemTypes["Task"]);
wi.Fields["Title"].Value = "AUTOGENERATED!";
wi.Fields["Assigned to"].Value = "Alexey Solovyev";
return Save(wi);
}
Wo ist Ihr Beispielcode? – pquest
Aktualisiert Hauptpost –
Vielleicht [diese] (http://stackoverflow.com/questions/30641279/how-to-set-assigned-to-in-fts-work-item-through-code) SO Frage hilft –