I’ve been a member of the Redmine community for a few years now. One common problem that comes up time and time again is setting up Redmine. Starting today, Little Stream Software will be offering a Redmine Set Up Service. If you or someone you know is struggling to get Redmine set up… let me …
Tag: redmine
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 …
Daily Refactor #43: Extract Method in StuffToDoController
The Refactoring Today I used extract method to start cleaning up the new TimeGrid code I recently merged into the StuffToDo plugin. Before 1 2 3 4 5 # app/controllers/stuff_to_do_controller.rb class StuffToDoController "#{Issue.table_name}.id ASC") @time_entry = TimeEntry.new end end# app/controllers/stuff_to_do_controller.rb class StuffToDoController "#{Issue.table_name}.id ASC") @time_entry = TimeEntry.new end end After 1 2 3 4 5 …
Daily Refactor #42: Consolidate Conditionals in StuffToDo#available
Last night I merged a large work in progress branch into StuffToDo so the refactoring I wanted to do wasn’t available anymore. But there’s always a replacement to be found (aka: always some bad code to fix). The Refactoring A few days ago I did some refactoring to StuffToDo#available in order to remove some of …
Daily Refactor #41: Consolidate Duplicate Conditional Fragments in StuffToDo
The Refactoring Today I refactored the conditional of StuffToDo#conditions_for_available using a little known library in Redmine called ARCondition. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 # app/models/stuff_to_do.rb class StuffToDo < ActiveRecord::Base def self.conditions_for_available(filter_by, record_id) case filter_by when :user ["assigned_to_id = ? AND #{IssueStatus.table_name}.is_closed = ?", record_id, false ] …