Class: Helm::Commands::Schedule

Inherits:
Command
  • Object
show all
Defined in:
lib/helm/commands/schedule.rb

Instance Attribute Summary

Attributes inherited from Command

#session

Instance Method Summary collapse

Methods inherited from Command

#cache, #format, #initialize, #parameters

Constructor Details

This class inherits a constructor from Helm::Commands::Command

Instance Method Details

#runObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/helm/commands/schedule.rb', line 4

def run
  parameters :ticket, :milestone

  ticket = session.ticket

  current_milestone = session.milestone(ticket.milestone_id)

  ticket.milestone_id = session.milestone.id

  if ticket.save
    puts format.ticket_change(ticket, :milestone, current_milestone, session.milestone)
  end
end