backlog 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +14 -0
- data/app/controllers/tasks_controller.rb +2 -2
- data/app/models/task.rb +1 -1
- data/app/views/search/{results.html.erb → results.rhtml} +0 -0
- data/app/views/tasks/_completed.rhtml +1 -1
- data/app/views/tasks/_form.rhtml +1 -1
- data/lib/tasks/backup.rake +3 -8
- data/test/fixtures/tasks.yml +9 -0
- data/test/functional/backlogs_controller_test.rb +24 -0
- data/test/functional/periods_controller_test.rb +17 -1
- data/test/functional/tasks_controller_test.rb +1 -1
- data/test/functional/works_controller_test.rb +1 -1
- metadata +3 -3
data/History.txt
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
== 0.14.1 2007-11-19
|
2
|
+
|
3
|
+
=== Features
|
4
|
+
|
5
|
+
* Added link to Show Backlog view from Show task view.
|
6
|
+
|
7
|
+
=== Fixes
|
8
|
+
|
9
|
+
* Added error messages to Update Task view.
|
10
|
+
* Fixed bug in Reopen Task action in the Show Task view.
|
11
|
+
* Fixed missing template for Search action.
|
12
|
+
* Fixed display of unplanned completed tasks.
|
13
|
+
* Added adjustment of list position for backup restoration.
|
14
|
+
|
1
15
|
== 0.14.0 2007-11-18
|
2
16
|
|
3
17
|
=== Features
|
@@ -49,7 +49,7 @@ class TasksController < ApplicationController
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def edit
|
52
|
-
@task
|
52
|
+
@task ||= Task.find(params[:id])
|
53
53
|
@task.period_id = params[:task][:period_id] if params[:task] && params[:task][:period_id]
|
54
54
|
@periods = Period.find_active_or_future
|
55
55
|
@backlogs = Backlog.find(:all, :order => 'name')
|
@@ -108,7 +108,7 @@ class TasksController < ApplicationController
|
|
108
108
|
end
|
109
109
|
else
|
110
110
|
if @task.finished_at
|
111
|
-
reopen
|
111
|
+
@task.reopen
|
112
112
|
else
|
113
113
|
if @task.period
|
114
114
|
back_or_redirect_to :controller => 'periods', :action => :show, :id => @task.period, :task => @task.id
|
data/app/models/task.rb
CHANGED
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div id="completed_tasks">
|
2
2
|
<% @completed_tasks.map {|t| t.period}.uniq.each do |period| %>
|
3
|
-
<table id="completed_tasks_<%=period.id%>" class="input">
|
3
|
+
<table id="completed_tasks_<%=period ? period.id : 'unplanned'%>" class="input">
|
4
4
|
<%= render :partial => '/tasks/period_header', :locals => {:period => period} unless @completed_tasks.map(&:period).uniq.size == 1 %>
|
5
5
|
<%= render :partial => '/tasks/fields_header', :locals => {:backlog => @backlog, :active => false, :track_times => false} %>
|
6
6
|
<% @completed_tasks.select {|t| t.period == period}.each do |task| %>
|
data/app/views/tasks/_form.rhtml
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= select 'task', 'backlog_id', [['', '']] + @backlogs.map{|backlog| [backlog.name, backlog.id]}, {}, :onchange => "form.action = '#{url_for}'; form.submit();" %>
|
6
6
|
<% else %>
|
7
7
|
<label for="task_backlog_id"><%=l :backlog%></label>:
|
8
|
-
<%=
|
8
|
+
<%=hidden_field 'task', 'backlog_id' %><%=detour_to h(@task.backlog.name), :controller => 'backlogs', :action => :show, :id => @task.backlog_id %>
|
9
9
|
<% end %>
|
10
10
|
<% if @task.backlog %>
|
11
11
|
<%=image_detour_to('clipboard.png', "#{l(:backlog)} #{@task.backlog.name}", {:controller => 'backlogs', :action => :edit, :id => @task.backlog}, {:class => 'image-submit', :style => 'vertical-align: bottom'}) %>
|
data/lib/tasks/backup.rake
CHANGED
@@ -38,16 +38,11 @@ namespace :db do
|
|
38
38
|
entity = klass.new(fixture)
|
39
39
|
entity.id = fixture['id']
|
40
40
|
entity.save_without_validation!
|
41
|
-
|
42
|
-
puts "
|
43
|
-
|
44
|
-
entity = klass.new(fixture)
|
41
|
+
if fixture.keys.include?('position') && entity.position != fixture['position'].to_i
|
42
|
+
puts "Adjusting position #{entity.position} => #{fixture['position']}"
|
43
|
+
entity.position = fixture['position']
|
45
44
|
entity.save_without_validation!
|
46
45
|
end
|
47
|
-
if klass.find_by_id(fixture['id']).nil?
|
48
|
-
p fixture
|
49
|
-
fixture.each {|k,v| p klass.find(:first, :conditions => ["#{k} = ?", v])}
|
50
|
-
end
|
51
46
|
klass.find(fixture['id'])
|
52
47
|
end
|
53
48
|
if ActiveRecord::Base.connection.adapter_name.downcase == "postgresql"
|
data/test/fixtures/tasks.yml
CHANGED
@@ -70,3 +70,12 @@
|
|
70
70
|
parent_id: 8
|
71
71
|
description: sub sub task
|
72
72
|
position: 1
|
73
|
+
- completed:
|
74
|
+
id: 11
|
75
|
+
created_at: 2007-06-12
|
76
|
+
backlog_id: 1
|
77
|
+
period_id: 3
|
78
|
+
description: completed task
|
79
|
+
position: NULL
|
80
|
+
finished_at: 2007-08-02 14:15:42
|
81
|
+
resolution: COMPLETED
|
@@ -107,6 +107,30 @@ class BacklogsControllerTest < Test::Unit::TestCase
|
|
107
107
|
assert_redirected_to :controller => 'tasks', :action => :list_started
|
108
108
|
end
|
109
109
|
|
110
|
+
def test_abort_task
|
111
|
+
post :abort_task, :id => tasks(:first).id
|
112
|
+
|
113
|
+
after = Task.find(tasks(:first).id)
|
114
|
+
assert_not_nil after.finished_at
|
115
|
+
assert_equal Task::ABORTED, after.resolution
|
116
|
+
end
|
117
|
+
|
118
|
+
def test_finish_task
|
119
|
+
post :finish_task, :id => tasks(:first).id
|
120
|
+
|
121
|
+
after = Task.find(tasks(:first).id)
|
122
|
+
assert_not_nil after.finished_at
|
123
|
+
assert_equal Task::COMPLETED, after.resolution
|
124
|
+
end
|
125
|
+
|
126
|
+
def test_reopen_task
|
127
|
+
post :reopen_task, :id => tasks(:completed).id
|
128
|
+
|
129
|
+
after = Task.find(tasks(:first).id)
|
130
|
+
assert_nil after.finished_at
|
131
|
+
assert_nil after.resolution
|
132
|
+
end
|
133
|
+
|
110
134
|
private
|
111
135
|
|
112
136
|
# TODO (uwe): This method should be removed
|
@@ -5,7 +5,7 @@ require 'periods_controller'
|
|
5
5
|
class PeriodsController; def rescue_action(e) raise e end; end
|
6
6
|
|
7
7
|
class PeriodsControllerTest < Test::Unit::TestCase
|
8
|
-
|
8
|
+
main_scenario
|
9
9
|
|
10
10
|
def setup
|
11
11
|
@controller = PeriodsController.new
|
@@ -237,4 +237,20 @@ class PeriodsControllerTest < Test::Unit::TestCase
|
|
237
237
|
assert_equal Task::ABORTED, after.resolution
|
238
238
|
end
|
239
239
|
|
240
|
+
def test_finish_task
|
241
|
+
post :finish_task, :id => tasks(:first).id
|
242
|
+
|
243
|
+
after = Task.find(tasks(:first).id)
|
244
|
+
assert_not_nil after.finished_at
|
245
|
+
assert_equal Task::COMPLETED, after.resolution
|
246
|
+
end
|
247
|
+
|
248
|
+
def test_reopen_task
|
249
|
+
post :reopen_task, :id => tasks(:completed).id
|
250
|
+
|
251
|
+
after = Task.find(tasks(:first).id)
|
252
|
+
assert_nil after.finished_at
|
253
|
+
assert_nil after.resolution
|
254
|
+
end
|
255
|
+
|
240
256
|
end
|
@@ -5,7 +5,7 @@ require 'tasks_controller'
|
|
5
5
|
class TasksController; def rescue_action(e) raise e end; end
|
6
6
|
|
7
7
|
class TasksControllerTest < Test::Unit::TestCase
|
8
|
-
|
8
|
+
main_scenario
|
9
9
|
|
10
10
|
def setup
|
11
11
|
@controller = TasksController.new
|
@@ -5,7 +5,7 @@ require 'works_controller'
|
|
5
5
|
class WorksController; def rescue_action(e) raise e end; end
|
6
6
|
|
7
7
|
class WorksControllerTest < Test::Unit::TestCase
|
8
|
-
|
8
|
+
main_scenario
|
9
9
|
|
10
10
|
def setup
|
11
11
|
@controller = WorksController.new
|
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.1
|
7
|
+
date: 2007-11-19 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
|
@@ -443,7 +443,7 @@ files:
|
|
443
443
|
- app/views/groups/new.rhtml
|
444
444
|
- app/views/groups/edit.rhtml
|
445
445
|
- app/views/search
|
446
|
-
- app/views/search/results.
|
446
|
+
- app/views/search/results.rhtml
|
447
447
|
- app/views/work_accounts
|
448
448
|
- app/views/work_accounts/_name_list.rhtml
|
449
449
|
- app/views/work_accounts/list.rhtml
|