Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error setting field values with Set-TfsWorkItem #132

Closed
igoravl opened this issue May 5, 2021 · 0 comments · Fixed by #138
Closed

Error setting field values with Set-TfsWorkItem #132

igoravl opened this issue May 5, 2021 · 0 comments · Fixed by #138
Labels

Comments

@igoravl
Copy link
Owner

igoravl commented May 5, 2021

When invoking Set-TfsWorkItem with -Fields argument, it throws an exception:

PS > Set-TfsWorkItem 1 -Fields @{'System.AreaPath' = 'foo'; 'System.IterationPath' = 'bar'}
Set-TfsWorkItem : Unable to cast object of type 'System.Collections.Hashtable' to type 'System.String[]'.
At line:1 char:1
+ Set-TfsWorkItem 1 -Fields @{'System.AreaPath' = 'foo...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-TfsWorkItem], InvalidCastException
    + FullyQualifiedErrorId : System.InvalidCastException,TfsCmdlets.Cmdlets.WorkItem.SetWorkItem
@igoravl igoravl added the bug label May 5, 2021
igoravl added a commit that referenced this issue Jul 31, 2021
igoravl added a commit that referenced this issue Aug 2, 2021
@igoravl igoravl linked a pull request Aug 2, 2021 that will close this issue
@igoravl igoravl closed this as completed Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant