The Refactoring Today I did another simple refactoring by moving a method from Kanban to KanbanPane. Before 1 2 3 4 5 6 7 8 9 10 11 12 # app/models/kanban.rb class Kanban # Sort and group a set of issues based on IssuePriority#position def group_by_priority_position(issues) return issues.group_by {|issue| issue.priority }.sort {|a,b| a[0].position b[0].position } …
Category: Articles
Daily Refactor #53: Move Method to KanbanPane
The Refactoring Since creating the new KanbanPane class, there has been some wrapper methods to access Kanban’s private utility methods. This refactoring uses move method to move that utility method from Kanban to KanbanPane. Before 1 2 3 4 5 6 7 8 9 10 11 12 # app/models/kanban.rb class Kanban def missing_settings(pane, options={}) skip_status …
Redmine Stuff To Do plugin v0.4.0 released
A new release of the Redmine Stuff To Do plugin has been tested and released. This release includes over 13 changes since the last release including the new Time Grid feature. This will be the final version that is supported on Redmine 0.8, the next versions will require Redmine 0.9. Download The plugin can be …
Daily Refactor #52: Remove Middle Man Kanban#find
The Refactoring Now that everything has been refactored out of Kanban#find, there really is no use for it. All that it does is to wrap the constructor so it’s now useless code. Before 1 2 3 4 5 6 # app/models/kanban.rb class Kanban def self.find Kanban.new end end# app/models/kanban.rb class Kanban def self.find Kanban.new end …
Daily Refactor #51: Lazy Load Issues in Kanban
This change isn’t a strict refactoring since it’s adding a new feature, but since it was done with the intent of cleaning up the code I’m going to let it pass…. this time. The Refactoring The big problem with Kanban is that all callers have to use Kanban#find in order to setup the data. This …