Skip to content

Commit

Permalink
Add --plot-to-board to plot command
Browse files Browse the repository at this point in the history
This flag of plot command will send the plotted burndown chart to the first
card of the `Done` column.

close openSUSE#134
  • Loading branch information
Ronaq13 committed Mar 1, 2018
1 parent 1930f9f commit d578849
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,24 @@ def burndown
end
end

desc 'plot SPRINT-NUMBER [--output] [--no-tasks] [--with-fast-lane]', 'Plot burndown chart for given sprint'
desc 'plot SPRINT-NUMBER [--output] [--no-tasks] [--with-fast-lane] [--plot-to-board]', 'Plot burndown chart for given sprint'
option :output, aliases: :o, desc: 'Output directory', required: false
option 'with-fast-lane', desc: 'Plot Fast Lane with new cards bars', required: false, type: :boolean
option 'no-tasks', desc: 'Do not plot tasks line', required: false, type: :boolean
option :plot_to_board, type: :boolean, desc: 'Send the plotted data to the first card of Done column'
def plot(sprint_number)
process_global_options options
BurndownChart.plot(sprint_number, options)
if options[:plot_to_board]
begin
chart = BurndownChart.new @@settings
chart.update(options)
rescue TrolloloError => e
STDERR.puts e
exit 1
end
else
BurndownChart.plot(sprint_number, options)
end
end

desc 'backup', 'Create backup of board'
Expand Down

0 comments on commit d578849

Please sign in to comment.