Skip to content

Instantly share code, notes, and snippets.

@martindrapeau
Created October 13, 2011 15:10
Show Gist options
  • Save martindrapeau/1284460 to your computer and use it in GitHub Desktop.
Save martindrapeau/1284460 to your computer and use it in GitHub Desktop.
Planbox Burndown Data in Current Iteration
var iteration;
function doWork() {
var burndown = iteration.burndown;
var product_data = burndown.data[0];
var dates = burndown.dates;
console.log('Points remaining in iteration');
for (var i=0; i<dates.length; i++) {
var remain = product_data.points[i];
if (remain != null) {
console.log(dates[i]+': '+remain+' points');
} else {
console.log(dates[i]+': no data');
}
}
}
// Pull data from Planbox and then call our function
// to summarize...
$.post('https://www.planbox.com/api/get_iterations',
{product_id:1234, timeframe:'current'},
function(data) {
iteration = data.content[0];
doWork();
},
'json'
);
@martindrapeau
Copy link
Author

Fetches the points burndown data for the Current iteration.
Does so by fetching all stories in the Current iteration.
Once data is loaded from Planbox, the doWork function is called.
It writes to the console the number of points remaining for each day of the iteration.
If there is no data logged (i.e. the date is in the future), it prints out no data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment