Version sharing (#465) + optional inclusion of subprojects in the roadmap view (#2666).

Each version of a project can be shared with:
* subprojects
* projects in the project hierarchy: ancestors + descendants (needs versions management permission on the root project)
* projects in the project tree: root project + all its descendants (same as above)
* all projects (can be set by admin users only)

Notes:
* when sharing a version of a private project with others projects, its name will be visible within the other projects
* a project with versions used by non descendant projects can not be archived

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3123 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-12-06 10:28:20 +00:00
parent e178123569
commit 5f8e9d7118
40 changed files with 659 additions and 75 deletions
+39
View File
@@ -925,6 +925,22 @@ class IssuesControllerTest < ActionController::TestCase
assert_tag :input, :attributes => { :name => 'time_entry[hours]', :value => "2z" }
end
def test_post_edit_should_allow_fixed_version_to_be_set_to_a_subproject
issue = Issue.find(2)
@request.session[:user_id] = 2
post :edit,
:id => issue.id,
:issue => {
:fixed_version_id => 4
}
assert_response :redirect
issue.reload
assert_equal 4, issue.fixed_version_id
assert_not_equal issue.project_id, issue.fixed_version.project_id
end
def test_get_bulk_edit
@request.session[:user_id] = 2
get :bulk_edit, :ids => [1, 2]
@@ -1005,6 +1021,21 @@ class IssuesControllerTest < ActionController::TestCase
assert_nil Issue.find(2).assigned_to
end
def test_post_bulk_edit_should_allow_fixed_version_to_be_set_to_a_subproject
@request.session[:user_id] = 2
post :bulk_edit,
:ids => [1,2],
:fixed_version_id => 4
assert_response :redirect
issues = Issue.find([1,2])
issues.each do |issue|
assert_equal 4, issue.fixed_version_id
assert_not_equal issue.project_id, issue.fixed_version.project_id
end
end
def test_move_routing
assert_routing(
{:method => :get, :path => '/issues/1/move'},
@@ -1101,6 +1132,14 @@ class IssuesControllerTest < ActionController::TestCase
assert_tag :tag => 'a', :content => 'Immediate',
:attributes => { :href => '/issues/bulk_edit?ids%5B%5D=1&amp;priority_id=8',
:class => '' }
# Versions
assert_tag :tag => 'a', :content => '2.0',
:attributes => { :href => '/issues/bulk_edit?fixed_version_id=3&amp;ids%5B%5D=1',
:class => '' }
assert_tag :tag => 'a', :content => 'eCookbook Subproject 1 - 2.0',
:attributes => { :href => '/issues/bulk_edit?fixed_version_id=4&amp;ids%5B%5D=1',
:class => '' }
assert_tag :tag => 'a', :content => 'Dave Lopper',
:attributes => { :href => '/issues/bulk_edit?assigned_to_id=3&amp;ids%5B%5D=1',
:class => '' }