Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API response for found subtasks doesn't include "Resolution" field

Eitan Gur
Contributor
April 8, 2018

I will appreciate shared information about the following issue;

I am using rest api in order to parse some subtasks in our jira software (server). Getting the following json representation for subtask (while I need the resolution value - it is missing):

 

subtask_no_resolution.GIF{ u'fields': { u'issuetype': { u'avatarId': 13206,
u'description': u'',
u'iconUrl': u'http://jira:8080/secure/viewavatar?size=xsmall&avatarId=13206&avatarType=issuetype',
u'id': u'11101',
u'name': u'THIS IS A TEST',
u'self': u'http://jira:8080/rest/api/2/issuetype/11101',
u'subtask': True},
u'priority': { u'iconUrl': u'http://jira:8080/images/icons/priorities/minor.svg',
u'id': u'4',
u'name': u'Medium',
u'self': u'http://jira:8080/rest/api/2/priority/4'},
u'status': { u'description': u'The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.',
u'iconUrl': u'http://jira:8080/images/icons/statuses/closed.png',
u'id': u'6',
u'name': u'Closed',
u'self': u'http://jira:8080/rest/api/2/status/6',
u'statusCategory': { u'colorName': u'green',
u'id': 3,
u'key': u'done',
u'name': u'Done',
u'self': u'http://jira:8080/rest/api/2/statuscategory/3'}},
u'summary': u'THIS IS A TEST'},
u'id': u'237325',
u'key': u'TEST-4489',
u'self': u'http://jira:8080/rest/api/2/issue/237325'}

 

Thank you in advance

2 answers

1 accepted

0 votes
Answer accepted
Eitan Gur
Contributor
April 9, 2018

Seems that this is the way it works - when getting the parent issue representation it has a minimal fields scope for its subtasks.

So I've solved it by changing my code logic - when iterating on the subtasks of a given parent issue I am sending a get call for each subtask (the subtask itself), this way getting a full representation of all fields for each subtask (including the resolution field which I needed). 

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2018

Try to add to the rest call

?fields=*all

Eitan Gur
Contributor
April 8, 2018

@Alexey Matveev thanks for your answer. It seems that it has added the comment field representation. Although no effect on returned subtasks fields.

Suggest an answer

Log in or Sign up to answer