Skip to content

Commit e570b7d

Browse files
authored
Add SuppressNotifications support (2.7.0) (#222)
* Add SuppressNotifications support +semver: minor * Fix release date
1 parent a8ad84b commit e570b7d

File tree

6 files changed

+31
-12
lines changed

6 files changed

+31
-12
lines changed

CSharp/TfsCmdlets/Cmdlets/WorkItem/NewWorkItem.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,11 @@ partial class NewWorkItem
120120
/// </summary>
121121
[Parameter]
122122
public SwitchParameter BypassRules { get; set; }
123+
124+
/// <summary>
125+
/// Do not fire any notifications for this change. Useful for bulk operations and automated processes.
126+
/// </summary>
127+
[Parameter]
128+
public SwitchParameter SuppressNotifications { get; set; }
123129
}
124130
}

CSharp/TfsCmdlets/Cmdlets/WorkItem/SetWorkItem.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,11 @@ partial class SetWorkItem
131131
/// </summary>
132132
[Parameter]
133133
public SwitchParameter BypassRules { get; set; }
134+
135+
/// <summary>
136+
/// Do not fire any notifications for this change. Useful for bulk operations and automated processes.
137+
/// </summary>
138+
[Parameter]
139+
public SwitchParameter SuppressNotifications { get; set; }
134140
}
135141
}

CSharp/TfsCmdlets/Controllers/WorkItem/NewWorkItemController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected override IEnumerable Run()
2222

2323
var client = Data.GetClient<WorkItemTrackingHttpClient>();
2424

25-
var result = client.CreateWorkItemAsync(Builder.GetJson(wi), Project.Name, type.Name, false, BypassRules)
25+
var result = client.CreateWorkItemAsync(Builder.GetJson(wi), Project.Name, type.Name, false, BypassRules, SuppressNotifications)
2626
.GetResult("Error creating work item");
2727

2828
yield return result;

CSharp/TfsCmdlets/Controllers/WorkItem/SetWorkItemController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected override IEnumerable Run()
1919

2020
foreach (var wi in Items)
2121
{
22-
var result = client.UpdateWorkItemAsync(Builder.GetJson(wi), (int)wi.Id, false, BypassRules)
22+
var result = client.UpdateWorkItemAsync(Builder.GetJson(wi), (int)wi.Id, false, BypassRules, SuppressNotifications)
2323
.GetResult("Error updating work item");
2424

2525
yield return result;

Docs/ReleaseNotes/2.7.0.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.7.0 (_03/Jul/2024_)
4+
5+
This release adds support for suppressing notifications when creating or updating work items.
6+
7+
## New features
8+
9+
* Adds `-SuppressNotifications` switch to `New-TfsWorkItem` and `Set-TfsWorkItem` to suppress notifications when creating or updating work items. This is useful when you are creating or updating a large number of work items and don't want to flood the notification feed of team members.

RELEASENOTES.md

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

3-
## Version 2.6.1 (_15/May/2024_)
3+
## Version 2.7.0 (_03/Jul/2024_)
44

5-
Ouch! It's been a while since the last release! Sometimes life gets in the way, but I'm back!
5+
This release adds support for suppressing notifications when creating or updating work items.
66

7-
This release fixes bugs in `Get-TfsWorkItem`, `Get-TfsArea`, `Get-TfsIteration`, `Invoke-TfsRestApi`, `New-TfsTeam` and `Set-TfsTeam`.
7+
## New features
88

9-
## Fixes
10-
11-
* Fixes [#211](https://github.com/igoravl/TfsCmdlets/issues/211), where `Get-TfsWorkItem` would throw an error when the `-Fields` parameter was "*".
12-
* Fixes a bug in `Invoke-TfsRestApi` where Azure DevOps APIs whose responses were missing the `content-type` header would throw an error.
13-
* Fixes a bug in `Get-TfsArea` and `Get-TfsIteration` where team projects containing Regex-reserved characters (such as parentheses) would throw an error. This bug would indirectly affect `New-TfsTeam` and `Set-TfsTeam` due to their reliance on the same underlying class to handle area and iteration paths when creating/updating teams.
14-
* Fixes a bug in `Get-TfsWorkItem` where the `-AreaPath` and `-IterationPath` parameters would not work when the specified path either started with a backslash or did not contain the team project name.
15-
* Adds the installed module version to the _Azure DevOps Shell_ startup command to prevent loading an older version of the module when the PSModulePath variable contains an older version of the module listed earlier in the search path.
9+
* Adds `-SuppressNotifications` switch to `New-TfsWorkItem` and `Set-TfsWorkItem` to suppress notifications when creating or updating work items. This is useful when you are creating or updating a large number of work items and don't want to flood the notification feed of team members.
1610

1711
-----------------------
1812

1913
## Previous Versions
2014

15+
### Version 2.6.1 (_15/May/2024_)
16+
17+
See release notes [here](Docs/ReleaseNotes/2.6.1.md).
18+
2119
### Version 2.6.0 (_30/Sep/2022_)
2220

2321
See release notes [here](Docs/ReleaseNotes/2.6.0.md).

0 commit comments

Comments
 (0)