From 818af6e9d6ba3f30e976f3ef20d6070ac50fa3e7 Mon Sep 17 00:00:00 2001 From: "Igor Abade V. Leite" Date: Thu, 10 Sep 2015 11:18:24 -0300 Subject: [PATCH] Fix conditional use of argument -Title --- TfsCmdlets/TfsCmdlets/WorkItem/New-TfsWorkItem.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TfsCmdlets/TfsCmdlets/WorkItem/New-TfsWorkItem.ps1 b/TfsCmdlets/TfsCmdlets/WorkItem/New-TfsWorkItem.ps1 index 5fcee742e..4cc1256cf 100644 --- a/TfsCmdlets/TfsCmdlets/WorkItem/New-TfsWorkItem.ps1 +++ b/TfsCmdlets/TfsCmdlets/WorkItem/New-TfsWorkItem.ps1 @@ -58,7 +58,11 @@ Function New-TfsWorkItem $wit = Get-TfsWorkItemType -Type $Type -Project $Project -Collection $Collection $wi = $wit.NewWorkItem() - $wi.Title = $Title + + if ($Title) + { + $wi.Title = $Title + } foreach($field in $Fields) {