Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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 do I display all issue fields in the Python Jira API?

For anyone here who has used Jira-Python, if I'm using vim to edit my code, how do I display all issue fields for my project? 

 

Here is the link of the doc 

https://jira.readthedocs.io/en/master/

 

and attached picture showsissue fields.png all the common fields of an issue but my companies fields might be different. 

4 answers

I would go this way:

project_keys = ['Zen']
issuetype_names = ['Task']
meta = jira_instance.createmeta(projectKeys=project_keys,
issuetypeNames=issuetype_names,
expand='projects.issuetypes.fields')

for x in meta:
...

Basically gives you all info, datatypes, options etc. attached to the individual fields in the corresponding project/issuetype. This also gives you the field name to the customfield_123456 fields, translations etc.

0 votes

You can use 

issue.raw['fields']

to get all the results obtained in the JSON object as raw string. Its not as pleasant to view, but will provide you with what you're looking for.  Take a look at this stackoverflow solution  and see if you find your answer, cheers.

I made a web application using plotly/dash on Python to make an interactive Jira work log dashboard. Users who are viewing the answer to this question might find something valuable there.  You can visit this GitHub repository.

Were you able to do this? Trying the same thing and having a fairly hard time.

0 votes

Hi! 

Please, try to use the Pycharm, or vs code to edit. 

regarding to view in one shot I do recommend a look into postman side

Suggest an answer

Log in or Sign up to answer
TAGS

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