Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get a parent task ID of a sub-task using python library ?

How to get a parent task ID of a sub-task using python  library   ? 

3 answers

1 accepted

2 votes
Answer accepted

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)
1 vote

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 ?

I didn't manage to get from python Jira library. I've used native REST call. 

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

☕️ Monday coffee with Jexo: Weekly Atlassian news roundup | 21st June 2021

Hi community 👋, as every Monday we're bringing you a quick update on what happened in the Atlassian ecosystem last week. There were a few interesting events like for example the announcement of th...

56 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you