Command to show backlog
Opened this issue · 6 comments
When doing sprint commitments we need a way to see the whole backlog in one view.
To achieve that add a show-backlog
command which lists the backlog on the terminal in a table. The table should have one column for the priority, one for the size and one for the title.
To show the average velocity we should add a command line option --velocity
which specifies an average velocity. This adds a line in the table at the location where the sum of the cards before is closest to the specified velocity.
Is this the expected output format?:
$ bin/trollolo show-backlog --board-id=Test
Priority | Points | Title
3 | 7 | P3: (7) Dress like a superhero
5 | 2 | P5: (2) Save the world
6 | 4 | P6: (4) Celebrate
I think having the first two columns is redundant since they are necessarily extracted from the card title. Maybe just dump the card names in priority order?
@jimmykarily You are right. The first two columns are redundant. Just showing the card names in priority order would be enough.
I'm currently working on this issue, @cornelius @Ana06.
My problem is how to get the column in a properly way what i am doing today is.
def show_backlog puts "Title" TrelloWrapper.new(@@settings).board(options['board-id']).open_columns[0].cards.each do |card| puts "| " + card.name end end
getting the first column of the array of open columns but it seems like a bad solution!
@cornelius The --velocity option should have this output?
$ bin/trollolo show-backlog --board-id=Test --velocity 9
| Title
| P3: (7) Dress like a superhero
| P5: (2) Save the world
| (9) Velocity |
| P6: (4) Celebrate
---edit1---
@cornelius I tried to solve the --velocity problem but with my currently solutions is getting hard to maintain code quality, do you have any ideas how to properly do the --velocity option without making the method on cli.rb get too big and complex?
@matheussbernardo you can send a PR to implement this without the velocity, and then another one for the velocity. This two thing can be done independently, so let's focus first on the show-backlog
command to avoid having a too complicate and big PR. 😉
@matheussbernardo I agree with @Ana06 about separating the two parts in two different PRs. For the velocity option I would separate the code for handling the actual command line option such as parsing the option, putting out help, etc (which belongs in cli.rb and is mostly handled by the CLI parsing framework) and the "business logic" code which actually reads the data and prints out the results. The latter could be in a separate class (or maybe there is one where it would belong naturally). This also would make testing easier, because you can write simple and expressive unit tests which just call a method and don't need to provide input in the form of command line option or some derivation of that.