Gantt chart: display issues that don't have a due date if they are assigned to a version with a date (#184).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1455 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Vendored
+5
-1
@@ -13,6 +13,8 @@ issues_001:
|
||||
assigned_to_id:
|
||||
author_id: 2
|
||||
status_id: 1
|
||||
start_date: <%= 1.day.ago.to_date.to_s(:db) %>
|
||||
due_date: <%= 10.day.from_now.to_date.to_s(:db) %>
|
||||
issues_002:
|
||||
created_on: 2006-07-19 21:04:21 +02:00
|
||||
project_id: 1
|
||||
@@ -20,13 +22,15 @@ issues_002:
|
||||
priority_id: 5
|
||||
subject: Add ingredients categories
|
||||
id: 2
|
||||
fixed_version_id:
|
||||
fixed_version_id: 2
|
||||
category_id:
|
||||
description: Ingredients of the recipe should be classified by categories
|
||||
tracker_id: 2
|
||||
assigned_to_id: 3
|
||||
author_id: 2
|
||||
status_id: 2
|
||||
start_date: <%= 2.day.ago.to_date.to_s(:db) %>
|
||||
due_date:
|
||||
issues_003:
|
||||
created_on: 2006-07-19 21:07:27 +02:00
|
||||
project_id: 1
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ versions_002:
|
||||
updated_on: 2006-07-19 21:00:33 +02:00
|
||||
id: 2
|
||||
description: Stable release
|
||||
effective_date: 2006-07-19
|
||||
effective_date: <%= 20.day.from_now.to_date.to_s(:db) %>
|
||||
versions_003:
|
||||
created_on: 2006-07-19 21:00:33 +02:00
|
||||
name: "2.0"
|
||||
|
||||
@@ -259,7 +259,16 @@ class ProjectsControllerTest < Test::Unit::TestCase
|
||||
get :gantt, :id => 1
|
||||
assert_response :success
|
||||
assert_template 'gantt.rhtml'
|
||||
assert_not_nil assigns(:events)
|
||||
events = assigns(:events)
|
||||
assert_not_nil events
|
||||
# Issue with start and due dates
|
||||
i = Issue.find(1)
|
||||
assert_not_nil i.due_date
|
||||
assert events.include?(Issue.find(1))
|
||||
# Issue with without due date but targeted to a version with date
|
||||
i = Issue.find(2)
|
||||
assert_nil i.due_date
|
||||
assert events.include?(i)
|
||||
end
|
||||
|
||||
def test_gantt_with_subprojects_should_not_show_private_subprojects
|
||||
|
||||
@@ -22,7 +22,7 @@ require 'versions_controller'
|
||||
class VersionsController; def rescue_action(e) raise e end; end
|
||||
|
||||
class VersionsControllerTest < Test::Unit::TestCase
|
||||
fixtures :projects, :versions, :users, :roles, :members, :enabled_modules
|
||||
fixtures :projects, :versions, :issues, :users, :roles, :members, :enabled_modules
|
||||
|
||||
def setup
|
||||
@controller = VersionsController.new
|
||||
@@ -60,9 +60,9 @@ class VersionsControllerTest < Test::Unit::TestCase
|
||||
|
||||
def test_destroy
|
||||
@request.session[:user_id] = 2
|
||||
post :destroy, :id => 2
|
||||
post :destroy, :id => 3
|
||||
assert_redirected_to 'projects/settings/ecookbook'
|
||||
assert_nil Version.find_by_id(2)
|
||||
assert_nil Version.find_by_id(3)
|
||||
end
|
||||
|
||||
def test_issue_status_by
|
||||
|
||||
Reference in New Issue
Block a user