Skip to content

Commit

Permalink
Fix argument naming and pipelined return
Browse files Browse the repository at this point in the history
  • Loading branch information
igoravl committed Sep 10, 2015
1 parent b269f0d commit 0a11812
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions TfsCmdlets/TfsCmdlets/WorkItem/Get-TfsWorkItemType.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ Function Get-TfsWorkItemType
Param
(
[Parameter(Position=0)]
[SupportsWildcards()]
[Alias("Name")]
[string]
$Name = "*",
$Type = "*",

[Parameter(ValueFromPipeline=$true)]
[object]
Expand All @@ -43,7 +45,13 @@ Function Get-TfsWorkItemType

Process
{
$tp = Get-TfsTeamProject $Project $Collection
if ($Type -is [Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemType])
{
return $Type
}

$tp = Get-TfsTeamProject -Project $Project -Collection $Collection

return $tp.WorkItemTypes | ? Name -Like $Name
}
}

0 comments on commit 0a11812

Please sign in to comment.