From: <nuc...@us...> - 2007-12-05 15:59:42
|
Revision: 4811 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=4811&view=rev Author: nuclear_eclipse Date: 2007-12-05 07:59:19 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Fix #8645: Roadmap should count issues with multiple parents as only one issue in progress total. Modified Paths: -------------- trunk/mantisbt/roadmap_page.php Modified: trunk/mantisbt/roadmap_page.php =================================================================== --- trunk/mantisbt/roadmap_page.php 2007-12-04 16:28:23 UTC (rev 4810) +++ trunk/mantisbt/roadmap_page.php 2007-12-05 15:59:19 UTC (rev 4811) @@ -96,6 +96,7 @@ $t_issues_planned = 0; $t_issues_resolved = 0; + $t_issues_counted = array(); $t_version_header_printed = false; @@ -136,11 +137,15 @@ if ( !helper_call_custom_function( 'roadmap_include_issue', array( $t_issue_id ) ) ) { continue; } + + if ( !isset( $t_issues_counted[$t_issue_id] ) ) { + $t_issues_planned++; - $t_issues_planned++; - - if ( bug_is_resolved( $t_issue_id ) ) { - $t_issues_resolved++; + if ( bug_is_resolved( $t_issue_id ) ) { + $t_issues_resolved++; + } + + $t_issues_counted[$t_issue_id] = true; } $t_issue_ids[] = $t_issue_id; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pri...@us...> - 2008-04-23 22:15:13
|
Revision: 5200 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5200&view=rev Author: prichards Date: 2008-04-23 15:15:05 -0700 (Wed, 23 Apr 2008) Log Message: ----------- Reduce number of database queries on roadmap by caching output of some database queries in advance Modified Paths: -------------- trunk/mantisbt/roadmap_page.php Modified: trunk/mantisbt/roadmap_page.php =================================================================== --- trunk/mantisbt/roadmap_page.php 2008-04-23 22:09:40 UTC (rev 5199) +++ trunk/mantisbt/roadmap_page.php 2008-04-23 22:15:05 UTC (rev 5200) @@ -96,6 +96,9 @@ $t_version_rows = array_reverse( version_get_all_rows( $t_project_id ) ); + # cache category info, but ignore the results for now + category_get_all_rows( $t_project_id ); + $t_project_header_printed = false; foreach( $t_version_rows as $t_version_row ) { @@ -125,6 +128,7 @@ $t_issue_ids = array(); $t_issue_parents = array(); + $t_issue_handlers = array(); while ( $t_row = db_fetch_array( $t_result ) ) { # hide private bugs if user doesn't have access to view them. @@ -166,8 +170,12 @@ $t_issue_ids[] = $t_issue_id; $t_issue_parents[] = null; } + + $t_issue_handlers[] = $t_row['handler_id']; } + user_cache_array_rows( array_unique( $t_issue_handlers ) ); + $t_progress = $t_issues_planned > 0 ? ( (integer) ( $t_issues_resolved * 100 / $t_issues_planned ) ) : 0; if ( $t_issues_planned > 0 ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |