Reputation: 597
I am programmatically copying data and need to remove the "Assigned To" person and set it to "Unassigned".
In my results, whenever there is an assigned individual, it keeps it that way and ignores my re-assignment:
childWorkItem.State = "New";
childWorkItem.Fields["System.AssignedTo"].Value = null;
childWorkItem.Save();
I also tried:
childWorkItem.State = "New";
childWorkItem.Fields["System.AssignedTo"].Value = "Unassigned";
childWorkItem.Save();
But "Unassigned" is an invalid value.
Upvotes: 1
Views: 1911
Reputation: 129
Just run into same problem and on my case assigning “” fixed the issue and I wanted to share.
Upvotes: 3
Reputation: 597
I found the answer, instead of using System.AssignedTo I uased the user-friendly name of "Assigned To" and changed the middle line to:
childWorkItem.Fields["Assigned To"].Value = null;
Happy trailing
Upvotes: 1