Problem
jtk issues search --jql '...' -o json returns null for all custom fields, even when those fields have values on the tickets. This forces users to drop down to raw curl calls against the Jira REST API for any query that needs custom field data.
The inconsistency:
| Command |
Custom fields in JSON? |
jtk issue get <key> -o json |
Yes |
jtk sprints issues <id> -o json |
Yes |
jtk issues search --jql '...' -o json |
No — all null |
Reproduction
# Single ticket — custom fields present
jtk issue get MON-4036 -o json | jq '{sp: .fields.customfield_10035, changeType: .fields.customfield_10005}'
# => {"sp": 3.0, "changeType": {"value": "Feature", ...}}
# JQL search — custom fields null
jtk issues search --jql 'key = MON-4036' -o json | jq '.[0] | {sp: .fields.customfield_10035, changeType: .fields.customfield_10005}'
# => {"sp": null, "changeType": null}
Root Cause (likely)
The Jira REST API search endpoint accepts a fields parameter to control which fields are returned. If issues search isn't passing custom fields in that parameter (or is using a hardcoded field list that only includes built-in fields), the API won't return them.
Proposed Fix
- Pass custom fields through: If the search endpoint supports a
--fields flag, include custom fields. If not, don't restrict the fields parameter so Jira returns everything.
- Bonus: Add a
--fields flag to jtk issues search so users can specify exactly which fields they want (mirrors the REST API's fields parameter). Example:
jtk issues search --jql '...' --fields key,summary,customfield_10005,customfield_10035 -o json
Version
Problem
jtk issues search --jql '...' -o jsonreturnsnullfor all custom fields, even when those fields have values on the tickets. This forces users to drop down to rawcurlcalls against the Jira REST API for any query that needs custom field data.The inconsistency:
jtk issue get <key> -o jsonjtk sprints issues <id> -o jsonjtk issues search --jql '...' -o jsonReproduction
Root Cause (likely)
The Jira REST API search endpoint accepts a
fieldsparameter to control which fields are returned. Ifissues searchisn't passing custom fields in that parameter (or is using a hardcoded field list that only includes built-in fields), the API won't return them.Proposed Fix
--fieldsflag, include custom fields. If not, don't restrict thefieldsparameter so Jira returns everything.--fieldsflag tojtk issues searchso users can specify exactly which fields they want (mirrors the REST API'sfieldsparameter). Example:jtk issues search --jql '...' --fields key,summary,customfield_10005,customfield_10035 -o jsonVersion