Modifies an existing issue in JIRA
Set-JiraIssue [-Issue] <Object[]> [[-Summary] <String>] [[-Description] <String>] [[-FixVersion] <String[]>]
[[-Assignee] <Object>] [[-Label] <String[]>] [[-Fields] <PSCustomObject>] [[-AddComment] <String>]
[[-Credential] <PSCredential>] [-SkipNotification] [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
This function modifies an existing issue in JIRA. This can include changing the issue’s summary or description, or assigning the issue.
Set-JiraIssue -Issue TEST-01 -Summary 'Modified issue summary' -Description 'This issue has been modified by PowerShell' -SkipNotification
This example changes the summary and description of the JIRA issue TEST-01 without updating users by email about the change.
$issue = Get-JiraIssue TEST-01
$issue | Set-JiraIssue -Description "$($issue.Description)\`n\`nEdit: Also foo."
This example appends text to the end of an existing issue description by using
Get-JiraIssue
to obtain a reference to the current issue and description.
Set-JiraIssue -Issue TEST-01 -Assignee 'Unassigned'
This example removes the assignee from JIRA issue TEST-01.
Set-JiraIssue -Issue TEST-01 -Assignee 'Default'
This example will set the assgignee of JIRA issue TEST-01 to the value the project or type of the issue determine as default.
Set-JiraIssue -Issue TEST-01 -Assignee 'joe' -AddComment 'Dear [~joe], please review.'
This example assigns the JIRA Issue TEST-01 to ‘joe’ and adds a comment at one.
$parameters = @{
labels = @("DEPRECATED")
AddComment = "Updated with a script"
Fields = @{
customfield_10000 = @(
@{
"value" = "NAME"
}
)
}
}
Set-JiraIssue @parameters -Issue TEST-001, TEST-002
This example uses splatting to update “TEST-001” and “TEST-002”.
You can read more about splatting in: about_Splatting
Issue to be changed.
Can be a JiraPS.Issue
object, issue key, or internal issue ID.
Type: Object[]
Parameter Sets: (All)
Aliases: Key
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
New summary of the issue.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
New description of the issue.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Set the FixVersion of the issue, this will overwrite any present FixVersions
Type: String[]
Parameter Sets: (All)
Aliases: FixVersions
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
New assignee of the issue.
Use the value Unassigned
to remove the current assignee of the issue.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Labels to be set on the issue.
These will overwrite any existing labels on the issue.
For more granular control over issue labels, use Set-JiraIssueLabel
.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Any additional fields that should be updated.
Inspect about_JiraPS_CustomFields for more information.
Type: PSCustomObject
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Add a comment to the issue along with other changes.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Credentials to use to connect to JIRA.
If not specified, this function will use anonymous access.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Whether send notification to users about issue change or not
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Whether output should be provided after invoking this function.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
If the -PassThru
parameter is provided,
this function will provide a reference to the JIRA issue modified.
Otherwise, this function does not provide output.
This function requires either the -Credential
parameter to be passed or a persistent JIRA session.
See New-JiraSession
for more details.
If neither are supplied, this function will run with anonymous access to JIRA.