The Refactoring Now that I have a single method to start refactoring, it’s time to start digging into #issue_update. The first smell I see is that the method is working on an Issue, TimeEntry, and Attachments all at once, jumping between the three procedurally. So first I needed to separate these three objects. Before 1 …
Tag: redmine
Daily Refactor #25: Extract method in IssuesController#update
The Refactoring This refactoring is what I call the magic trick refactor; it looks like a lot is going on but in reality it’s just smoke and mirrors! Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 …
Daily Refactor #24: Extract method body in IssuesController#edit
I tackled two refactorings today in order to clean up IssuesController#edit. The Refactoring – #1 This first refactoring moves most of the #edit method’s body into #update, where it belongs. This did cause a some duplication though. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 …
Bulk Time Entry plugin v0.5.0 released
The 0.5.0 release of the Redmine Bulk Time Entry plugin has just been uploaded to my Redmine, Github, and gemcutter. This is a bug fix release for Redmine 0.9 only. Changes Feature #2822: German translation of text messages Feature #3644: Scoll to the new form when adding another entry Task #3505: Remove compatibility hacks for …
Daily Refactor #23: Extract method in IssuesController#edit
After yesterday’s refactor of the #bulk_edit method, Jean-Philippe Lang finished the refactoring by merging the temporary method I created in the model (Issue#bulk_edit) and simplifying the parameter attributes. Back to the drawing board, it looks like the method with the next highest flog score is #edit. #edit is a pretty complex action in Redmine, since …