get¶
Get one or more Jira issues by their keys.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
issue-key |
One or more Jira issue keys (e.g., FOO-123) |
Flags¶
| Flag | Default | Description |
|---|---|---|
--expand |
false | Expand changelog and other fields |
--fields |
Comma-separated list of fields to include |
Plus global flags.
Examples¶
Single Issue¶
Multiple Issues¶
# Get multiple issues
gojira get FOO-123 FOO-456 FOO-789
# Output as JSON array
gojira get FOO-123 FOO-456 --json
With Changelog¶
Output¶
JSON Format¶
[
{
"key": "FOO-123",
"fields": {
"summary": "Fix login bug",
"status": {
"name": "Open"
},
"issuetype": {
"name": "Bug"
},
"priority": {
"name": "High"
},
"assignee": {
"displayName": "John Doe"
},
"created": "2024-01-15T10:30:00.000+0000",
"updated": "2024-01-16T14:20:00.000+0000"
}
}
]
Table Format¶
Use Cases¶
Scripting¶
# Get issue and extract status
STATUS=$(gojira get FOO-123 -q | jq -r '.[0].fields.status.name')
echo "Issue status: $STATUS"
# Check if issue is closed
if [[ $(gojira get FOO-123 -q | jq -r '.[0].fields.status.name') == "Closed" ]]; then
echo "Issue is closed"
fi