Skip to content

Commit 2256049

Browse files
authored
Fix handling of Id field (#173)
* Fix handling of Id field * Update release notes * Handle deleted work items * Remove extra blank line * Invert priority
1 parent f10d5b9 commit 2256049

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

Docs/ReleaseNotes/2.3.2.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# TfsCmdlets Release Notes
2+
3+
## Version 2.3.2 (_18/May/2022_)
4+
5+
This release fixes a [bug]([#172](https://github.com/igoravl/TfsCmdlets/issues/172)) in `Get-TfsWorkItem`.
6+
7+
## Fixes
8+
9+
* Under certain circumstances, `Get-TfsWorkItem` would return an invalid ID, due to a change in the response from the WorkItem REST API (fixes [#172](https://github.com/igoravl/TfsCmdlets/issues/172))

PS/_Types/Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- ScriptProperty:
22
Name: Id
3-
GetScriptBlock: ([uri]$this.Url).Segments[-1]
3+
GetScriptBlock: $uri = ([uri]$this.Url); if($uri.Segments[-2] -eq 'revisions/'){[int]$uri.Segments[-3]}else{[int]$uri.Segments[-1]}
44
- ScriptProperty:
55
Name: Title
66
GetScriptBlock: $this.Fields['System.Title']

RELEASENOTES.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# TfsCmdlets Release Notes
22

3-
## Version 2.3.1 (_08/Apr/2022_)
3+
## Version 2.3.2 (_18/May/2022_)
44

5-
This release brings a few minor fixes to Team cmdlets and to pipeline handling. No new features and/or cmdlets have been introduced in this version.
5+
This release fixes a [bug]([#172](https://github.com/igoravl/TfsCmdlets/issues/172)) in `Get-TfsWorkItem`.
66

77
## Fixes
88

9-
* `Get-TfsTeam` and `Get-TfsTeamProject` were limited to a maximum of 100 results. This has been fixed. Now they will return all results.
10-
* Under certain circumstances, `Get-TfsTeamProjectCollection` (and, by extension, Get-TfsOrganization) would throw an error with the message "_Invalid or non-existent Collection System.Object[]._" (fixes [#165](https://github.com/igoravl/TfsCmdlets/issues/165))
11-
* Fixes a caching bug in the handling of the -Project parameter that could lead to the wrong project being returned.
12-
* Fixes pipelining bugs in several cmdlets (most noticeably `Get-TfsReposity`, which wouldn't work when connected to a pipeline).
13-
* Improves the readability of ShouldProcess (Confirm / WhatIf) output in several cmdlets.
9+
* Under certain circumstances, `Get-TfsWorkItem` would return an invalid ID, due to a change in the response from the WorkItem REST API (fixes [#172](https://github.com/igoravl/TfsCmdlets/issues/172))
1410

1511
-----------------------
1612

1713
## Previous Versions
1814

15+
### Version 2.3.1 (_08/Apr/2022_)
16+
17+
See release notes [here](Docs/ReleaseNotes/2.3.1.md).
18+
1919
### Version 2.3.0 (_04/Mar/2022_)
2020

2121
See release notes [here](Docs/ReleaseNotes/2.3.0.md).

0 commit comments

Comments
 (0)