Returns information about an issue in JIRA.
Get-JiraIssue [-Key] <String[]> [-Fields <String[]>] [-IncludeTotalCount]
[-Skip <UInt64>] [-First <UInt64>] [-Credential <PSCredential>] [<CommonParameters>]
Get-JiraIssue [-InputObject] <Object[]> [-Fields <String[]>] [-IncludeTotalCount]
[-Skip <UInt64>] [-First <UInt64>] [-Credential <PSCredential>] [<CommonParameters>]
Get-JiraIssue -Query <String> [-Fields <String[]>] [-StartIndex <UInt32>]
[-MaxResults <UInt32>] [[PageSize] <UInt32>] [-IncludeTotalCount] [-Skip <UInt64>]
[-First <UInt64>] [-Credential <PSCredential>] [<CommonParameters>]
Get-JiraIssue -Filter <Object> [-Fields <String[]>][-StartIndex <UInt32>]
[-MaxResults <UInt32>] [[PageSize] <UInt32>] [-IncludeTotalCount] [-Skip <UInt64>]
[-First <UInt64>] [-Credential <PSCredential>] [<CommonParameters>]
This function retrieves the data of a issue in JIRA.
This function can be used to directly query JIRA for a specific issue key or internal issue ID. It can also be used to query JIRA for issues matching a specific criteria using JQL (Jira Query Language).
For more details on JQL syntax, see this article from Atlassian: https://confluence.atlassian.com/display/JIRA/Advanced+Searching
Output from this function can be piped to various other functions in this module, including Set-JiraIssue
, Add-JiraIssueComment
, and Invoke-JiraIssueTransition
.
Get-JiraIssue -Key TEST-001
This example fetches the issue “TEST-001”.
The default Format-Table
view of a Jira issue only shows the value of “Key”, “Summary”, “Status” and “Created”.
This can be manipulated with
Format-Table
,Format-List
andSelect-Object
Get-JiraIssue "TEST-002" | Add-JiraIssueComment "Test comment from PowerShell"
This example illustrates pipeline use from Get-JiraIssue
to Add-JiraIssueComment
.
Get-JiraIssue -Query 'project = "TEST" AND created >= -5d'
This example illustrates using the -Query
parameter and JQL syntax to query Jira for matching issues.
Get-JiraIssue -InputObject $oldIssue
This example illustrates how to get an update of an issue from an old result of Get-JiraIssue
stored in $oldIssue.
Get-JiraFilter -Id 12345 | Get-JiraIssue
This example retrieves all issues that match the criteria in the saved filter with id 12345.
Get-JiraFilter 12345 | Get-JiraIssue | Select-Object *
This prints all fields of the issue to the console.
Get-JiraIssue -Query "project = TEST" -Fields "key", "summary", "assignee"
This example retrieves all issues in project “TEST” - but only the 3 properties listed above: key, summary and assignee
By retrieving only the data really needed, the payload the server sends is reduced, which speeds up the query.
Key of the issue to search for.
Type: String[]
Parameter Sets: ByIssueKey
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Object of an issue to search for.
Type: Object[]
Parameter Sets: ByInputObject
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
JQL query for which to search for.
Type: String
Parameter Sets: ByJQL
Aliases: JQL
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Object of an existing JIRA filter from which the results will be returned.
Type: Object
Parameter Sets: ByFilter
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Field you would like to select from your issue. By default, all fields are returned.
Allowed values:
"*all"
- return all fields."*navigable"
- return navigable fields only."summary", "comment"
- return the summary and comments fields only."-comment"
- return all fields except comments."*all", "-comment"
- same as aboveType: String[]
Parameter Sets: ByFilter
Aliases:
Required: False
Position: Named
Default value: "*all"
Accept pipeline input: False
Accept wildcard characters: False
NOTE: This parameter has been marked as deprecated and will be removed with the next major release. Use
-Skip
instead.
Index of the first issue to return.
This can be used to “page” through issues in a large collection or a slow connection.
Type: UInt32
Parameter Sets: ByJQL, ByFilter
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
NOTE: This parameter has been marked as deprecated and will be removed with the next major release. Use
-First
instead.
Maximum number of results to return.
By default, all issues will be returned.
Type: UInt32
Parameter Sets: ByJQL, ByFilter
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
How many issues should be returned per call to JIRA.
This parameter only has effect if -MaxResults
is not provided or set to 0.
Normally, you should not need to adjust this parameter, but if the REST calls take a long time, try playing with different values here.
Type: UInt32
Parameter Sets: ByJQL, ByFilter
Aliases:
Required: False
Position: Named
Default value: 25
Accept pipeline input: False
Accept wildcard characters: False
Causes an extra output of the total count at the beginning.
Note this is actually a uInt64, but with a custom string representation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Controls how many things will be skipped before starting output.
Defaults to 0.
Type: UInt64
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
Indicates how many items to return.
Type: UInt64
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 18446744073709551615
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: 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).
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.