backlog 0.14.2 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +16 -0
- data/app/controllers/backlogs_controller.rb +0 -46
- data/app/controllers/parties_controller.rb +1 -1
- data/app/models/backlog.rb +1 -17
- data/app/views/groups/edit.rhtml +2 -2
- data/app/views/works/_form.rhtml +1 -0
- data/app/views/works/weekly_work_sheet.rhtml +7 -7
- data/db/migrate/023_add_indices_for_burn_down_chart.rb +13 -0
- data/db/schema.rb +7 -1
- data/lang/en.yaml +1 -0
- data/lang/no.yaml +1 -0
- data/test/functional/parties_controller_test.rb +2 -0
- metadata +3 -2
data/History.txt
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
== 0.14.3 2007-11-20
|
2
|
+
|
3
|
+
=== Features
|
4
|
+
|
5
|
+
* Speedup of Burn Down Charts.
|
6
|
+
* Added link to add new work account when recording work.
|
7
|
+
|
8
|
+
=== Fixes
|
9
|
+
|
10
|
+
* Fixed bug for weekly work sheet with invoicing.
|
11
|
+
* Fixed bug in Edit Group view. The wrong burn down chart was shown.
|
12
|
+
|
13
|
+
=== Internal
|
14
|
+
|
15
|
+
* Removed unused code for backlog charts.
|
16
|
+
|
1
17
|
== 0.14.2 2007-11-19
|
2
18
|
|
3
19
|
=== Features
|
@@ -82,14 +82,6 @@ class BacklogsController < ApplicationController
|
|
82
82
|
redirect_to :action => 'index'
|
83
83
|
end
|
84
84
|
|
85
|
-
def burn_down_chart_thumbnail
|
86
|
-
send_burn_down_chart 270
|
87
|
-
end
|
88
|
-
|
89
|
-
def burn_down_chart
|
90
|
-
send_burn_down_chart 640
|
91
|
-
end
|
92
|
-
|
93
85
|
def update_task_estimate
|
94
86
|
if params[:id]
|
95
87
|
@task = Task.find_by_id(params[:id])
|
@@ -175,42 +167,4 @@ class BacklogsController < ApplicationController
|
|
175
167
|
|
176
168
|
end
|
177
169
|
|
178
|
-
def send_burn_down_chart(size)
|
179
|
-
backlog = Backlog.find(params[:id])
|
180
|
-
g = Gruff::Line.new(size)
|
181
|
-
g.theme_37signals
|
182
|
-
g.title = "Burn Down Graph"
|
183
|
-
g.font = '/usr/share/fonts/bitstream-vera/Vera.ttf'
|
184
|
-
g.hide_dots = true
|
185
|
-
g.colors = %w{blue green}
|
186
|
-
|
187
|
-
dates = []
|
188
|
-
backlog.periods.first.start_on.upto(backlog.periods.last.end_on) {|date| dates << date}
|
189
|
-
|
190
|
-
g.data(l(:todo), get_todo_data(dates, backlog))
|
191
|
-
g.data(l(:done), get_work_data(dates, backlog))
|
192
|
-
g.minimum_value = 0
|
193
|
-
|
194
|
-
labels = {0 => dates.first.to_s, dates.length-1 => dates.last.to_s}
|
195
|
-
labels.merge({dates.index(Date.today) => Date.today.to_s}) if (dates.index(Date.today).to_f / dates.length) > 0.15
|
196
|
-
g.labels = labels
|
197
|
-
|
198
|
-
send_data(g.to_blob,
|
199
|
-
:disposition => 'inline',
|
200
|
-
:type => 'image/png',
|
201
|
-
:filename => "burn_down_chart.png")
|
202
|
-
end
|
203
|
-
|
204
|
-
def get_todo_data(dates, backlog)
|
205
|
-
dates.map do |date|
|
206
|
-
backlog.get_estimate_data(date)
|
207
|
-
end
|
208
|
-
end
|
209
|
-
|
210
|
-
def get_work_data(dates, backlog)
|
211
|
-
dates.map do |date|
|
212
|
-
backlog.get_work_data(date)
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
170
|
end
|
@@ -18,7 +18,7 @@ class PartiesController < ApplicationController
|
|
18
18
|
|
19
19
|
def send_burn_down_chart(size)
|
20
20
|
party = Party.find(params[:id])
|
21
|
-
if period = party.periods.
|
21
|
+
if period = party.periods.to_a.find{|p| p.active?} || party.periods.last
|
22
22
|
g = period.burn_down_graph(size)
|
23
23
|
send_data(g,
|
24
24
|
:disposition => 'inline',
|
data/app/models/backlog.rb
CHANGED
@@ -23,22 +23,6 @@ class Backlog < ActiveRecord::Base
|
|
23
23
|
tasks.map {|t| t.self_with_children}.flatten
|
24
24
|
end
|
25
25
|
|
26
|
-
def estimate_data(date)
|
27
|
-
total = 0
|
28
|
-
periods.each do |period|
|
29
|
-
total += period.estimate_data(date)
|
30
|
-
end
|
31
|
-
total
|
32
|
-
end
|
33
|
-
|
34
|
-
def work_data(date)
|
35
|
-
total = 0
|
36
|
-
periods.each do |period|
|
37
|
-
total += period.work_data(date)
|
38
|
-
end
|
39
|
-
total
|
40
|
-
end
|
41
|
-
|
42
26
|
def first_active_period
|
43
27
|
t = active_tasks
|
44
28
|
periods = t.map {|t| t.period}.compact.uniq
|
@@ -47,7 +31,7 @@ class Backlog < ActiveRecord::Base
|
|
47
31
|
end
|
48
32
|
|
49
33
|
def enable_invoicing?
|
50
|
-
work_account && work_account.
|
34
|
+
work_account && work_account.enable_invoicing?
|
51
35
|
end
|
52
36
|
|
53
37
|
def track_done?
|
data/app/views/groups/edit.rhtml
CHANGED
@@ -36,10 +36,10 @@
|
|
36
36
|
</div>
|
37
37
|
|
38
38
|
<table>
|
39
|
-
<% for
|
39
|
+
<% for group in @groups %>
|
40
40
|
<tr>
|
41
41
|
<td>
|
42
|
-
<%=link_to
|
42
|
+
<%=link_to group.name, :action => :edit, :id => group%>
|
43
43
|
</tr>
|
44
44
|
<% end %>
|
45
45
|
</table>
|
data/app/views/works/_form.rhtml
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
<% if @work.work_account -%>
|
6
6
|
<%=image_detour_to('work_account.png', "#{l(:work_account)} #{@work.work_account.name}", {:controller => 'work_accounts', :action => :edit, :id => @work.work_account}, {:class => 'image-submit', :style => 'vertical-align: bottom'}) %>
|
7
7
|
<% end -%>
|
8
|
+
<%=detour_to l(:new_work_account), :controller => 'work_accounts', :action => :new %>
|
8
9
|
</p>
|
9
10
|
|
10
11
|
<p><%=l :task%>:<br/>
|
@@ -54,22 +54,22 @@ end %>]
|
|
54
54
|
<% if @work %>
|
55
55
|
<% day_totals[day] += @work.hours %>
|
56
56
|
<% week_total += @work.hours %>
|
57
|
-
<td>
|
58
|
-
<%=image_detour_to('hammer.png', l(:edit), {:
|
57
|
+
<td valign="top">
|
58
|
+
<%=image_detour_to('hammer.png', l(:edit), {:controller => 'works', :action => :edit, :id => @work.id}, {:style => "float: right;"}) %>
|
59
59
|
<%=detour_to(h(@work.task.period.name), :controller => 'periods', :action => :show, :id => @work.task.period) if @work.task && @work.task.period %>
|
60
60
|
<%=detour_to(h(@work.work_account.name), :controller => 'work_accounts', :action => :show, :id => @work.work_account_id) %>:
|
61
61
|
<%=detour_to(h(@work.task.description), :controller => 'tasks', :action => :edit, :id => @work.task_id) if @work.task_id%>
|
62
62
|
</td>
|
63
63
|
<% if invoicing %>
|
64
|
-
<td id="invoice_<%=@work.id%>">
|
65
|
-
<%=check_box(:work, :invoice, :onchange => "new Ajax.Updater('invoice_#{@work}', '#{url_for(:action => :set_work_invoice, :id => @work)}' + '?value=' + this.checked);") if @work.
|
64
|
+
<td id="invoice_<%=@work.id%>" valign="top">
|
65
|
+
<%=check_box(:work, :invoice, :onchange => "new Ajax.Updater('invoice_#{@work}', '#{url_for(:action => :set_work_invoice, :id => @work)}' + '?value=' + this.checked);") if @work.work_account.enable_invoicing? %>
|
66
66
|
</td>
|
67
67
|
<% end %>
|
68
68
|
<% if track_times %>
|
69
|
-
<td align="right"><%=in_place_editor_field(:work, :started_at_time, :class => :task_time) %></td>
|
70
|
-
<td align="right"><%=in_place_editor_field(:work, :completed_at_time, :class => :task_time) %></td>
|
69
|
+
<td align="right" valign="top"><%=in_place_editor_field(:work, :started_at_time, :class => :task_time) %></td>
|
70
|
+
<td align="right" valign="top"><%=in_place_editor_field(:work, :completed_at_time, :class => :task_time) %></td>
|
71
71
|
<% end %>
|
72
|
-
<td align="right"><%=in_place_editor_field(:work, :hours, {}, :value => '%.2f' % @work.hours) %></td>
|
72
|
+
<td align="right" valign="top"><%=in_place_editor_field(:work, :hours, {}, :value => '%.2f' % @work.hours) %></td>
|
73
73
|
<% else %>
|
74
74
|
<td/>
|
75
75
|
<% if invoicing %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddIndicesForBurnDownChart < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_index :tasks, :parent_id
|
4
|
+
add_index :estimates, [:task_id, :created_at]
|
5
|
+
add_index :works, [:task_id, :completed_at]
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_index :works, [:task_id, :completed_at]
|
10
|
+
remove_index :estimates, [:task_id, :created_at]
|
11
|
+
remove_index :tasks, :parent_id
|
12
|
+
end
|
13
|
+
end
|
data/db/schema.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# migrations feature of ActiveRecord to incrementally modify your database, and
|
3
3
|
# then regenerate this schema definition.
|
4
4
|
|
5
|
-
ActiveRecord::Schema.define(:version =>
|
5
|
+
ActiveRecord::Schema.define(:version => 23) do
|
6
6
|
|
7
7
|
create_table "backlogs", :force => true do |t|
|
8
8
|
t.column "name", :string, :limit => 64, :null => false
|
@@ -29,6 +29,8 @@ ActiveRecord::Schema.define(:version => 22) do
|
|
29
29
|
t.column "user_id", :integer
|
30
30
|
end
|
31
31
|
|
32
|
+
add_index "estimates", ["task_id", "created_at"], :name => "index_estimates_on_task_id_and_created_at"
|
33
|
+
|
32
34
|
create_table "groups", :primary_key => "party_id", :force => true do |t|
|
33
35
|
t.column "name", :string, :null => false
|
34
36
|
end
|
@@ -74,6 +76,8 @@ ActiveRecord::Schema.define(:version => 22) do
|
|
74
76
|
t.column "customer_id", :integer
|
75
77
|
end
|
76
78
|
|
79
|
+
add_index "tasks", ["parent_id"], :name => "index_tasks_on_parent_id"
|
80
|
+
|
77
81
|
create_table "users", :primary_key => "party_id", :force => true do |t|
|
78
82
|
t.column "login", :string, :limit => 80, :null => false
|
79
83
|
t.column "salted_password", :string, :limit => 40, :null => false
|
@@ -106,6 +110,8 @@ ActiveRecord::Schema.define(:version => 22) do
|
|
106
110
|
t.column "description", :string
|
107
111
|
end
|
108
112
|
|
113
|
+
add_index "works", ["task_id", "completed_at"], :name => "index_works_on_task_id_and_completed_at"
|
114
|
+
|
109
115
|
add_foreign_key "backlogs", ["customer_id"], "customers", ["id"], :name => "backlogs_customer_id_fkey"
|
110
116
|
add_foreign_key "backlogs", ["work_account_id"], "work_accounts", ["id"], :name => "backlogs_work_account_id_fkey"
|
111
117
|
|
data/lang/en.yaml
CHANGED
@@ -59,6 +59,7 @@ new_group: Start new group
|
|
59
59
|
new_period: Add new sprint
|
60
60
|
new_task: Add new task
|
61
61
|
new_work: Add new work record
|
62
|
+
new_work_account: Add new work account
|
62
63
|
next: Next
|
63
64
|
no_pending_tasks: There are no pending tasks in this sprint.
|
64
65
|
no_pending_tasks_in_backlog: There are no pending tasks in this backlog.
|
data/lang/no.yaml
CHANGED
@@ -59,6 +59,7 @@ new_group: Start ny gruppe
|
|
59
59
|
new_period: Start ny periode
|
60
60
|
new_task: Legg til ny oppgave
|
61
61
|
new_work: Registrer arbeid
|
62
|
+
new_work_account: Legg til timeføringskonto
|
62
63
|
next: Neste
|
63
64
|
no_pending_tasks: Det er ingen ventende oppgaver i denne perioden.
|
64
65
|
no_pending_tasks_in_backlog: Det er ingen ventende oppgaver i denne oppgavelisten.
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: backlog
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.14.
|
7
|
-
date: 2007-11-
|
6
|
+
version: 0.14.3
|
7
|
+
date: 2007-11-22 00:00:00 +01:00
|
8
8
|
summary: Application to aid collecting, processing, organizing, reviewing and doing tasks.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- db/migrate/021_create_work_accounts.rb
|
143
143
|
- db/migrate/016_add_invoicable_flag.rb
|
144
144
|
- db/migrate/018_create_groups.rb
|
145
|
+
- db/migrate/023_add_indices_for_burn_down_chart.rb
|
145
146
|
- db/migrate/022_remove_track_done_flag.rb
|
146
147
|
- db/migrate/005_add_field_work_started_at.rb
|
147
148
|
- db/migrate/006_works_data_fix.rb
|