Release 2.6.0+2898.5
This release fixes a bug in Get-TfsWorkItemQuery
and Get-TfsWorkItemQueryFolder
, and adds two new cmdlets.
New cmdlets
Undo-TfsWorkItemQueryRemoval
andUndo-TfsWorkItemQueryFolderRemoval
allow you to undo the deletion of a query or query folder. This is useful when you accidentally delete a query or query folder and want to restore it.
To restore a deleted query:
# You can either pipe the deleted query from Get-TfsWorkItemQuery to Undo-TfsWorkItemQueryRemoval...
Get-TfsWorkItemQuery 'My Deleted Query' -Scope Personal -Deleted | Undo-TfsWorkItemQueryRemoval
# ... or you can specify the query directly when calling Undo-TfsWorkItemQueryRemoval
Undo-TfsWorkItemQueryRemoval 'My Deleted Query' -Scope Personal
The same applies to query folders - with the distinction that folder can be restored recursively by specifying the -Recursive
switch. When -Recursive
is omitted, only the folder itself is restored, without any of its contents. You can then restore its contents by issuing further calls to Undo-TfsWorkItemQueryRemoval
and/or Undo-TfsWorkItemQueryFolderRemoval
.
# You can either pipe the deleted folder from Get-TfsWorkItemQueryFolder to Undo-TfsWorkItemQueryFolderRemoval...
Get-TfsWorkItemQueryFolder 'My Deleted Folder' -Scope Personal -Deleted | Undo-TfsWorkItemQueryRemoval -Recursive
# ... or you can specify the folder directly when calling Undo-TfsWorkItemQueryFolderRemoval
Undo-TfsWorkItemQueryFolderRemoval 'My Deleted Folder' -Scope Personal -Recursive
Fixes
- Fixes a bug in
Get-TfsWorkItemQuery
andGet-TfsWorkItemQueryFolder
where the-Deleted
switch was not respected and deleted items would not be returned.