https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292018-12-13T15:22:46ZRedmineRedmine - Feature #30207: Hide menu item in the cross-project menu if the module is not enabled in any projecthttps://www.redmine.org/issues/30207?journal_id=889612018-12-13T15:22:46ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/5920">Feature #5920</a>: Unify and improve cross-project views layout</i> added</li></ul> Redmine - Feature #30207: Hide menu item in the cross-project menu if the module is not enabled in any projecthttps://www.redmine.org/issues/30207?journal_id=890932018-12-19T01:59:42ZYuichi HARADA
<ul><li><strong>File</strong> <a href="/attachments/22037">30207-cross-project-menu.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/22037/30207-cross-project-menu.patch">30207-cross-project-menu.patch</a> added</li></ul><p>If you disable each modules (e.g. 'Issue tracking', 'Time tracking', 'Gantt', 'Calendar', 'News') in all projects available to logged in users, the each tabs (e.g. 'Issues', 'Spent time', 'Gantt', 'Calendar', 'News') of the cross-project menu is not displayed.</p>
<p>I made a patch, and attach it.</p> Redmine - Feature #30207: Hide menu item in the cross-project menu if the module is not enabled in any projecthttps://www.redmine.org/issues/30207?journal_id=891732018-12-30T05:37:35ZGo MAEDA
<ul><li><strong>Target version</strong> set to <i>4.1.0</i></li></ul> Redmine - Feature #30207: Hide menu item in the cross-project menu if the module is not enabled in any projecthttps://www.redmine.org/issues/30207?journal_id=893662019-01-13T03:24:53ZGo MAEDA
<ul><li><strong>Tracker</strong> changed from <i>Defect</i> to <i>Feature</i></li><li><strong>Subject</strong> changed from <i>Tab in the cross-project menu is displayed even if the module is disabled in all projects</i> to <i>Hide menu item in the cross-project menu if the module is not enabled in any project</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Go MAEDA</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Committed. Thank you for your contribution.</p> Redmine - Feature #30207: Hide menu item in the cross-project menu if the module is not enabled in any projecthttps://www.redmine.org/issues/30207?journal_id=894082019-01-15T06:10:16ZMarius BÄ‚LTEANU
<ul></ul><p>The current implementation generates one query per each module checked, please see the above log:<br /><pre>
D, [2019-01-15T05:45:00.920205 #12] DEBUG -- : EnabledModule Exists (0.9ms) SELECT 1 AS one FROM `enabled_modules` WHERE `enabled_modules`.`project_id` IN (SELECT `projects`.`id` FROM `projects` WHERE (projects.status <> 9)) AND `enabled_modules`.`name` = 'issue_tracking' LIMIT 1
D, [2019-01-15T05:45:00.922439 #12] DEBUG -- : EnabledModule Exists (0.6ms) SELECT 1 AS one FROM `enabled_modules` WHERE `enabled_modules`.`project_id` IN (SELECT `projects`.`id` FROM `projects` WHERE (projects.status <> 9)) AND `enabled_modules`.`name` = 'time_tracking' LIMIT 1
D, [2019-01-15T05:45:00.927233 #12] DEBUG -- : EnabledModule Exists (0.9ms) SELECT 1 AS one FROM `enabled_modules` WHERE `enabled_modules`.`project_id` IN (SELECT `projects`.`id` FROM `projects` WHERE (projects.status <> 9)) AND `enabled_modules`.`name` = 'gantt' LIMIT 1
D, [2019-01-15T05:45:00.930691 #12] DEBUG -- : EnabledModule Exists (0.6ms) SELECT 1 AS one FROM `enabled_modules` WHERE `enabled_modules`.`project_id` IN (SELECT `projects`.`id` FROM `projects` WHERE (projects.status <> 9)) AND `enabled_modules`.`name` = 'calendar' LIMIT 1
D, [2019-01-15T05:45:00.932697 #12] DEBUG -- : EnabledModule Exists (0.6ms) SELECT 1 AS one FROM `enabled_modules` WHERE `enabled_modules`.`project_id` IN (SELECT `projects`.`id` FROM `projects` WHERE (projects.status <> 9)) AND `enabled_modules`.`name` = 'news' LIMIT 1
</pre></p>
<p>Is this ok from a performance point of view?</p> Redmine - Feature #30207: Hide menu item in the cross-project menu if the module is not enabled in any projecthttps://www.redmine.org/issues/30207?journal_id=894092019-01-15T06:42:45ZMarius BÄ‚LTEANU
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul> Redmine - Feature #30207: Hide menu item in the cross-project menu if the module is not enabled in any projecthttps://www.redmine.org/issues/30207?journal_id=924732019-06-20T08:57:19ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>I also had a concern about these queries but as long as they are fast it should not be a problem.</p> Redmine - Feature #30207: Hide menu item in the cross-project menu if the module is not enabled in any projecthttps://www.redmine.org/issues/30207?journal_id=974762020-04-24T22:12:00ZAleksandar Pavic
<ul></ul><p>It is still displayed for roles that don't have permission to use any of those...</p>
<p>Once they click on projects tab.</p>
<p>My Redmine version is: 4.1.0.stable.19444</p>