backlog 0.10.5 → 0.10.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ == 0.10.6 2007-09-25
2
+
3
+ === Fixes
4
+
5
+ * Fixed calculation of work in time sheet.
6
+ * Corrected link to Time sheet for older weeks.
7
+ * Fixed extraction of changes when releasing.
8
+
1
9
  == 0.10.5 2007-09-25
2
10
 
3
11
  === Fixes
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ Hoe.new("backlog", APP::VERSION) do |p|
19
19
  p.author = 'Uwe Kubosch'
20
20
  p.email = 'uwe@kubosch.no'
21
21
  p.remote_rdoc_dir = '' # Release to root
22
- p.changes = p.paragraphs_of('History.txt', 0..4).join("\n\n")
22
+ p.changes = File.read('History.txt').scan(/^== .*?(?=^== )/m).first
23
23
  p.rdoc_pattern = /^(app\/(controllers|helpers|models)|lib|bin)|txt$/
24
24
  p.clean_globs = ['doc', 'log/*']
25
25
  p.spec_extras = {
data/app/models/work.rb CHANGED
@@ -44,7 +44,7 @@ class Work < ActiveRecord::Base
44
44
  # backlog1.id => [[m, t, w, t, f, s, s], [m, t, w, t, f, s, s]],
45
45
  # backlog2.id => [<work for monday>, 0, <work for wednesday>, <work for thursday>, <work for friday>, 0, <work for sunday>]
46
46
  # }
47
- def self.work_totals_for_week(week_no, user_id = current_user)
47
+ def self.work_totals_for_week(week_no, user = current_user)
48
48
  first = Date.commercial(Date.today.year, week_no, 1)
49
49
  last = first + 7
50
50
  works = find(:all, :conditions => "completed_at IS NOT NULL AND started_at BETWEEN '#{first.to_time.iso8601}' AND '#{last.to_time.iso8601}'", :order => 'started_at')
@@ -52,7 +52,7 @@ class Work < ActiveRecord::Base
52
52
  Backlog.find(:all).each do |backlog|
53
53
  totals_per_backlog[backlog.id] = [[], []]
54
54
  (0..6).each do |day|
55
- works_for_day = works.select {|work| (work.task.backlog == backlog) && (work.started_at.to_date == (first + day)) && (user_id && work.user_id == user_id) }
55
+ works_for_day = works.select {|work| (work.task.backlog == backlog) && (work.started_at.to_date == (first + day)) && (work.user_id.nil? || (user && work.user_id == user.id)) }
56
56
  invoice_works_for_day = works_for_day.select {|work| work.invoice? }
57
57
  internal_works_for_day = works_for_day.select {|work| !work.invoice? }
58
58
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  <div align="right">
14
14
  [<%=detour_to l(:new_work), :controller => 'works', :action => :new %>]
15
- [<%=link_to 'Timeliste', :action => :timeliste %>]
15
+ [<%=link_to 'Timeliste', :action => :timeliste, :id => @week %>]
16
16
  [<%= if params[:with_empty]
17
17
  link_to 'Hide empty work records'
18
18
  else
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.10.5
6
+ version: 0.10.6
7
7
  date: 2007-09-25 00:00:00 +02:00
8
8
  summary: Application to aid collecting, processing, organizing, reviewing and doing tasks.
9
9
  require_paths: