From 56f9d4b7f5dbb5db340f14139d99a77b6318ab7b Mon Sep 17 00:00:00 2001 From: Alexander Graul Date: Thu, 21 Sep 2017 18:32:19 +0200 Subject: [PATCH] Enforce that plot-to-board sets chart as cover `trollolo burndown --plot-to-board` only added the new chart to the card. Trello does not always set the new attachment as the cover. This ensures that the attachment is added as a cover. Fix https://github.com/openSUSE/trollolo/issues/114. --- CHANGELOG.md | 2 ++ lib/burndown_chart.rb | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e33dfae..21623d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ * Fix `plot-to-board` option in the burndown command when it is used together with `-o`. +* `burndown --plot-to-board` always sets the burndown chart as the cover. + Fix #114. ## Version 0.0.14 diff --git a/lib/burndown_chart.rb b/lib/burndown_chart.rb index e016243..87447fa 100644 --- a/lib/burndown_chart.rb +++ b/lib/burndown_chart.rb @@ -215,7 +215,9 @@ def update(options) board = trello.board(board_id) name = options['output'] ? options['output'] : '.' name += "/burndown-#{sprint.to_s.rjust(2, '0')}.png" - trello.add_attachment(board.burndown_card_id, name) + card_id = board.burndown_card_id + trello.add_attachment(card_id, name) + trello.make_cover(card_id, name) end end