Class: Lh::Ticket

Inherits:
Object show all
Defined in:
lib/lh.rb

Class Method Summary collapse

Class Method Details

.close(opts) ⇒ Object



51
52
# File 'lib/lh.rb', line 51

def self.close (opts)
end

.create(opts) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/lh.rb', line 23

def self.create (opts)
  Lh::Session.establish

  if opts[:project].present?
    proj_id = Lh::Project.id_from_input(
      opts[:project],
      Lh::Project.return_all_filtered)
  else 
    proj_id = Lh.get_dproj()
  end

  ticket = ::Lighthouse::Ticket.new(:project_id => proj_id.to_i)
  raise Lh::Error::InvalidOpts, 'Supply a ticket title.' if opts[:title].empty?
  ticket.title = opts[:title]
  ticket.body  = opts[:message] if opts[:message].present?

  ticket.save
end

.open(opts) ⇒ Object



48
49
# File 'lib/lh.rb', line 48

def self.open (opts)
end

.show(opts) ⇒ Object



42
43
# File 'lib/lh.rb', line 42

def self.show (opts)
end

.update(opts) ⇒ Object



45
46
# File 'lib/lh.rb', line 45

def self.update (opts)
end