< Back

Update-AzureDevOpsWorkItem

Sat Jan 11, 2020 10:29 am

NAME Update-AzureDevOpsWorkItem



SYNOPSIS

Takes a work item as input, compares it to the work item on the server, generates, and sends a patch file to

update all changed properties of the work item provided.





SYNTAX

Update-AzureDevOpsWorkItem -Id <Int64> -UpdatedWorkItem <WorkItem> [-OriginalWorkItem <WorkItem>]

[<CommonParameters>]





DESCRIPTION







PARAMETERS

-Id <Int64>

The Id of the workitem in the project your currently working on.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UpdatedWorkItem <WorkItem>

The updated version of the work item that you want to save in Azure Dev Ops



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-OriginalWorkItem <WorkItem>

The work item in its current state in Azure Dev Ops. This must be unmodified from the version stored in Azure

or the update may not go as planned



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS









NOTES









-------------------------- Example 1 --------------------------



$wi = Get-AzureDevOpsWorkItem -Id 123456

$wi.fields."Microsoft.VSTS.Common.Priority" = 3

Update-AzureDevOpsWorkItem -Id $wi.Id -UpdateWorkItem $wi











-------------------------- Example 2 --------------------------



$wi = Get-AzureDevOpsWorkItem -Id 123456

$origionalwi = Get-AzureDevOpsWorkItem -Id 123456

$wi.fields."Microsoft.VSTS.Common.Priority" = 3

Update-AzureDevOpsWorkItem -Id $wi.Id -UpdateWorkItem $wi -OriginalWorkItem $origionalwi













RELATED LINKS

Online Documentation http://devopsmodule.utmonline.net/docs/ ... eworkitem/