AnsweredAssumed Answered

pyral method to return epics and stories returns objects for some fields

Question asked by malcolm.carlson on Apr 19, 2017
Latest reply on Apr 28, 2017 by malcolm.carlson

I get reference to objects when attempting to use Pyral to export rally records to a csv.  How do I get to the data contained in the objects?


US69 None  [] User Story Maggie-1  <pyral.entity.HierarchicalRequirement object at 0x00000000047A54A8> [] <pyral.entity.User object at 0x000000000529C320> None


I want to get the data from the User object, the Feature object and Tags and such.


Here is my code.

def getUserStories2():
    response = rally.get("HierarchicalRequirement", fetch=True, pagesize=200, limit = 50)
    rally.enableLogging('path to logs pyral.log')
        for item in response:
            foid = item.FormattedID
            cdr = item.c_ContentDevReviewRequired
            desc = item.Description
            tags = item.Tags
            name = item.Name
            notes = item.Notes
            parent = item.Parent
            children = item.Children
            owner = item.Owner
            feid = item.PortfolioItem
            #state = item.Name.state
            #print item.details()
            #total = len(response)
            print foid, cdr, desc, tags, name, notes,  parent, children, owner ,feid #state, feature, tags, parent, owner
    except Exception, details:
        sys.stderr.write('ERROR: %s \n' % details)

US69 None [] User Story 1 <pyral.entity.HierarchicalRequirement object at 0x00000000047A54A8> [] <pyral.entity.User object at 0x000000000529C320> None
US70 None [] User Story 2 None [<pyral.entity.HierarchicalRequirement object at 0x00000000047A54A8>, <pyral.entity.HierarchicalRequirement object at 0x00000000047A5320>] <pyral.entity.User object at 0x00000000050FC9E8> None
US71 None [] User Story 3 None [] <pyral.entity.User object at 0x00000000050FCE10> None#####