backlog 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.5.8 2007-08-06
2
+
3
+ * Fixed bug in daily_work_sheet
4
+
1
5
  == 0.5.7 2007-08-06
2
6
 
3
7
  * Fixed bug when linking from a task after drag-and-drop reordering.
@@ -148,7 +148,7 @@ class ApplicationController < ActionController::Base
148
148
  :content => content
149
149
  }
150
150
  end
151
- started_tasks = Task.find_started(user)
151
+ started_tasks = Task.find_started
152
152
  if not started_tasks.empty?
153
153
  links = started_tasks.map do |task|
154
154
  "<li><a href=\"#{url_for :controller => 'tasks', :action => :list_started, :id => task.id}\">#{task.description}</a></li>"
@@ -6,7 +6,7 @@ class BacklogsController < ApplicationController
6
6
  :redirect_to => { :action => :index }
7
7
 
8
8
  def index
9
- if Task.find_started(user).size > 0
9
+ if Task.find_started.size > 0
10
10
  redirect_to :controller => 'tasks', :action => :list_started
11
11
  return
12
12
  end
@@ -5,7 +5,7 @@ class TasksController < ApplicationController
5
5
  :redirect_to => { :controller => 'backlogs' }
6
6
 
7
7
  def list_started
8
- @tasks = Task.find_started(user)
8
+ @tasks = Task.find_started
9
9
  @selected_task = Task.find_by_id(params[:id])
10
10
  back_or_redirect_to(:controller => '', :action => '') if @tasks.empty?
11
11
  end
data/app/models/task.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  class Task < ActiveRecord::Base
2
+ extend UserSystem
2
3
  include UserSystem
3
4
 
4
5
  COMPLETED = 'COMPLETED'
@@ -42,9 +43,9 @@ class Task < ActiveRecord::Base
42
43
  find(:all, :conditions => 'finished_at IS NULL', :order => 'description')
43
44
  end
44
45
 
45
- def self.find_started(user)
46
- if user
47
- user_clause = " OR user_id = #{user.id}"
46
+ def self.find_started
47
+ if current_user
48
+ user_clause = " OR user_id = #{current_user.id}"
48
49
  end
49
50
  conditions = "completed_at IS NULL AND (user_id IS NULL#{user_clause})"
50
51
  Work.find(:all, :conditions => conditions).map {|work| work.task}.sort do |t1, t2|
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: backlog
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.7
6
+ version: 0.5.8
7
7
  date: 2007-08-06 00:00:00 +02:00
8
8
  summary: Application to aid collecting, processing, organizing, reviewing and doing tasks.
9
9
  require_paths: