backlog 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,4 +1,20 @@
1
- == 0.30.0 2008-04-08
1
+ == 0.31.0 2008-04-14
2
+
3
+ === Features
4
+
5
+ * Register and display who created a task and who made the last update.
6
+
7
+ === Fixes
8
+
9
+ * Fixed layout in Daily Work Sheet
10
+ * Added list of all task owners to Edit Task view.
11
+ * Changed so that the creator of a task automatically grabs it.
12
+
13
+ === Internal
14
+
15
+ *
16
+
17
+ == 0.30.0 2008-04-09
2
18
 
3
19
  === Features
4
20
 
data/README.txt CHANGED
@@ -1,4 +1,4 @@
1
- <img align="right" src="Screenshot.png"/>
1
+ http://backlog.rubyforge.org/files/Screenshot.png
2
2
 
3
3
  == Backlog
4
4
 
@@ -35,6 +35,7 @@ class TasksController < ApplicationController
35
35
  @task.task_files.create! :name => file.original_filename, :content_data => file.read, :content_type => file.content_type
36
36
  end
37
37
  @task.move_to_top
38
+ @task.grab
38
39
  if @task.period
39
40
  back_or_redirect_to :controller => 'periods', :action => 'show', :id => @task.period, :task => @task.id
40
41
  else
data/app/models/task.rb CHANGED
@@ -19,6 +19,8 @@ class Task < ActiveRecord::Base
19
19
  has_many :works, :order => 'completed_at', :dependent => :destroy
20
20
  has_many :task_files, :dependent => :destroy
21
21
  has_and_belongs_to_many :users
22
+ belongs_to :creator, :class_name => 'User', :foreign_key => 'created_by'
23
+ belongs_to :updater, :class_name => 'User', :foreign_key => 'updated_by'
22
24
 
23
25
  acts_as_list :scope => '#{parent_id ? "parent_id = #{parent_id}" : period_id ? "period_id = #{period_id}" : "period_id IS NULL AND parent_id IS NULL AND backlog_id = #{backlog_id}"} AND finished_at IS NULL'
24
26
  acts_as_tree :order => 'position'
@@ -38,9 +40,12 @@ class Task < ActiveRecord::Base
38
40
  validates_uniqueness_of :position, :scope => :period_id, :if => :period_id, :allow_nil => true
39
41
  validates_uniqueness_of :position, :scope => [:period_id, :parent_id, :backlog_id], :if => Proc.new {|task| task.period_id.nil? && task.parent_id.nil?}, :allow_nil => true
40
42
 
43
+ before_create {|record| record.created_by = current_user.id}
44
+ before_save {|record| record.updated_by = current_user.id}
45
+
41
46
  def validate
42
47
  if self.parent_id && (self.period_id || self.backlog_id)
43
- errors.add :parent_id, "A subtask may not have neither period nor backlog set."
48
+ errors.add :parent_id, "A subtask may have neither period nor backlog set."
44
49
  end
45
50
  if new_record? && self.period && self.period.passed?
46
51
  errors.add :period_id, "You may not add a task to a past period."
@@ -399,5 +404,5 @@ class Task < ActiveRecord::Base
399
404
  "#{parent.description_with_parents} - #{description}"
400
405
  end
401
406
  end
402
-
407
+
403
408
  end
@@ -79,15 +79,20 @@
79
79
  <p><label><%=l :ownership%></label><br/>
80
80
  <%= if @task.users.empty?
81
81
  l(:not_grabbed)
82
- elsif @task.users.include? current_user
83
- l(:grabbed_by_you)
82
+ else
83
+ @task.users.map do |user|
84
+ link_to h(user.name), :controller => :user, :action => :edit, :id => user.id
85
+ end.join(', ')
84
86
  end
85
87
  %>
86
88
  <br/>
87
89
  <% if @task.period %>
88
- <%=l :invite%>:
89
- <% @task.period.party.users.each do |user| %>
90
- <%=link_to "#{user.name}", :action => :invite, :id => @task.id, :user_id => user.id unless @task.users.include? user%>
90
+ <% invitable_users = @task.period.party.users - @task.users %>
91
+ <% unless invitable_users.empty?%>
92
+ <%=l :invite%>:
93
+ <% invitable_users.each do |user| %>
94
+ <%=link_to "#{user.name}", :action => :invite, :id => @task.id, :user_id => user.id%>
95
+ <% end %>
91
96
  <% end %>
92
97
  <% end %>
93
98
  </p>
@@ -67,10 +67,15 @@
67
67
 
68
68
  <br clear="all" />
69
69
 
70
+ <div style="float: right">
71
+ <%=l :created_by%>: <%=@task.creator.name if @task.created_by%><br>
72
+ <%=l :updated_by%>: <%=@task.updater.name if @task.updated_by%>
73
+ </div>
74
+
70
75
  <% form_tag({:action => 'update', :id => @task}, :multipart => true) do %>
71
- <%= render :partial => 'form' %>
72
- <%= submit_tag l(:save) %>
73
- <%= back_or_link_to l(:back), :action => 'list' %>
76
+ <%=render :partial => 'form' %>
77
+ <%=submit_tag l(:save) %>
78
+ <%=back_or_link_to l(:back), :action => 'list' %>
74
79
  <% end %>
75
80
 
76
81
  </div>
@@ -78,13 +78,14 @@
78
78
  <th/>
79
79
  <th/>
80
80
  </tr>
81
- </table>
82
- <%= back_or_link_to l(:back), '' %>
83
81
  <% end %>
84
82
 
83
+ </table>
84
+
85
+ <%=back_or_link_to l(:back), '' %>
85
86
 
86
87
  <% if @period %>
87
- <%= link_to l(:back), :controller => 'periods', :action => :show, :id => @period %>
88
+ <%=link_to l(:back), :controller => 'periods', :action => :show, :id => @period %>
88
89
  <% end %>
89
90
  </div>
90
91
 
data/config/routes.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  ActionController::Routing::Routes.draw do |map|
2
+ map.resources :tasks
3
+
2
4
  map.connect '', :controller => "welcome"
3
5
  map.connect ':controller/:action/:year/:week'
4
6
  map.connect ':controller/:action/:id.:format'
data/lang/en.yaml CHANGED
@@ -18,6 +18,7 @@ completed: Completed
18
18
  completed_at: Ended at
19
19
  completed_tasks: Completed Tasks
20
20
  confirmation: Are you sure?
21
+ created_by: Created by
21
22
  customer: Customer
22
23
  daily_work_sheet: Daily work sheet
23
24
  delete: Delete
@@ -125,6 +126,7 @@ tuesday: Tuesday
125
126
  unlock: Unlock
126
127
  unplanned_tasks: Unplanned tasks
127
128
  up: Up
129
+ updated_by: Updated by
128
130
  user: User
129
131
  view_fullscreen: View fullscreen
130
132
  wednesday: Wednesday
data/lang/no.yaml CHANGED
@@ -18,6 +18,7 @@ completed: Fullført
18
18
  completed_at: Stop tid
19
19
  completed_tasks: Fullførte Oppgaver
20
20
  confirmation: Er du sikker?
21
+ created_by: Opprettet av
21
22
  customer: Kunde
22
23
  daily_work_sheet: Timeføringsskjema
23
24
  delete: Slett
@@ -124,6 +125,7 @@ tuesday: Tirsdag
124
125
  unlock: Lås opp
125
126
  unplanned_tasks: Ikke planlagte oppgaver
126
127
  up: Opp
128
+ updated_by: Oppdatert av
127
129
  user: Bruker
128
130
  view_fullscreen: Vis fullskjerm
129
131
  wednesday: Onsdag
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uwe Kubosch
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-09 00:00:00 +02:00
12
+ date: 2008-04-16 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency