Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to get components using python JIRA library

Sandeep I'm New Here Jun 16, 2022

Hi All,

We are using Python JIRA library to retrieve details about JIRA Project. We are looking to get component information and for that we are using the "project_components" function mentioned in this documentation

But the output returned by this function is in a list format and we are unable to convert this list out to JSON format. Can anyone let me know how to parse the below output we are getting from the project_componets function call. Or if there is a better way to components let me know please

<JIRA Component: name=u'component1', id=u'componentid1'>,
<JIRA Component: name=u'component2', id=u'componentid2'>

1 answer

0 votes


Welcome to the community

First create a new list with te name of all you components

listeName = [ for component in componentList]

then convert the list to json

import json

jsonList = json.dumps(listeName)

Suggest an answer

Log in or Sign up to answer

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