Skip to content

Instantly share code, notes, and snippets.

@retorquere
Created November 4, 2011 11:04
Show Gist options
  • Save retorquere/1339103 to your computer and use it in GitHub Desktop.
Save retorquere/1339103 to your computer and use it in GitHub Desktop.
issue = Issue.find(35)
if issue.is_task?
issue = issue.becomes(RbTask)
elsif issue.is_story?
issue = issue.becomes(RbStory)
else
raise "Neither a task nor a story"
end
puts issue.burndown.inspect
puts issue.velocity_based_estimate if issue.is_story?
puts issue.remaining_hours
@fdasoghe
Copy link

fdasoghe commented Nov 7, 2011

{:points_resolved=>[nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 3.0, nil, nil, nil, nil, 5.0, 5.0, 5.0], :points_accepted=>[nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil], :points=>[nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 3.0, 3.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0], :hours=>[nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 24.0, 0.0, 8.0, 8.0, 8.0, 8.0, 0.0, 0.0, 0.0]}
0
0.0

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