Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/tracker_api/resources/iteration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class Iteration
attribute :stories, [Story]
attribute :story_ids, [Integer]
attribute :team_strength, Float
attribute :velocity, Float
attribute :points, Integer
attribute :accepted_points, Integer
attribute :effective_points, Float

def stories=(data)
super.each { |s| s.client = client }
Expand Down
14 changes: 14 additions & 0 deletions test/project_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@
end
end

it 'can get iteration with non-default fields' do
VCR.use_cassette('get current iteration', record: :new_episodes) do
iterations = project.iterations(scope: :current, fields: ":default,velocity,points,accepted_points,effective_points")

iterations.wont_be_empty

current = iterations.first
current.velocity.must_equal 10.0
current.points.must_equal 10
current.accepted_points.must_equal 0
current.effective_points.must_equal 10.0
end
end

it 'can get an iteration by number' do
VCR.use_cassette('get iteration by number', record: :new_episodes) do
iterations = project.iterations(number: 2)
Expand Down
Loading