Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Commit

Permalink
Minor refactor (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
John Boyes committed Sep 21, 2017
1 parent 3671479 commit 7ce1861
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# JIRA Control Chart data relating to one issue
class Issue
def initialize(raw_issue:, cycle_time_columns:, done_column:, columns:)
# TODO: have more instance attributes here?
# TODO: is the incoming issue really raw, or has it already been parsed to some extent?
@raw_issue = raw_issue
@cycle_time_columns = cycle_time_columns
@done_column = done_column
Expand Down Expand Up @@ -63,13 +61,11 @@ def reopened_and_in_progress?
@done_time < cycle_end_time
end

# TODO: extract to instance attribute?
def cycle_end_time
return nil unless @done_time.present?
leave_times[column_which_has_the_cycle_end_time]
end

# TODO: could this have a better name?
def column_which_has_the_cycle_end_time
@cycle_time_columns.max_by { |cycle_time_column| leave_times[cycle_time_column].to_i }
end
Expand Down

0 comments on commit 7ce1861

Please sign in to comment.