Last active
July 5, 2018 11:16
-
-
Save lipkau/5e3b3897ba71e76ad274b9910085be8c to your computer and use it in GitHub Desktop.
[AtlassianPS] [JiraPS] Subscribe to multiple Issues to be informed about changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -modules JiraPS | |
if (-not (Get-JiraSession)) { | |
Write-Error "Script requires a valid session. Use 'New-JiraSession' or edit script." | |
return | |
} | |
$users = @('jon.doe', 'jane.doe') | |
$query = "project = TV AND components = Backend" | |
Get-JiraIssue -Query $query | Foreach-Object { | |
foreach ($user in $users) { | |
Add-JiraIssueWatcher -Issue $_.key -Watcher $user | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment