backlog 0.12.4 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,22 @@
1
+ == 0.13.0 2007-11-12
2
+
3
+ === Features
4
+
5
+ * Removed "Track done" attribute from backlog, since it is determined by setting a work account.
6
+ * Speed up of work related tasks
7
+
8
+ === Fixes
9
+
10
+ * Changed to allow not setting a work account for a backlog.
11
+ * Fixed faulty javascript to select active task.
12
+ * Fixed redirect to create a new sprint when moving a task to next sprint for the first time.
13
+ * Added setting of executable flag for init.d startup script.
14
+
15
+ === Known bugs
16
+
17
+ * Ordering in the Show Backlog view is messed up.
18
+ * Finishing or reopening tasks makes remaining tasks show wrong priority number.
19
+
1
20
  == 0.12.4 2007-11-11
2
21
 
3
22
  === Fixes
@@ -189,8 +189,6 @@ class ApplicationController < ActionController::Base
189
189
  def setup_remove
190
190
  @last_active = @task.higher_item.nil? && @task.lower_item.nil?
191
191
  @last_active_in_backlog = @last_active || ((@task.higher_item.nil? || @task.higher_item.backlog != @task.backlog) && (@task.lower_item.nil? || @task.lower_item.backlog != @task.backlog))
192
- finished_count = Task.count(:conditions => ['period_id = ? AND finished_at IS NOT NULL', @task.period_id])
193
- @first_finished = finished_count == 0
194
192
  end
195
193
 
196
194
  end
@@ -213,7 +213,7 @@ class TasksController < ApplicationController
213
213
  params[:period_id] = next_period && next_period.id
214
214
  move_to_period
215
215
  else
216
- redirect_to :action => :edit, :id => @task
216
+ rjs_redirect_to :action => :edit, :id => @task
217
217
  end
218
218
  end
219
219
 
@@ -3,7 +3,7 @@ class WorksController < ApplicationController
3
3
  in_place_edit_for :work, :invoice
4
4
  in_place_edit_for :work, :started_at_time
5
5
  in_place_edit_for :work, :completed_at_time
6
- skip_before_filter :populate_layout, :only => [ :auto_complete_for_work_description, :daily_work_sheet, :set_work_hours, :timeliste, :weekly_work_sheet, :weekly_work_sheet2 ]
6
+ skip_before_filter :populate_layout, :except => [:create, :destroy, :edit, :index, :list, :new, :show, :update]
7
7
  auto_complete_for :work, :description
8
8
 
9
9
  def index
@@ -45,7 +45,8 @@ module TasksHelper
45
45
  end
46
46
 
47
47
  def add_finished_task(page)
48
- unless @first_finished
48
+ finished_count = Task.count(:conditions => ['period_id = ? AND finished_at IS NOT NULL', @task.period_id])
49
+ unless finished_count == 1
49
50
  page.select('#completed_tasks tr').first.remove
50
51
  end
51
52
 
@@ -56,7 +57,9 @@ module TasksHelper
56
57
  end
57
58
 
58
59
  def update_burn_down_chart(page)
59
- page['burn_down_chart'].src = url_for(:controller => 'periods', :action => :burn_down_chart_thumbnail, :id => @task.period.id, :rnd => rand)
60
+ if @task.period
61
+ page['burn_down_chart'].src = url_for(:controller => 'periods', :action => :burn_down_chart_thumbnail, :id => @task.period.id, :rnd => rand)
62
+ end
60
63
  end
61
64
 
62
65
  def record(page, script)
@@ -3,7 +3,6 @@ class Backlog < ActiveRecord::Base
3
3
  validates_length_of :name, :allow_nil => false, :maximum => 64
4
4
  validates_uniqueness_of :name
5
5
  validates_inclusion_of :track_todo, :in => [true, false], :allow_nil => true, :message => ActiveRecord::Errors.default_error_messages[:blank]
6
- validates_inclusion_of :track_done, :in => [true, false], :allow_nil => true, :message => ActiveRecord::Errors.default_error_messages[:blank]
7
6
  validates_inclusion_of :enable_subtasks, :in => [true, false], :allow_nil => false, :message => ActiveRecord::Errors.default_error_messages[:blank]
8
7
  validates_inclusion_of :enable_customer, :in => [true, false], :allow_nil => true, :message => ActiveRecord::Errors.default_error_messages[:blank]
9
8
  validates_inclusion_of :enable_users, :in => [true, false], :allow_nil => true, :message => ActiveRecord::Errors.default_error_messages[:blank]
@@ -51,6 +50,10 @@ class Backlog < ActiveRecord::Base
51
50
  work_account && work_account.invoice_code && work_account.invoice_code.length > 0
52
51
  end
53
52
 
53
+ def track_done?
54
+ not work_account.nil?
55
+ end
56
+
54
57
  def track_times?
55
58
  work_account && work_account.track_times?
56
59
  end
data/app/models/period.rb CHANGED
@@ -148,7 +148,7 @@ class Period < ActiveRecord::Base
148
148
  end
149
149
 
150
150
  def track_work?
151
- not backlogs.find {|backlog| backlog.track_done?}.nil?
151
+ not backlogs.find {|backlog| backlog.work_account}.nil?
152
152
  end
153
153
 
154
154
  def track_times?
data/app/models/task.rb CHANGED
@@ -127,7 +127,7 @@ class Task < ActiveRecord::Base
127
127
  end
128
128
 
129
129
  def reopen
130
- if period.passed?
130
+ if period && period.passed?
131
131
  flash[:notice] = "You cannot reopen a task in a period that is passed."
132
132
  else
133
133
  open
@@ -244,7 +244,7 @@ class Task < ActiveRecord::Base
244
244
  end
245
245
 
246
246
  def track_done?
247
- root_task.backlog.track_done
247
+ not root_task.backlog.work_account.nil?
248
248
  end
249
249
 
250
250
  def track_times?
@@ -9,12 +9,6 @@
9
9
  <label for="backlog_track_todo"><%=l :track_todo%></label>
10
10
  </p>
11
11
 
12
- <!-- TODO (uwe): Edit this on WorkAccount -->
13
- <p>
14
- <%= check_box 'backlog', 'track_done' %>
15
- <label for="backlog_track_done"><%=l :track_done%></label>
16
- </p>
17
-
18
12
  <p>
19
13
  <%= check_box 'backlog', 'enable_subtasks' %>
20
14
  <label for="backlog_enable_subtasks"><%=l :enable_subtasks%></label>
@@ -32,7 +26,7 @@
32
26
 
33
27
  <p>
34
28
  <label for="backlog_work_account"><%=l :work_account%></label><br/>
35
- <%=select 'backlog', 'work_account_id', @work_accounts.map {|wa| [wa.name, wa.id]}.sort %>
29
+ <%=select 'backlog', 'work_account_id', [['', '']] + @work_accounts.map {|wa| [wa.name, wa.id]}.sort %>
36
30
  <% if @backlog.work_account %>
37
31
  <%=image_detour_to('work_account.png', "#{l(:work_account)} #{@backlog.work_account.name}", {:controller => 'work_accounts', :action => :edit, :id => @backlog.work_account}, {:class => 'image-submit', :style => 'vertical-align: bottom'}) %>
38
32
  <% end %>
@@ -4,6 +4,7 @@
4
4
  <h4><%=l :tasks%></h4>
5
5
  </div>
6
6
 
7
+ <div id="active_tasks"<%=' style="display: none;"' unless @tasks and not @tasks.empty?%>>
7
8
  <table>
8
9
  <%= render :partial => '/tasks/backlog_header', :locals => {:backlog => @backlog, :track_times => tasks.find {|t|t.period && t.period.active?}} %>
9
10
  <% i = 0 %>
@@ -17,6 +18,10 @@
17
18
  <%= render :partial => '/tasks/task/', :locals => {:task => @task, :i => i += 1, :active => true, :highlight_task => false, :update => :maincontent, :hidden => false} %>
18
19
  <% end %>
19
20
  </table>
21
+ </div>
22
+
23
+ <p id="no_tasks_message"<%=' style="display: none;"' if @tasks and not @tasks.empty?%>><%=l :no_pending_tasks_in_backlog%></p>
24
+
20
25
  <%=back_or_link_to(l(:back)) %>
21
26
  </div>
22
27
 
@@ -55,8 +55,8 @@ function handleEvent(field, event, id) {
55
55
 
56
56
 
57
57
  <script type="text/JavaScript">
58
- <% if @selected_task %>
59
- document.getElementById('<%=@selected_task.id%>_description').focus();
60
- //document.getElementById('<%=@selected_task.id%>_description').select();
58
+ <% if @selected_task && @selected_task.active?%>
59
+ document.getElementById('task_<%=@selected_task.id%>_description').focus();
60
+ //document.getElementById('task_<%=@selected_task.id%>_description').select();
61
61
  <% end %>
62
62
  </script>
@@ -1,8 +1,8 @@
1
1
  <% current_period = nil %>
2
2
 
3
3
  <table id="completed_tasks" class="input">
4
- <% for task in @completed_tasks %>
5
- <% if task.period != current_period %>
4
+ <% @completed_tasks.each_with_index do |task, i| %>
5
+ <% if i == 0 || task.period != current_period %>
6
6
  <%= render :partial => '/tasks/period_header', :locals => {:period => task.period} unless @completed_tasks.map(&:period).uniq.size == 1 %>
7
7
  <%= render :partial => '/tasks/fields_header', :locals => {:backlog => task.backlog, :active => false, :track_times => false} %>
8
8
  <% current_period = task.period %>
data/bin/backlog CHANGED
@@ -73,7 +73,8 @@ when 'setup_unix'
73
73
  if File.directory? '/etc/init.d'
74
74
  startup_app = "/etc/init.d/#{APPLICATION}"
75
75
  File.delete startup_app if File.exists? startup_app
76
- `cp #{INSTALL_DIR}/bin/backlog_init.d #{startup_app}` unless File.exists? startup_app
76
+ `cp -p #{INSTALL_DIR}/bin/backlog_init.d #{startup_app}` unless File.exists? startup_app
77
+ `chmod a+x #{startup_app}` if File.exists? startup_app
77
78
  end
78
79
  FileUtils.cp "#{INSTALL_DIR}/etc/#{APPLICATION}.conf", config_file unless File.exists? config_file
79
80
  `su - -c "chkconfig --add #{APPLICATION}"`
@@ -0,0 +1,9 @@
1
+ class RemoveTrackDoneFlag < ActiveRecord::Migration
2
+ def self.up
3
+ remove_column :backlogs, :track_done
4
+ end
5
+
6
+ def self.down
7
+ add_column :backlogs, :track_done, :boolean
8
+ end
9
+ end
data/db/schema.rb CHANGED
@@ -2,12 +2,11 @@
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 => 21) do
5
+ ActiveRecord::Schema.define(:version => 22) do
6
6
 
7
7
  create_table "backlogs", :force => true do |t|
8
8
  t.column "name", :string, :limit => 64, :null => false
9
9
  t.column "track_todo", :boolean
10
- t.column "track_done", :boolean
11
10
  t.column "enable_subtasks", :boolean, :default => false, :null => false
12
11
  t.column "enable_customer", :boolean
13
12
  t.column "enable_users", :boolean
data/lang/en.yaml CHANGED
@@ -61,6 +61,7 @@ new_task: Add new task
61
61
  new_work: Add new work record
62
62
  next: Next
63
63
  no_pending_tasks: There are no pending tasks in this sprint.
64
+ no_pending_tasks_in_backlog: There are no pending tasks in this backlog.
64
65
  notes: Notes
65
66
  password: Password
66
67
  period: Sprint
data/lang/no.yaml CHANGED
@@ -61,6 +61,7 @@ new_task: Legg til ny oppgave
61
61
  new_work: Registrer arbeid
62
62
  next: Neste
63
63
  no_pending_tasks: Det er ingen ventende oppgaver i denne perioden.
64
+ no_pending_tasks_in_backlog: Det er ingen ventende oppgaver i denne oppgavelisten.
64
65
  notes: Notater
65
66
  password: Passord
66
67
  period: Periode
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.12.4
7
- date: 2007-11-11 00:00:00 +01:00
6
+ version: 0.13.0
7
+ date: 2007-11-14 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/022_remove_track_done_flag.rb
145
146
  - db/migrate/005_add_field_work_started_at.rb
146
147
  - db/migrate/006_works_data_fix.rb
147
148
  - db/test.db