Class: Jura::Command::Sprint::DisplaySubmenu

Inherits:
Base
  • Object
show all
Defined in:
lib/jura/command/sprint/display_submenu.rb

Class Method Summary collapse

Methods inherited from Base

board_id

Class Method Details

.execute!(issue) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/jura/command/sprint/display_submenu.rb', line 7

def self.execute!(issue)
  prompt = TTY::Prompt.new
  action = prompt.select("Choose your action") do |menu|
    menu.choice name: "View", value: 1
    menu.choice name: "Estimate the story point", value: 2
    menu.choice name: "Change the status/column", value: 3
    menu.choice name: "Move it back to the backlog", value: 4
    menu.choice name: "Back", value: 5
  end

  case action
  when 1
    Jura::Control::Sprint.instance.execute_command("show_issue", issue)
  when 2
    puts Component::Issue::Estimate.render(issue)
  when 3
    puts Component::Issue::ChangeColumn.render(issue)
  when 4
  end
end