The Refactoring In order to remove the duplication in Kanban#get_issues_for_pane, I need to first consolidate some of the duplication in each case statement. This refactoring pulls the ActiveRecord conditions out of the finder and into the ARCondition object. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 …
Tag: refactoring
Daily Refactor #47: Extract Method for Kanban panes – Part 3
Here is the third refactoring to clean up how the Kanban class gets it’s pane data. The Refactoring This refactoring is brutal to read through but it’s just moving the body of #get_incoming_issues, #get_backlog_issues, and #get_quick_issues into #get_issues_for_pane. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 …
Daily Refactor #46: Extract Method for Kanban panes – Part 2
This is the second in a series of refactorings to clean up how the Kanban class gets it’s pane data. The Refactoring Using extract method again, I was able to merge #get_active and #get_testing so they both use a new method #issues_from_kanban_issue. Before 1 2 3 4 5 6 7 8 9 10 11 12 …
Daily Refactor #45: Extract Method for Kanban panes – Part 1
I’m starting on some major internal refactoring of the Kanban class now. There are seven core methods that it uses and they all contain a lot of copy and paste duplication. Today I’m starting on the Finished (#get_finished_issues) and Canceled (#get_canceled_issues) panes since they are almost mirror images. The Refactoring I used extract method with …
Daily Refactor #44: Extract Method in Kanban.
My StuffToDo plugin has now been improved and refactored quite a bit so it’s time to move onto a different plugin. Since I’m starting to do a lot of work in the Kanban plugin again, refactoring that plugin would be extremely useful. The Refactoring The first step I use when refactoring a new codebase is …