public
Fork of edavis10/redmine
Description: A fork of Redmine with Texuna Technologies patches applied.
Homepage: http://www.redmine.org
Clone URL: git://github.com/artemv/redmine_tt.git
Impovement for #1671 Show a breakdown of estimated/spent/remaining time 
for a version.
Introduces 'development complete' flag for issue status. Remaining time is 
now
calculated only for open issues that are not in 'development complete' 
status (we have only Resloved as such).
artemv (author)
Thu Sep 04 05:56:46 -0700 2008
commit  63d2bca24fbc56c44ab9d8cc49cf5bab1cd1af9c
tree    2c4c5717beeea24763e0688109389d5307365d14
parent  747f5c4bdb26fc613b1e447f0a0073c415229670
...
194
195
196
 
 
 
 
 
197
198
199
...
194
195
196
197
198
199
200
201
202
203
204
0
@@ -194,6 +194,11 @@ class Issue < ActiveRecord::Base
0
   def closed?
0
     self.status.is_closed?
0
   end
0
+
0
+ #can't tell the meaning much better than code
0
+ def done?
0
+ closed? || self.status.is_development_complete?
0
+ end
0
   
0
   # Users the issue can be assigned to
0
   def assignable_users
...
146
147
148
149
 
150
151
152
153
154
 
155
156
157
158
 
 
159
160
161
...
146
147
148
 
149
150
151
152
153
 
154
155
156
 
 
157
158
159
160
161
0
@@ -146,16 +146,16 @@ class Version < ActiveRecord::Base
0
       metrics[:estimated] += estimated
0
       spent = spent_times[issue.id] || 0
0
       metrics[:spent] += spent
0
- remaining = issue.closed? ? 0 : estimated - spent
0
+ remaining = issue.done? ? 0 : estimated - spent
0
       remaining = 0 if remaining < 0
0
       metrics[:remaining] += remaining
0
       metrics[:total] += (remaining + spent)
0
       
0
- categories_metrics[category][:count] ||= {:open => 0, :closed => 0, :total => 0}
0
+ categories_metrics[category][:count] ||= {:open => 0, :done => 0, :total => 0}
0
       metrics = categories_metrics[category][:count]
0
       metrics[:total] += 1
0
- if issue.closed?
0
- metrics[:closed] += 1
0
+ if issue.done?
0
+ metrics[:done] += 1
0
       else
0
         metrics[:open] += 1
0
       end
...
11
12
13
 
 
 
14
15
16
...
11
12
13
14
15
16
17
18
19
0
@@ -11,5 +11,8 @@
0
 <p><label for="issue_status_is_default"><%=l(:field_is_default)%></label>
0
 <%= check_box 'issue_status', 'is_default' %></p>
0
 
0
+<p><label for="issue_status_is_development_complete"><%=l(:field_is_development_complete)%></label>
0
+<%= check_box 'issue_status', 'is_development_complete' %></p>
0
+
0
 <!--[eoform:issue_status]-->
0
 </div>
0
\ No newline at end of file
...
9
10
11
 
12
13
14
...
18
19
20
 
21
22
23
...
9
10
11
12
13
14
15
...
19
20
21
22
23
24
25
0
@@ -9,6 +9,7 @@
0
   <th><%=l(:field_status)%></th>
0
   <th><%=l(:field_is_default)%></th>
0
   <th><%=l(:field_is_closed)%></th>
0
+ <th><%=l(:field_is_development_complete)%></th>
0
   <th><%=l(:button_sort)%></th>
0
   <th></th>
0
   </tr></thead>
0
@@ -18,6 +19,7 @@
0
   <td><%= link_to status.name, :action => 'edit', :id => status %></td>
0
   <td align="center"><%= image_tag 'true.png' if status.is_default? %></td>
0
   <td align="center"><%= image_tag 'true.png' if status.is_closed? %></td>
0
+ <td align="center"><%= image_tag 'true.png' if status.is_development_complete? %></td>
0
   <td align="center" style="width:15%;">
0
     <%= link_to image_tag('2uparrow.png', :alt => l(:label_sort_highest)), {:action => 'move', :id => status, :position => 'highest'}, :method => :post, :title => l(:label_sort_highest) %>
0
     <%= link_to image_tag('1uparrow.png', :alt => l(:label_sort_higher)), {:action => 'move', :id => status, :position => 'higher'}, :method => :post, :title => l(:label_sort_higher) %> -
...
59
60
61
62
 
63
64
65
 
66
67
68
...
59
60
61
 
62
63
64
 
65
66
67
68
0
@@ -59,10 +59,10 @@
0
         </tr>
0
         <tr class="<%= color_class %>">
0
             <td class="progress count">
0
- <%= count = metrics[:count]; progress_bar((count[:closed].to_f / count[:total])*100,
0
+ <%= count = metrics[:count]; progress_bar((count[:done].to_f / count[:total])*100,
0
                       :legend =>
0
                         "<span title=\"#{l(:label_closed_issues_plural)}\">" +
0
- "#{count[:closed]}</span>/" +
0
+ "#{count[:done]}</span>/" +
0
                         "<span title=\"#{l(:label_total).chars.downcase}\">" +
0
                         "#{count[:total]}</span>",
0
                       :width => "#{(count[:total].to_f / max[:count] * max_progress_width).floor}px;") %>
...
126
127
128
 
129
130
131
...
126
127
128
129
130
131
132
0
@@ -126,6 +126,7 @@ field_status: Status
0
 field_notes: Notes
0
 field_is_closed: Issue closed
0
 field_is_default: Default value
0
+field_is_development_complete: Development complete
0
 field_tracker: Tracker
0
 field_subject: Subject
0
 field_due_date: Due date
...
123
124
125
 
126
127
128
...
123
124
125
126
127
128
129
0
@@ -123,6 +123,7 @@ field_status: Статус
0
 field_notes: Примечания
0
 field_is_closed: Задача закрыта
0
 field_is_default: Значение по умолчанию
0
+field_is_development_complete: Разработка завершена
0
 field_tracker: Трекер
0
 field_subject: Тема
0
 field_due_date: Дата выполнения
...
52
53
54
55
 
56
57
58
...
64
65
66
67
 
68
69
70
...
52
53
54
 
55
56
57
58
...
64
65
66
 
67
68
69
70
0
@@ -52,7 +52,7 @@ class VersionsControllerTest < Test::Unit::TestCase
0
     end
0
   end
0
   
0
- #specific bug was reproduced when there were no time records and all the issues were closed
0
+ #specific bug was reproduced when there were no time records and all the issues were done
0
   def test_issue_status_by_no_division_by_zero
0
     version = versions(:versions_003)
0
     user = users(:users_002)
0
@@ -64,7 +64,7 @@ class VersionsControllerTest < Test::Unit::TestCase
0
     version.fixed_issues.all? do |i|
0
       assert_equal 0, i.spent_hours
0
       assert !i.estimated_hours || i.estimated_hours == 0
0
- assert i.closed?
0
+ assert i.done?
0
     end
0
     xhr :get, :status_by, :id => version.id
0
     assert_response :success

Comments

    No one has commented yet.