Class: RedmineAPI::Issue

Inherits:
Base
  • Object
show all
Defined in:
lib/provider/api-extensions.rb,
lib/redmine/redmine-api.rb

Overview

Reopening class to add ticket master espesific behavior without mixing it with RadmineAPI

Instance Method Summary collapse

Methods inherited from Base

headers, inherited

Instance Method Details

#to_ticket_hashObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/provider/api-extensions.rb', line 3

def to_ticket_hash
  return  :id => id.to_i,
    :title => subject,
    :created_at => created_on,
    :updated_at => updated_on,
    :project_id => project.id.to_i,
    :status => status.name,
    :priority => priority.name,
    :priority_id => priority.id.to_i, 
    :requestor => author.name,
    :assignee => author.name
end

#update_with(ticket) ⇒ Object



16
17
18
19
20
21
# File 'lib/provider/api-extensions.rb', line 16

def update_with(ticket)
  self.subject = ticket.title
  self.project_id = ticket.project_id
  self.description = ticket.description
  self
end