Defect #34983 » 0001-Fix-roadmap-tab-is-missing-if-there-are-only-inherit.patch
lib/redmine.rb | ||
---|---|---|
367 | 367 |
:param => :project_id, |
368 | 368 |
:if => |
369 | 369 |
Proc.new do |p| |
370 |
if Setting.display_subprojects_issues?
|
|
371 |
p.rolled_up_versions.any?
|
|
370 |
if p.shared_versions.any?
|
|
371 |
true
|
|
372 | 372 |
else |
373 |
p.shared_versions.any?
|
|
373 |
Setting.display_subprojects_issues? && p.rolled_up_versions.any?
|
|
374 | 374 |
end |
375 | 375 |
end |
376 | 376 |
) |
test/integration/lib/redmine/menu_manager_test.rb | ||
---|---|---|
147 | 147 |
assert_select '#main-menu a.roadmap', 0 |
148 | 148 |
end |
149 | 149 |
end |
150 | ||
151 |
def test_project_menu_should_show_roadmap_if_project_has_shared_version |
|
152 |
Version.delete_all |
|
153 |
project = Project.generate!(:parent_id => 2) |
|
154 | ||
155 |
Version.generate!(project_id: 2, sharing: 'tree') |
|
156 | ||
157 |
with_settings :display_subprojects_issues => '1' do |
|
158 |
get "/projects/#{project.id}" |
|
159 |
assert_select '#main-menu a.roadmap' |
|
160 |
end |
|
161 | ||
162 |
with_settings :display_subprojects_issues => '0' do |
|
163 |
get "/projects/#{project.id}" |
|
164 |
assert_select '#main-menu a.roadmap' |
|
165 |
end |
|
166 |
end |
|
150 | 167 |
end |