Skip to content

Commit 1acf48a

Browse files
New/Set-ADOWorkItem: Fixing piping issue.
1 parent 5e98043 commit 1acf48a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

New-ADOWorkItem.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@
169169

170170
end {
171171
$c, $t, $progId = 0, $q.Count, [Random]::new().Next()
172+
$originalInvokeParams = $invokeParams
172173
while ($q.Count) {
173174
. $dq $q
174175
$uriBase = "$Server".TrimEnd('/'), $Organization, $Project -join '/'
175-
176+
$invokeParams = @{} + $originalInvokeParams
176177

177178
$c++
178179
Write-Progress "Creating" "$type [$c/$t]" -PercentComplete ($c * 100 / $t) -Id $progId

Set-ADOWorkItem.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,11 @@
217217
}
218218

219219
end {
220-
$c, $t, $progId = 0, $q.Count, [Random]::new().Next()
220+
$c, $t, $progId = 0, $q.Count, [Random]::new().Next()
221+
$originalInvokeParams = $invokeParams
221222
while ($q.Count) {
222223
. $dq $q
223-
224+
$invokeParams = @{} + $originalInvokeParams
224225
Write-Progress "Updating Work Items" " [$c of $t] $ID" -PercentComplete ($c * 100 /$t) -Id $progId
225226

226227
$uriBase = "$Server".TrimEnd('/'), $Organization, $Project -join '/'

0 commit comments

Comments
 (0)