backlog 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/Rakefile +9 -1
- data/app/models/task.rb +3 -10
- data/app/views/tasks/_task.rhtml +4 -4
- metadata +1 -1
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -11,7 +11,10 @@ require 'tasks/rails'
|
|
11
11
|
|
12
12
|
require 'hoe'
|
13
13
|
|
14
|
-
|
14
|
+
first_history_line = File.readlines('History.txt')[0].chomp
|
15
|
+
version = (/^== (\d+.\d+.\d+) .*$/.match first_history_line)[1]
|
16
|
+
|
17
|
+
Hoe.new("backlog", version) do |p|
|
15
18
|
p.rubyforge_name = "backlog"
|
16
19
|
p.summary = "Application to aid collecting, processing, organizing, reviewing and doing tasks."
|
17
20
|
p.description = p.paragraphs_of('README.txt', 0..-1).join("\n\n")
|
@@ -23,3 +26,8 @@ Hoe.new("backlog", '0.3.3') do |p|
|
|
23
26
|
}
|
24
27
|
p.need_zip = true
|
25
28
|
end
|
29
|
+
|
30
|
+
task :rel do
|
31
|
+
ENV['VERSION'] = version
|
32
|
+
Rake::Task[:release].invoke
|
33
|
+
end
|
data/app/models/task.rb
CHANGED
@@ -20,7 +20,7 @@ class Task < ActiveRecord::Base
|
|
20
20
|
#validates_absence_of :position, :if => :finished_at
|
21
21
|
#validates_absence_of :finished_at, :if => :position
|
22
22
|
validates_presence_of :resolution, :if => :finished_at
|
23
|
-
validates_uniqueness_of :description, :scope => :backlog_id, :if =>
|
23
|
+
validates_uniqueness_of :description, :scope => :backlog_id, :if => Proc.new {|task| task.backlog_id && task.previous_task_id.nil?}
|
24
24
|
validates_uniqueness_of :description, :scope => :period_id, :if => :period_id
|
25
25
|
validates_uniqueness_of :position, :scope => :period_id, :if => :period_id, :allow_nil => true
|
26
26
|
validates_uniqueness_of :position, :scope => :parent_id, :if => :parent_id, :allow_nil => true
|
@@ -103,6 +103,7 @@ class Task < ActiveRecord::Base
|
|
103
103
|
def open
|
104
104
|
if finished_at
|
105
105
|
insert_at 1
|
106
|
+
self.position = 1
|
106
107
|
self.finished_at = nil
|
107
108
|
self.resolution = nil
|
108
109
|
estimate(initial_estimate)
|
@@ -137,7 +138,7 @@ class Task < ActiveRecord::Base
|
|
137
138
|
new_task.estimate(self.todo)
|
138
139
|
new_task.move_to_top
|
139
140
|
new_task.estimate(self.todo)
|
140
|
-
self.finish(new_task.period.party == self.period.party ? Task::POSTPONED : Task::MOVED, true
|
141
|
+
self.finish(new_task.period.party == self.period.party ? Task::POSTPONED : Task::MOVED, true)
|
141
142
|
end
|
142
143
|
|
143
144
|
def finish(resolution, save_work)
|
@@ -283,15 +284,7 @@ class Task < ActiveRecord::Base
|
|
283
284
|
end
|
284
285
|
end
|
285
286
|
new_work.user = current_user
|
286
|
-
begin
|
287
287
|
new_work.save!
|
288
|
-
rescue Exception => e
|
289
|
-
p e
|
290
|
-
p e.record
|
291
|
-
p e.record.task
|
292
|
-
p e.record.task.errors
|
293
|
-
p e.record.task.errors.full_messages
|
294
|
-
end
|
295
288
|
end
|
296
289
|
|
297
290
|
def works_with_children
|
data/app/views/tasks/_task.rhtml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<% @task = task %>
|
2
2
|
<tr valign="top" <%= 'class="highlight"' if highlight %>>
|
3
3
|
<td width="1">
|
4
|
-
<% if @task.enable_subtasks? && @task.period.active_or_future? && active %>
|
4
|
+
<% if @task.enable_subtasks? && @task.period && @task.period.active_or_future? && active %>
|
5
5
|
<% form_tag({:controller => 'tasks', :action => :specify, :id => @task}) do %>
|
6
6
|
<%= image_button_to('add.png', l(:specify), :controller => 'tasks', :action => :specify, :id => @task.id)%>
|
7
7
|
<% end %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= l(@task.resolution.downcase) if @task.finished_at %>
|
14
14
|
<%= "-" if @task.children.size > 0 %>
|
15
15
|
</td>
|
16
|
-
<td id="<%=@task.id%>" <%if active && @task.period.active_or_future?%>class="tasks" style=cursor:move;"<%end%>>
|
16
|
+
<td id="<%=@task.id%>" <%if active && @task.period && @task.period.active_or_future?%>class="tasks" style=cursor:move;"<%end%>>
|
17
17
|
<% if @task.active? -%>
|
18
18
|
<%= in_place_editor_field(:task, :description, {:id => "#{@task.id}_description", :tabindex => i}, :url => url_for(:controller => 'tasks', :action => "set_task_description", :id => @task)) %>
|
19
19
|
<% else -%>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<%= text_field 'work', 'started_at_time', :tabindex => i+1, :value => @task.started_work.started_at.strftime('%H:%M'),
|
29
29
|
:class => :task_time, :maxlength => 5, :onkeypress => "handleEvent(this, event, #{@task.id})" %>
|
30
30
|
<%= image_button_to('ernes_stop.png', l(:end_work), :controller => 'tasks', :action => :end_work, :id => @task.id) %>
|
31
|
-
<% elsif @task.track_times? && @task.period.active? %>
|
31
|
+
<% elsif @task.track_times? && @task.period && @task.period.active? %>
|
32
32
|
<%= image_button_to 'hammer.png', l(:start_work), :controller => 'tasks', :action => :start_work, :id => @task.id %>
|
33
33
|
<% end -%>
|
34
34
|
<% end %>
|
@@ -83,7 +83,7 @@
|
|
83
83
|
</td>
|
84
84
|
</tr>
|
85
85
|
|
86
|
-
<% if active && @task.period.active_or_future? %>
|
86
|
+
<% if active && @task.period && @task.period.active_or_future? %>
|
87
87
|
<%= draggable_element "#{@task.id}", :revert => true, :constraint => "'vertical'" %>
|
88
88
|
<%= drop_receiving_element "#{@task.id}",
|
89
89
|
:update => "spotlight", :url => {:controller => 'tasks', :action => "move_to", :position => @task.position},
|
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.3.
|
6
|
+
version: 0.3.4
|
7
7
|
date: 2007-08-03 00:00:00 +02:00
|
8
8
|
summary: Application to aid collecting, processing, organizing, reviewing and doing tasks.
|
9
9
|
require_paths:
|