Feature #7956

Show Roadmap tab when subprojects have defined versions

Added by Maciej Li┼╝ewski over 9 years ago. Updated about 1 month ago.

Status:ClosedStart date:2011-03-22
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Roadmap
Target version:4.2.0
Resolution:Fixed

Description

If root project does not have defined versions, but subprojects have them, there is no "roadmap" menu item in root-level project.
I guess this is common situation when you use project nesting to simulate development areas, for example: root project stands for "all projects for Client X" so you could use reporting aggregated per-client...

You can always enter the root-level roadmap simply by specyfying "project-name/roadmap" in URL, but this is not so pretty...

7956.patch Magnifier (1.85 KB) Go MAEDA, 2020-05-27 15:43


Related issues

Related to Redmine - Feature #2666: Roadmap for main project should see Roadmaps for sub proj... Closed 2009-02-04
Related to Redmine - Feature #1342: Global versions roadmap New 2008-06-01
Duplicated by Redmine - Defect #9234: Versions of subprojects are / Roadmap) is - only visible ... Closed 2011-09-12

Associated revisions

Revision 19801
Added by Go MAEDA 4 months ago

Show Roadmap tab when subprojects have defined versions (#7956).

Patch by Go MAEDA.

History

#1 Updated by Etienne Massip over 9 years ago

  • Category set to Projects

#2 Updated by Etienne Massip almost 9 years ago

  • Category changed from Projects to Roadmap

#3 Updated by Terence Mill almost 9 years ago

We are using hierarchical project organization heavily, but some of our parent "project" just implement departments under which real projects with planned version are configured. In the departments parent projects we activated issue module and hoped to see the Versions of all sub projects in its roadmap.
But this only works if at least one version is configured in deparment (parent) project. If not the Roadmap tab isn't even displayed!
This behaviour is very wired and doesn't make sense for. Either in every case version are showed in the roadmap (for all childs too) or not, but not only if parent also has version defined.

Thats why we think it is more a bug than a feature, as it behaves now!

+1

#4 Updated by Go MAEDA 12 months ago

  • Related to Feature #2666: Roadmap for main project should see Roadmaps for sub projects added

#5 Updated by Go MAEDA 12 months ago

"Roadmap" tab is shown in the parent project if one or more shared versions visible to the parent is defined in subprojects (#2666).

#6 Updated by Go MAEDA 4 months ago

I think this request is a natural one.

The roadmap page shows versions in subprojects if "Display subprojects issues on main projects by default" (Administration > Settings > Issue tracking) is enabled.

So, the tab in the project menu should be displayed when subprojects have any version even if the current project has no version.

The following patch changes the behavior of the menu.

diff --git a/lib/redmine.rb b/lib/redmine.rb
index beaebaec8..668a65da2 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -303,7 +303,7 @@ Redmine::MenuManager.map :project_menu do |menu|
   menu.push :overview, { :controller => 'projects', :action => 'show' }
   menu.push :activity, { :controller => 'activities', :action => 'index' }
   menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id,
-            :if => Proc.new { |p| p.shared_versions.any? }
+            :if => Proc.new { |p| Setting.display_subprojects_issues? ? p.rolled_up_versions.any? : p.shared_versions.any? }
   menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
   menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
             :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) },

#7 Updated by Go MAEDA 4 months ago

  • File 7956.patchMagnifier added
  • Target version set to Candidate for next major release

Attaching a patch with test code.

#8 Updated by Mischa The Evil 4 months ago

Go MAEDA wrote:

I think this request is a natural one.

I agree. LGTM.

#9 Updated by Go MAEDA 4 months ago

  • Target version changed from Candidate for next major release to 4.2.0

Mischa The Evil wrote:

I agree. LGTM.

Thank you for reviewing the patch. Setting the target version to 4.2.0.

#10 Updated by Go MAEDA 4 months ago

#11 Updated by Go MAEDA 4 months ago

  • Subject changed from Show menu item 'Roadmap' when subprojects have defined versions to Show Roadmap tab when subprojects have defined versions
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

#12 Updated by Go MAEDA 4 months ago

Committed the patch.

#13 Updated by Aleksandar Pavic about 1 month ago

+1

Thanks for patch...

Works with:
Redmine 4.1.0.stable.19444

Also available in: Atom PDF