backlog 0.10.6 → 0.10.7

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,12 @@
1
+ == 0.10.7 2007-09-26
2
+
3
+ === Fixes
4
+
5
+ * Fixed bug when postponing tasks
6
+ * Changed to propagate messages during redirects to front page.
7
+ * Fixed bugs in listing work for sprint.
8
+ * Made daily work sheet not fail with subtasks. It still does not work properly.
9
+
1
10
  == 0.10.6 2007-09-25
2
11
 
3
12
  === Fixes
@@ -6,6 +6,7 @@ class BacklogsController < ApplicationController
6
6
  :redirect_to => { :action => :index }
7
7
 
8
8
  def index
9
+ flash.keep
9
10
  if Task.find_started.size > 0
10
11
  redirect_to :controller => 'tasks', :action => :list_started
11
12
  return
@@ -10,6 +10,7 @@ class PeriodsController < ApplicationController
10
10
  else
11
11
  most_urgent_period = active_periods.sort_by {|p| p.required_speed}.last
12
12
  end
13
+ flash.keep
13
14
  redirect_to :action => 'show', :id => most_urgent_period
14
15
  end
15
16
 
@@ -103,9 +104,13 @@ class PeriodsController < ApplicationController
103
104
  end
104
105
 
105
106
  def list_work
106
- @period = Period.find(params[:id])
107
- @works = @period.tasks.map {|t| t.works}.flatten.sort_by {|w| w.completed_at}
108
- render :template => '/works/list'
107
+ if @period = Period.find_by_id(params[:id])
108
+ @works = @period.tasks.map {|t| t.works}.flatten.sort_by {|w| [w.completed_at || Time.now.midnight, w.started_at]}
109
+ render :template => '/works/list'
110
+ else
111
+ flash[:notice] = "You need to provide a period ID"
112
+ redirect_to ''
113
+ end
109
114
  end
110
115
 
111
116
  def make_link
data/app/models/task.rb CHANGED
@@ -160,7 +160,6 @@ class Task < ActiveRecord::Base
160
160
  new_task.period = new_period
161
161
  new_task.description = self.description
162
162
  new_task.initial_estimate = self.initial_estimate
163
- new_task.save!
164
163
  new_task.insert_at 1
165
164
  new_task.position = 1
166
165
  new_task.save!
@@ -9,9 +9,12 @@
9
9
  <div style="float: right"><%=link_to(image_tag('arrow_right.png'), :id => (@date + 7))%></div>
10
10
  <div style="float: right"><%=link_to(image_tag('arrow_right.png'), :id => @date+1)%></div>
11
11
 
12
+ <br clear="all" />
13
+
12
14
  <table sstyle="width: 100%" border="0">
13
15
  <tr>
14
16
  <td/>
17
+ <th><%=l :backlog %></th>
15
18
  <th><%=l :task %></th>
16
19
  <% if track_times %>
17
20
  <th><%=l :started_at if track_times %></th>
@@ -29,7 +32,7 @@
29
32
  </td>
30
33
  <td>
31
34
  <form>
32
- <%=text_field :work, :backlog_name, :id => "work_#{@work.id}_backlog_name", :value => @work.task.backlog.name, :size => 16 %>
35
+ <%=text_field :work, :backlog_name, :id => "work_#{@work.id}_backlog_name", :value => @work.task.root_task.backlog.name, :size => 16 %>
33
36
  </form>
34
37
  </td>
35
38
  <td>
@@ -16,3 +16,8 @@ personal:
16
16
  completed_at: 2007-06-12T14:35:00
17
17
  user_id: 1000001
18
18
  hours: 40.0
19
+ brother_of_started:
20
+ id: 5
21
+ task_id: 4
22
+ started_at: 2007-06-12T13:35:00
23
+ completed_at: 2007-06-12T14:35:00
@@ -99,4 +99,26 @@ class PeriodsControllerTest < Test::Unit::TestCase
99
99
  get :burn_down_chart, :id => 1
100
100
  end
101
101
 
102
+ def test_list_work_no_work
103
+ get :list_work, :id => '1'
104
+ assert_equal [], assigns(:works)
105
+ end
106
+
107
+ def test_list_work_some_work
108
+ get :list_work, :id => '2'
109
+ assert_equal 2, assigns(:works).size
110
+ end
111
+
112
+ def test_list_work_with_started_work
113
+ get :list_work, :id => '3'
114
+ assert_equal 2, assigns(:works).size
115
+ end
116
+
117
+ def test_list_work_no_id
118
+ get :list_work
119
+
120
+ assert_response :redirect
121
+ assert_redirected_to ''
122
+ end
123
+
102
124
  end
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.10.6
7
- date: 2007-09-25 00:00:00 +02:00
6
+ version: 0.10.7
7
+ date: 2007-09-26 00:00:00 +02:00
8
8
  summary: Application to aid collecting, processing, organizing, reviewing and doing tasks.
9
9
  require_paths:
10
10
  - lib