Class: SprintCountMeasure
- Inherits:
-
Object
- Object
- SprintCountMeasure
- Defined in:
- lib/jirametrics/sprint_count_measure.rb
Overview
The story-count view of a sprint burndown: simply how many issues are in the sprint at any point. It plugs into SprintBurndown#build_sprint_data_set, which shares its loop with the story-points view (SprintPointsMeasure).
Instance Attribute Summary collapse
-
#summary_stats ⇒ Object
readonly
Returns the value of attribute summary_stats.
Instance Method Summary collapse
- #active_title ⇒ Object
- #ended_title ⇒ Object
-
#initialize ⇒ SprintCountMeasure
constructor
A new instance of SprintCountMeasure.
- #record(change_data) ⇒ Object
- #started_title ⇒ Object
- #update_state(change_data) ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize ⇒ SprintCountMeasure
Returns a new instance of SprintCountMeasure.
9 10 11 12 |
# File 'lib/jirametrics/sprint_count_measure.rb', line 9 def initialize @summary_stats = SprintSummaryStats.new @issues_currently_in_sprint = [] end |
Instance Attribute Details
#summary_stats ⇒ Object (readonly)
Returns the value of attribute summary_stats.
7 8 9 |
# File 'lib/jirametrics/sprint_count_measure.rb', line 7 def summary_stats @summary_stats end |
Instance Method Details
#active_title ⇒ Object
41 |
# File 'lib/jirametrics/sprint_count_measure.rb', line 41 def active_title = "Sprint still active. #{value} issues in progress." |
#ended_title ⇒ Object
40 |
# File 'lib/jirametrics/sprint_count_measure.rb', line 40 def ended_title = "Sprint ended with #{value} stories unfinished" |
#record(change_data) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/jirametrics/sprint_count_measure.rb', line 25 def record change_data case change_data.action when :enter_sprint @summary_stats.added += 1 'Added to sprint' when :issue_stopped @summary_stats.completed += 1 'Completed' when :leave_sprint @summary_stats.removed += 1 'Removed from sprint' end end |
#started_title ⇒ Object
39 |
# File 'lib/jirametrics/sprint_count_measure.rb', line 39 def started_title = "Sprint started with #{value} stories" |
#update_state(change_data) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/jirametrics/sprint_count_measure.rb', line 16 def update_state change_data case change_data.action when :enter_sprint @issues_currently_in_sprint << change_data.issue.key when :leave_sprint, :issue_stopped @issues_currently_in_sprint.delete change_data.issue.key end end |
#value ⇒ Object
14 |
# File 'lib/jirametrics/sprint_count_measure.rb', line 14 def value = @issues_currently_in_sprint.size |