How to get a parent task ID of a sub-task using python library ?
The info is in issue.fields.parent in issues of type sub-issue, such as Sub-task
jql = "project = MYPROJ and type = Sub-task" issues = jira.search_issues(jql) log.info("Found first %s subtasks" % len(issues)) for issue in issues: print "Parent %s of subtask %s" % (issue.fields.parent, issue.key)
Try the issue.getParent call.
It doesn't work, The object has no attribute called getParent, Does it work with certain version of Jira library or do you the api call ?
It's the API call - I'd expect any python library to expose it, as it's pretty fundamental.
Guys,
Did you get any way to achieve this ? or anyone can give a suggestion on this ?
Not sure it helps:
in the instance I'm working on it is the field:
"issue.fields.customfield_13272"
I don't now, whether this is a reserved field by atlassian, or it's a matter of implementation.
I took an Issue I knew it's a Sub-Task an knew its parent key. Made a rest-call in Browser and searched for the key in the resulting json
BR,
Daniel
It looks like you're new here. Sign in or register to get started.