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

Your Points Tracker
  • 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
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?
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 do I get the 'Resolution' from Jira with python and XML-RPC

I'm using python to fetch issues from Jira with xml-rpc. It works well except it is missing the 'Resolution' field in the returned dictionary. For example 'Fixed', or 'WontFix' etc.

This is how I get the issue from Jira:

import xmlrpclib

    s = xmlrpclib.ServerProxy('')
    auth = s.jira1.login('user', 'pass')
    issue = s.jira1.getIssue(auth, 'PROJ-28')    
    print issue.keys()

And this is the list of fields that I get back:

['status', 'project', 'attachmentNames', 'votes', 'updated', 

     'components', 'reporter', 'customFieldValues', 'created', 

     'fixVersions', 'summary', 'priority', 'assignee', 'key', 

     'affectsVersions', 'type', 'id', 'description']

Th full content is:

{'affectsVersions': [{'archived': 'false',

                          'id': '11314',

                          'name': 'v3.09',

                          'released': 'false',

                          'sequence': '7'}],

     'assignee': 'myuser',

     'attachmentNames': '2011-08-17_attach.tar.gz',

     'components': [],

     'created': '2011-06-14 12:33:54.0',

     'customFieldValues': [{'customfieldId': 'customfield_10040', 'values': ''},

                           {'customfieldId': 'customfield_10010',

                            'values': 'Normal'}],

     'description': "Blah blah...\r\n",

     'fixVersions': [],

     'id': '28322',

     'key': 'PROJ-28',

     'priority': '3',

     'project': 'PROJ',

     'reporter': 'myuser',

     'status': '1',

     'summary': 'blah blah...',

     'type': '1',

     'updated': '2011-08-18 15:41:04.0',

     'votes': '0'}

When I do:

resolutions = s.jira1.getResolutions(auth ) 

I get:

[{'description': 'A fix for this issue is checked into the tree and tested.',

      'id': '1',

      'name': 'Fixed'},

     {'description': 'The problem described is an issue which will never be fixed.',

      'id': '2',

      'name': "Won't Fix"},

     {'description': 'The problem is a duplicate of an existing issue.',

      'id': '3',

      'name': 'Duplicate'},

     {'description': 'The problem is not completely described.',

      'id': '4',

      'name': 'Incomplete'},

     {'description': 'All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.',

      'id': '5',

      'name': 'Cannot Reproduce'},

     {'description': 'Code is checked in, and is, er, ready for build.',

      'id': '6',

      'name': 'Ready For Build'},

     {'description': 'Invalid bug', 'id': '7', 'name': 'Invalid'}]

The Jira version is v4.1.1#522 and I using Python 2.7.

Any ideas why I don't get a field called 'resolution'?


1 answer

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