Copy-TfsWorkItem
Creates a copy of a work item, optionally changing its type.
Table of Contents
Syntax
Copy-TfsWorkItem
[-WorkItem] <object>
[-Collection <object>]
[-DestinationProject <object>]
[-IncludeAttachments]
[-IncludeLinks]
[-NewType <object>]
[-Passthru <string>]
[-Project <object>]
Description
Use this cmdlet to create a copy of a work item (using its latest saved state/revision data) that is of the specified work item type. By default, the copy retains the same type of the original work item, unless the Type argument is specified
Parameters
Specifies the URL to the Team Project Collection or Azure DevOps Organization to connect to, a TfsTeamProjectCollection object (Windows PowerShell only), or a VssConnection object. You can also connect to an Azure DevOps Services organizations by simply providing its name instead of the full URL. For more details, see the Get-TfsTeamProjectCollection cmdlet. When omitted, it defaults to the connection set by Connect-TfsTeamProjectCollection (if any).
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the team project where the work item will be copied into. When omitted, the copy will be created in the same team project of the source work item.
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Creates a duplicate of all attachments present in the source work item and adds them to the new work item.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Creates a copy of all links present in the source work item and adds them to the new work item. Only the links are copied; linked artifacts themselves are not copied. In other words, both the original and the copy work items point to the same linked artifacts.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the type of the new work item. When omitted, the type of the original work item is preserved.
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Returns the results of the command. It takes one of the following values: Original (returns the original work item), Copy (returns the newly created work item copy) or None.
Type | string |
Position | (Named) |
Default Value | Copy |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the source team project from where the work item will be copied. When omitted, it defaults to the team project of the piped work item (if any), or to the connection set by Connect-TfsTeamProject.
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies a work item. Valid values are the work item ID or an instance of Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem.
Type | object |
Position | 0 |
Default Value | (N/A) |
Accept pipeline input | True (byvalue) |
Accept wildcard characters | False |
Inputs
System.Object
Specifies a work item. Valid values are the work item ID or an instance of Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem.