jsmestad / pivotal-tracker

Ruby gem that provides an AR-style interface for the Pivotal Tracker API
http://github.com/jsmestad/pivotal-tracker
MIT License
352 stars 184 forks source link

Activities returning useless stories #79

Open juanjo opened 11 years ago

juanjo commented 11 years ago

I am trying to get the activities of a project and see to which stories those activities are connected with.

If you check the output it is not possible, all the fields in the stories array are nil.

 1.9.3p194 :017 > project.activities.all

 [#<PivotalTracker::Activity:0x007fa6d99134d0 @id=364866149, @version=6026, 
 @event_type="story_update", @occurred_at=Tue, 28 May 2013 17:00:43 +0200, 
 @author="Spiderman Smith", @project_id=675597, @description="Spiderman Smith 
 rejected \"Test Pivotal\"", @stories=[#<PivotalTracker::Story:0x007fa6bd82af50 @id=nil, 
 @url=nil, @created_at=nil, @accepted_at=nil, @project_id=nil, @name=nil, 
 @description=nil, @story_type=nil, @estimate=nil, @current_state=nil,     
 @requested_by=nil, 
 @owned_by=nil, @labels=nil, @jira_id=nil, @jira_url=nil, @other_id=nil,  
 @integration_id=nil, 
 @deadline=nil, @attachments=[]>]>]
hannahhoward commented 11 years ago

I found this problem originates in the nokogiri happymapper code parsing the XML results returned from pivotal tracker. I'll post a pull request with how I was able to solve it, but I'm not sure if this is the right way.

hannahhoward commented 11 years ago

https://github.com/jsmestad/pivotal-tracker/pull/82

Pull request that resolves this issue.

normancapule commented 11 years ago

Hi guys! I am currently testing this in our project. I specified the gem's [master] branch in the Gemfile in the hopes that the above pull requests fixed it but still no luck.