summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-29 20:29:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-29 20:29:42 +0000
commitad620607539c661b40a07146df3ced78c13a16e3 (patch)
tree5e9d0d0f5f511b875ab97bbcb48bf0ef13c5b57b
parentf2ae2e923946ee9d27e7232cafcd0505dfb52118 (diff)
downloadredmine-ad620607539c661b40a07146df3ced78c13a16e3.tar.gz
redmine-ad620607539c661b40a07146df3ced78c13a16e3.zip
Disable project completion display on the gantt (#7127).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4582 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/helpers/gantt.rb4
-rw-r--r--test/unit/lib/redmine/helpers/gantt_test.rb10
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index fbdf09411..7a600d89a 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -281,8 +281,8 @@ module Redmine
options[:zoom] ||= 1
options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]
- coords = coordinates(project.start_date, project.due_date, project.completed_percent(:include_subprojects => true), options[:zoom])
- label = "#{h project } #{h project.completed_percent(:include_subprojects => true).to_i.to_s}%"
+ coords = coordinates(project.start_date, project.due_date, nil, options[:zoom])
+ label = h(project)
case options[:format]
when :html
diff --git a/test/unit/lib/redmine/helpers/gantt_test.rb b/test/unit/lib/redmine/helpers/gantt_test.rb
index 02d69120a..ec9b0651b 100644
--- a/test/unit/lib/redmine/helpers/gantt_test.rb
+++ b/test/unit/lib/redmine/helpers/gantt_test.rb
@@ -353,24 +353,24 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
end
context "late line" do
- should "start from the starting point on the left" do
+ should_eventually "start from the starting point on the left" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.task_late[style*=left:28px]", true, @response.body
end
- should "be the total delayed width of the project" do
+ should_eventually "be the total delayed width of the project" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.task_late[style*=width:30px]", true, @response.body
end
end
context "done line" do
- should "start from the starting point on the left" do
+ should_eventually "start from the starting point on the left" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.task_done[style*=left:28px]", true, @response.body
end
- should "Be the total done width of the project" do
+ should_eventually "Be the total done width of the project" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.task_done[style*=width:18px]", true, @response.body
end
@@ -420,7 +420,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
assert_select "div.project.label", /#{@project.name}/
end
- should "show the percent complete" do
+ should_eventually "show the percent complete" do
@response.body = @gantt.line_for_project(@project, {:format => :html, :zoom => 4})
assert_select "div.project.label", /0%/
end