< Back
Set-JiraIssue
Post
NAME Set-JiraIssue
SYNOPSIS
Modifies an existing issue in JIRA
SYNTAX
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>]
DESCRIPTION
This function modifies an existing issue in JIRA. This can include changing the issue's summary or description, or
assigning the issue.
PARAMETERS
-Issue <Object[]>
Issue to be changed.
Can be a `JiraPS.Issue` object, issue key, or internal issue ID.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-Summary <String>
New summary of the issue.
Required? false
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Description <String>
New description of the issue.
Required? false
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-FixVersion <String[]>
Set the FixVersion of the issue, this will overwrite any present FixVersions
Required? false
Position? 4
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Assignee <Object>
New assignee of the issue.
Use the value `Unassigned` to remove the current assignee of the issue.
Required? false
Position? 5
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Label <String[]>
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`.
Required? false
Position? 6
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Fields <PSCustomObject>
Any additional fields that should be updated.
Inspect about_JiraPS_CustomFields (../../about/custom-fields.html)for more information.
Required? false
Position? 7
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AddComment <String>
Add a comment to the issue along with other changes.
Required? false
Position? 8
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Credential <PSCredential>
Credentials to use to connect to JIRA.
If not specified, this function will use anonymous access.
Required? false
Position? 9
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SkipNotification [<SwitchParameter>]
Whether send notification to users about issue change or not
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Whether output should be provided after invoking this function.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
[JiraPS.Issue] / [String] / [Int]
OUTPUTS
[JiraPS.Issue]
If the `-PassThru` parameter is provided, this function will provide a reference to the JIRA issue modified.
Otherwise, this function does not provide output.
NOTES
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.
-------------------------- EXAMPLE 1 --------------------------
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.
-------------------------- EXAMPLE 2 --------------------------
$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.
-------------------------- EXAMPLE 3 --------------------------
Set-JiraIssue -Issue TEST-01 -Assignee 'Unassigned'
This example removes the assignee from JIRA issue TEST-01.
-------------------------- EXAMPLE 4 --------------------------
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.
-------------------------- EXAMPLE 5 --------------------------
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.
-------------------------- EXAMPLE 6 --------------------------
$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
RELATED LINKS
Online Version: https://atlassianps.org/docs/JiraPS/com ... JiraIssue/
about_JiraPS_UpdatingIssues
about_JiraPS_CustomFields
Get-JiraIssueEditMetadata
Get-JiraComponent
Get-JiraField
Get-JiraPriority
Get-JiraProject
Get-JiraVersion
Set-JiraIssueLabel
SYNOPSIS
Modifies an existing issue in JIRA
SYNTAX
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>]
DESCRIPTION
This function modifies an existing issue in JIRA. This can include changing the issue's summary or description, or
assigning the issue.
PARAMETERS
-Issue <Object[]>
Issue to be changed.
Can be a `JiraPS.Issue` object, issue key, or internal issue ID.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName, ByValue)
Accept wildcard characters? false
-Summary <String>
New summary of the issue.
Required? false
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Description <String>
New description of the issue.
Required? false
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-FixVersion <String[]>
Set the FixVersion of the issue, this will overwrite any present FixVersions
Required? false
Position? 4
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Assignee <Object>
New assignee of the issue.
Use the value `Unassigned` to remove the current assignee of the issue.
Required? false
Position? 5
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Label <String[]>
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`.
Required? false
Position? 6
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Fields <PSCustomObject>
Any additional fields that should be updated.
Inspect about_JiraPS_CustomFields (../../about/custom-fields.html)for more information.
Required? false
Position? 7
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AddComment <String>
Add a comment to the issue along with other changes.
Required? false
Position? 8
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Credential <PSCredential>
Credentials to use to connect to JIRA.
If not specified, this function will use anonymous access.
Required? false
Position? 9
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SkipNotification [<SwitchParameter>]
Whether send notification to users about issue change or not
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Whether output should be provided after invoking this function.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
[JiraPS.Issue] / [String] / [Int]
OUTPUTS
[JiraPS.Issue]
If the `-PassThru` parameter is provided, this function will provide a reference to the JIRA issue modified.
Otherwise, this function does not provide output.
NOTES
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.
-------------------------- EXAMPLE 1 --------------------------
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.
-------------------------- EXAMPLE 2 --------------------------
$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.
-------------------------- EXAMPLE 3 --------------------------
Set-JiraIssue -Issue TEST-01 -Assignee 'Unassigned'
This example removes the assignee from JIRA issue TEST-01.
-------------------------- EXAMPLE 4 --------------------------
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.
-------------------------- EXAMPLE 5 --------------------------
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.
-------------------------- EXAMPLE 6 --------------------------
$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
RELATED LINKS
Online Version: https://atlassianps.org/docs/JiraPS/com ... JiraIssue/
about_JiraPS_UpdatingIssues
about_JiraPS_CustomFields
Get-JiraIssueEditMetadata
Get-JiraComponent
Get-JiraField
Get-JiraPriority
Get-JiraProject
Get-JiraVersion
Set-JiraIssueLabel