Class: Redmine::Issue
Overview
Represents a single issue (ticket) in the Redmine system.
Instance Attribute Summary
Attributes inherited from Value
Instance Method Summary collapse
-
#activity ⇒ Object
List event history for this Issue as IssueEvent objects.
-
#lead_time ⇒ Object
Calculate the lead time for this ticket.
Methods inherited from Value
attribute, attributes, #eql?, #initialize, parse_value, #to_a, #to_h, #with
Constructor Details
This class inherits a constructor from Redmine::Value
Instance Method Details
#activity ⇒ Object
List event history for this Issue as IssueEvent objects.
27 28 29 30 31 |
# File 'lib/redmine/issue.rb', line 27 def activity journals.map do |event| IssueEvent.new(event) end end |
#lead_time ⇒ Object
Calculate the lead time for this ticket.
This returns the difference in days between the closed date and the start date.
37 38 39 40 |
# File 'lib/redmine/issue.rb', line 37 def lead_time return Float::INFINITY unless closed_on (closed_on - [created_on, start_date].max).to_i end |