I connected to VSTS Server by using:
$teamProjectCollection = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollectionFactory]::GetTeamProjectCollection("http://wonderful01:8080")
$ws = $teamProjectCollection.GetService([type]"Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore")
$closebug=$ws.getworkitem(801089)
After that I ran $closebug
, and got one of the items I need to modify:
Value : Fixed
OriginalValue : Fixed
FieldDefinition : Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinition
Id : 10001
Name : Substatus
ReferenceName : Microsoft.SQL.Substatus
IsDirty : False
IsEditable : True
IsComputed : False
IsRequired : True
AllowedValues : {Verification Not Needed, Verified}
HasAllowedValuesList : True
IsLimitedToAllowedValues : True
ProhibitedValues : {}
HasPatternMatch : False
Status : InvalidListValue
IsValid : False
WorkItem : Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem
So how can I change the vaule from "fixed" to "verified"?
I am coming to answer my question. After a long time investigation I found that substatus could be invoked by:
To change value from "fixed" to "resolved", use:
Then update the change:
I am not quite understanding why it works, and I think there should be a better way to do it. Welcome comments.