Parent sometimes missing from REST API issue call

Larry Weisberg January 7, 2021

Hi - I am working on a python script to collect information (time spent) on subtasks (ordered by day). Anyway, once I have a list of subtask ID I make a call like:

https://pragroup.atlassian.net/rest/api/3/issue/121269?jql=121269&maxResults=1000&startAt=0

 

Most of the time, one of the keys in the JSON that I can follow is ['parent']['fields']['summary'] in order to give me info (name) about the parent story.  However for some subtasks there is no 'parent' hierarchy returned.

Why would this not be consistent over all subtasks?

Thanks,

Larry

1 answer

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 7, 2021

Hi @Larry Weisberg can we get more details (maybe screenshots) about for example

  • subtask which has parent in REST API request's answer
  • subtask which does not have parent in REST API request's answer
  • parent story of the subtask which is OK
  • parent story of the subtask which is NOT OK

And one short question... why do you use query 

and not just

Larry Weisberg January 13, 2021

Thanks @Martin Bayer _MoroSystems_ s_r_o__ 

I meant to write back a couple days ago.  As far as the incorrectly formatted query - this did not make the difference, but I will clean it up at some point.  I apparently had incorrectly modified some code that I downloaded which handles accessing the APIs.

It turns out that the problem was with an assumption I had made about how the rest of my team logs their hours.  My /issue/ query was based on the results from the /worklog/updated?since= query, and I had assumed (always a dangerous thing :-) ) that hours were only being logged in subtasks, not in stories.  However, since there were some story issues with worklogs , these obviously (and correctly) did not have the parent tag.

 

Thanks for the help!
Larry

Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2021

Ah, ok  @Larry Weisberg , thank you for sharing :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events