Class: Backlog::Object::Issue

Inherits:
Object
  • Object
show all
Defined in:
lib/backlog/object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(issue) ⇒ Issue

Returns a new instance of Issue.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/backlog/object.rb', line 80

def initialize(issue)
  @id = issue['id']
  @key = issue['key']
  @summary = issue['summary']
  @description = issue['description']
  @url = issue['url']
  @due_date = issue['due_date']
  @start_date = issue['start_date'],
  @estimated_hours = issue['estimated_hours']
  @actual_hours = issue['actual_hours']
  @issue_type = issue['issue_type'] ? IssueType.new(issue['issue_type']) : nil
  @priority = issue['priority'] ? Priority.new(issue['priority']) : nil
  @resolution = issue['resolution'] ? Resolution.new(issue['resolution']) : nil
  @status = issue['status'] ? Status.new(issue['status']) : nil
  @components = issue['components'] ? issue['components'].map {|x| Component.new(x) } : []
  @versions = issue['versions'] ? issue['versions'].map {|x| Version.new(x) } : []
  @milestones = issue['milestone'] ? issue['milestones'].map {|x| Milestone.new(x)} : []
  @created_user = issue['created_user'] ? User.new(issue['created_user']) : nil
  @assigner = issue['assigner'] ? User.new(issue['assigner']) : nil
  @created_on = issue['created_on']
  @updated_on = issue['updated_on']
  @custom_fields = issue['custom_fields']
end

Instance Attribute Details

#actual_hoursObject (readonly)

Returns the value of attribute actual_hours.



103
104
105
# File 'lib/backlog/object.rb', line 103

def actual_hours
  @actual_hours
end

#assignerObject (readonly)

Returns the value of attribute assigner.



103
104
105
# File 'lib/backlog/object.rb', line 103

def assigner
  @assigner
end

#componentsObject (readonly)

Returns the value of attribute components.



103
104
105
# File 'lib/backlog/object.rb', line 103

def components
  @components
end

#created_onObject (readonly)

Returns the value of attribute created_on.



103
104
105
# File 'lib/backlog/object.rb', line 103

def created_on
  @created_on
end

#created_userObject (readonly)

Returns the value of attribute created_user.



103
104
105
# File 'lib/backlog/object.rb', line 103

def created_user
  @created_user
end

#custom_fieldsObject (readonly)

Returns the value of attribute custom_fields.



103
104
105
# File 'lib/backlog/object.rb', line 103

def custom_fields
  @custom_fields
end

#descriptionObject (readonly)

Returns the value of attribute description.



103
104
105
# File 'lib/backlog/object.rb', line 103

def description
  @description
end

#due_dateObject (readonly)

Returns the value of attribute due_date.



103
104
105
# File 'lib/backlog/object.rb', line 103

def due_date
  @due_date
end

#estimated_hoursObject (readonly)

Returns the value of attribute estimated_hours.



103
104
105
# File 'lib/backlog/object.rb', line 103

def estimated_hours
  @estimated_hours
end

#idObject (readonly)

Returns the value of attribute id.



103
104
105
# File 'lib/backlog/object.rb', line 103

def id
  @id
end

#issue_typeObject (readonly)

Returns the value of attribute issue_type.



103
104
105
# File 'lib/backlog/object.rb', line 103

def issue_type
  @issue_type
end

#keyObject (readonly)

Returns the value of attribute key.



103
104
105
# File 'lib/backlog/object.rb', line 103

def key
  @key
end

#milestonesObject (readonly)

Returns the value of attribute milestones.



103
104
105
# File 'lib/backlog/object.rb', line 103

def milestones
  @milestones
end

#priorityObject (readonly)

Returns the value of attribute priority.



103
104
105
# File 'lib/backlog/object.rb', line 103

def priority
  @priority
end

#resolutionObject (readonly)

Returns the value of attribute resolution.



103
104
105
# File 'lib/backlog/object.rb', line 103

def resolution
  @resolution
end

#start_dateObject (readonly)

Returns the value of attribute start_date.



103
104
105
# File 'lib/backlog/object.rb', line 103

def start_date
  @start_date
end

#statusObject (readonly)

Returns the value of attribute status.



103
104
105
# File 'lib/backlog/object.rb', line 103

def status
  @status
end

#summaryObject (readonly)

Returns the value of attribute summary.



103
104
105
# File 'lib/backlog/object.rb', line 103

def summary
  @summary
end

#updated_onObject (readonly)

Returns the value of attribute updated_on.



103
104
105
# File 'lib/backlog/object.rb', line 103

def updated_on
  @updated_on
end

#urlObject (readonly)

Returns the value of attribute url.



103
104
105
# File 'lib/backlog/object.rb', line 103

def url
  @url
end

#versionsObject (readonly)

Returns the value of attribute versions.



103
104
105
# File 'lib/backlog/object.rb', line 103

def versions
  @versions
end