Getting iteration from a story via ActiveResource
API Changed. I can't get iteration from a story now via ActiveResource. I used to get current stories, by getting the stories and checking if the iteration for that story contained today, but now they don't respond to iteration any more.
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?So I changed this to get the current iteration, but now the stories for that iteration are the accepted ones from the previous iteration (i.e. iteration 12 returns iteration 11 stories)
I’m confused
-
Inappropriate?Yes the Story API has changed, iteration information was removed after we introduced the Iteration API calls.
To get stories in a specific iteration, use the Iteration API requests. See http://www.pivotaltracker.com/help/ap... for more details.
The following ActiveResource code example should return the same iteration number and stories that you see in "Current" panel when logged into Pivotal Tracker.
******************************
require 'rubygems'
require 'activeresource'
class Iteration < ActiveResource::Base
self.site = "http://www.pivotaltracker.com/services/v2/projects/:project_id"
headers['X-TrackerToken'] = 'TOKEN'
end
Iteration.find(:all, :params => {:project_id => PROJECT_ID, :group => "current"})
*********************************
Note: replace TOKEN and PROJECT_ID with the correct token and project id
2 people say
this answers the question
-
Inappropriate?I actually figured out that method, last monday however, the stories associated with the iteration didn't match the ones in pivotal. I reran it today and it worked fine. Thanks
I’m happy
-
Inappropriate?So I'm trying it today and I'm getting last iterations stories. Pivotal's web interface shows what I expect, but it's behaving like 2 mondays ago. I'm using the code below:
iterations = Pivotal::Iteration.find(:all, :params => {:project_id => project_id, :group => "current"})
stories = iterations.first.stories
I’m confused
-
Inappropriate?Another week, same deal as my previous entry, still getting last iteration's stories for the current iteration. Is there something fundamentally wrong w/the 2 line code snippet above that would cause this to happen?
I’m frustrated
-
Inappropriate?Hi Forrest,
It's possibly a time zone issue . You're seeing the correct iteration in your browser since we can use your browser's time zone to correctly display iterations. What time zone is your browser set to? Do you have any time zone set in the "My Profile" page and/or the Project settings page?
If you send your specific user and project information to tracker@pivotallabs.com, we'll take look at it as well. -
Inappropriate?Pacific time in my Profile, and project settings
-
Inappropriate?Hi Forrest,
Can you send the project id/name to tracker@pivotallabs.com so we can debug the issue.
thanks
Loading Profile...


