View Issue Details

IDProjectCategoryView StatusLast Update
0008499mantisbtreportspublic2010-12-06 09:39
Reporternurikabe Assigned Tojreese  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.0rc1 
Target Version1.1.0Fixed in Version1.1.0 
Summary0008499: Many graphs show "not enough data to create graph" after upgrading from 1.1.0a2
Description

What would cause this? Thanks.

Tagspatch
Attached Files
patch.txt (10,995 bytes)   
Index: /home/sogabe/public_html/mantis/summary_graph_bycategory.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bycategory.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bycategory.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_category_summary();
+	if ( $t_token == null ) {
+		$t_metrics = create_category_summary();
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_category' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 	
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_category_summary();
+	if ( $t_token == null ) {
+		$t_metrics = create_category_summary();
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_category_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_priority' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = enum_bug_group( lang_get( 'priority_enum_string' ), 'priority');	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_priority_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_priority_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_resolution' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_group( lang_get( 'resolution_enum_string' ), 'resolution' );
+	} else {
+		 $t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_resolution_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	} else {
+		 $t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_resolution_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_severity' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null ) {
+		$t_metrics = enum_bug_group( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_severity_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_severity_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bystatus.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bystatus.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bystatus.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );		
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_status' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_status_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_jpgraph_page.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_jpgraph_page.php	(revision 140)
+++ /home/sogabe/public_html/mantis/summary_jpgraph_page.php	(working copy)
@@ -38,6 +38,8 @@
 	$t_wide = config_get( 'graph_summary_graphs_per_row' );
 	$t_width = config_get( 'graph_window_width' );
 	$t_graph_width = (int) ( ( $t_width - 50 ) / $t_wide );
+	
+	token_delete( TOKEN_GRAPH );
 
 ?>
 
patch.txt (10,995 bytes)   
patch-20071112.txt (10,993 bytes)   
Index: /home/sogabe/public_html/mantis/summary_graph_bycategory.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bycategory.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_bycategory.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_category_summary();
+	if ( $t_token == null ) {
+		$t_metrics = create_category_summary();
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_category' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_bycategory_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 	
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_category_summary();
+	if ( $t_token == null ) {
+		$t_metrics = create_category_summary();
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_category_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_priority' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = enum_bug_group( lang_get( 'priority_enum_string' ), 'priority');	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_priority_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_bypriority_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'priority_enum_string' ), 'priority');	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_priority_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_resolution' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null ) {
+		$t_metrics = enum_bug_group( lang_get( 'resolution_enum_string' ), 'resolution' );
+	} else {
+		 $t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_resolution_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_byresolution_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-    $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'resolution_enum_string' ), 'resolution' );
+	} else {
+		 $t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_resolution_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_severity' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity_mix.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null ) {
+		$t_metrics = enum_bug_group( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_group( $t_metrics, lang_get( 'by_severity_mix' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_byseverity_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );	
+	} else {
+		$t_metrics = graph_total_metrics( unserialize( $t_token ) );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_severity_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bystatus.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bystatus.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_bystatus.php	(working copy)
@@ -34,7 +34,11 @@
 	$t_ar = config_get( 'graph_bar_aspect' );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );		
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_bar( $t_metrics, lang_get( 'by_status' ), $f_width, $f_width * $t_ar );
 ?>
Index: /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_graph_bystatus_pct.php	(working copy)
@@ -33,7 +33,11 @@
 	$f_width = gpc_get_int( 'width', 300 );
 
 	$t_token = token_get_value( TOKEN_GRAPH );
-	$t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );
+	if ( $t_token == null ) {
+		$t_metrics = create_bug_enum_summary( lang_get( 'status_enum_string' ), 'status' );	
+	} else {
+		$t_metrics = unserialize( $t_token );
+	}
 
 	graph_pie( $t_metrics, lang_get( 'by_status_pct' ), $f_width, $f_width );
 ?>
Index: /home/sogabe/public_html/mantis/summary_jpgraph_page.php
===================================================================
--- /home/sogabe/public_html/mantis/summary_jpgraph_page.php	(revision 145)
+++ /home/sogabe/public_html/mantis/summary_jpgraph_page.php	(working copy)
@@ -38,6 +38,8 @@
 	$t_wide = config_get( 'graph_summary_graphs_per_row' );
 	$t_width = config_get( 'graph_window_width' );
 	$t_graph_width = (int) ( ( $t_width - 50 ) / $t_wide );
+	
+	token_delete( TOKEN_GRAPH );
 
 ?>
 
patch-20071112.txt (10,993 bytes)   

Activities

brycew

brycew

2007-10-29 06:32

reporter   ~0016018

I have also received this issue

I have tried the following:

  • Fresh install of 1.0.8 and upgraded to 1.1.0RC2
  • Fresh install of 1.1.0RC2

Have tried the following

  • PHP4 (jpgraph 1.22)
  • PHP5 (jpgraph 2.22)

I have installed on both Windows using XAMPP and also my own Ubuntu Gutsy Box and my ResellerZoom account.

All of the above does not work

I have around 80 issues including notes and various status in the DB, however when using 1.1.0RC2 I get the following graphs saying not enough data to create graphs

  • Advanced Summary (Severity, Status, Resolution, Category, Priority)
  • Per Priority - By Priority, By Priority Percentage
  • Per Severity - By Severity, By Severity Percentage
  • Per Resolution - By Resolution By Severity Resolution

I have been using Mantis for over 4 years and have never had such a problem
I am happy to provide my config file, and database scheme if needed.

Using 1.0.8 works fine, however either Fresh install or Upgrade to 1.1.0RC2 breaks the Graphs - which really isn't acceptable as these are using for management reporting.

If there is any debugging or other information that I can provide, please let me know and I'll be more than happy to assist in working out the cause of this issue.

pheles

pheles

2007-10-30 08:20

reporter   ~0016030

I experienced the same behaviour for both Versions 1.1.0rc1 and 1.1.0rc2 and got a temporary workaround for this bug:

Edit and change either of these files (which result a failure):

  • summary_graph_bycategory.php
  • summary_graph_bystatus.php
  • summary_graph_bypriority.php
  • summary_graph_bypriority_pct.php
  • summary_graph_byresolution.php
  • summary_graph_byresolution_pct.php
  • summary_graph_byseverity.php
  • summary_graph_byseverity_pct.php
    (and maybe other too that I did not notice about yet!)

Disable the token check as shown in this example (summary_graph_bycategory.php):

(commented out)
#$t_token = token_get_value( TOKEN_GRAPH );
#$t_metrics = $t_token != null ? unserialize( $t_token ) : create_category_summary();
(inserted)
$t_metrics = create_category_summary();

Then, at least the summary will generate valid graph plots again!

Hope this will work for you!
Cheers!

seiji

seiji

2007-10-30 09:35

reporter   ~0016031

I think that the fixes in 0008344 caused this defect.
I've attached patch.txt.
It works for me.

vboctor

vboctor

2007-11-01 04:20

manager   ~0016049

Reminder sent to: jreese

jreese, can you please check this out.

jreese

jreese

2007-11-01 09:05

reporter   ~0016050

Seiji, I'm not sure why your patch changes would affect the operation of the graphs. Your if/else clauses do exactly the same thing as what the previous code does, with the exception of the added token_delete() call.

Unfortunately, I don't have a test server with jpgraph (or any image extension support), so I can't test this myself. By looking at the attached patch, I have no reason to believe that actually changes anything, so I am quite hesitant to blindly commit that. If you're willing to explain what the difference is, I would appreciate it.

seiji

seiji

2007-11-01 09:55

reporter   ~0016052

Last edited: 2007-11-01 10:04

Hi jreese, I'm sorry for the insufficient explanation and my poor English.

  1. If $t_token is not null, use graph_total_metrics(). it has been deleted in the follows.
  • $t_metrics = $t_token != null ? unserialize( $t_token ) : create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
  • if ( $t_token == null ) {
  • $t_metrics = create_bug_enum_summary( lang_get( 'severity_enum_string' ), 'severity' );
  • } else {
  • $t_metrics = graph_total_metrics( unserialize( $t_token ) );
  • }

    summary_graph_bypriority.php, summary_graph_bypriority_pct.php
    summary_graph_byresolution.php, summary_graph_byresolution_pct.php
    summary_graph_byseverity.php, summary_graph_byseverity_pct.php

  1. other files
    I don't think the ternary conditional expression(?:) is better. So I rewrote them.
    See http://www.mantisbt.org/guidelines.php (Coding Guideline Miscellaneous)

  2. token_delete
    If i don't delete old token, some graphs are not showed.

seiji

seiji

2007-11-11 14:52

reporter   ~0016162

Last edited: 2007-11-11 17:45

Is this fixed in 1.1.0rc3?

stefang

stefang

2007-11-12 05:39

reporter   ~0016169

Last edited: 2007-11-12 05:43

Seji,
I've applied your proposed changes to an installation of Mantis 1.1.0rc2 and now all the graphs are shown again correctly, so thanks for your efforts.

One question:
In all patches for the summary_graph_by***_mix.php files you changed the call to "create_bug_enum_summary" to "enum_bug_group".
Was this done intentionally?
What does this change?

seiji

seiji

2007-11-12 07:29

reporter   ~0016170

Hi Stefang,
"enum_bug_group" had been called before fixes in 0008344, So I changed it.
See http://mantisbt.svn.sourceforge.net/viewvc/mantisbt/branches/BRANCH_1_1_0/mantisbt/summary_graph_byseverity_mix.php?r1=3286&r2=4577

I found mistake at my patch.txt. ("create_bug_group" in "summary_graph_byresolution_mix.php" is not defined anywhere)

afjacky

afjacky

2007-11-12 07:29

reporter   ~0016171

Is this fixed?

stefang

stefang

2007-11-27 06:54

reporter   ~0016300

I can confirm that this is still NOT fixed in version 1.1.0rc3.
Without the patches I still get a lot of "not enough data" pictures.

Is there any obvious reason to not commit the already supplied patches to the code trunk?

jreese

jreese

2007-11-27 08:20

reporter   ~0016301

Time (or the lack of), as I'm in the middle of many other changes to Mantis, and my inability to really test this fix, as I don't have the ability to use jpgraph on my testing workstation. I will try to get this taken care of soon, as I agree it should be fixed before the official 1.1.0 release.

stefang

stefang

2007-11-27 08:40

reporter   ~0016302

OK, no problem.
Can you change the target version to 1.1.0 then, so it's not forgotten...

If you need any help to test sources before committing them, just let ne know.

jreese

jreese

2007-12-07 08:58

reporter   ~0016396

The patch has been checked in to both 1.1.0 and 1.2.0.

Related Changesets

MantisBT: master-1.1.x cb59f89c

2007-12-07 08:53

jreese


Details Diff
Fix 0008499: Graphs show 'Not enough data to create data'

Applying Seiji's patch as posted to 0008499.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/branches/BRANCH_1_1_0@4816 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0008499
mod - summary_graph_bypriority_mix.php Diff File
mod - summary_graph_byseverity.php Diff File
mod - summary_graph_bystatus.php Diff File
mod - summary_graph_byresolution.php Diff File
mod - summary_graph_byseverity_mix.php Diff File
mod - summary_graph_bypriority.php Diff File
mod - summary_graph_bypriority_pct.php Diff File
mod - summary_jpgraph_page.php Diff File
mod - summary_graph_byseverity_pct.php Diff File
mod - summary_graph_bystatus_pct.php Diff File
mod - summary_graph_byresolution_mix.php Diff File
mod - summary_graph_byresolution_pct.php Diff File
mod - summary_graph_bycategory.php Diff File
mod - summary_graph_bycategory_pct.php Diff File

MantisBT: master b8710db8

2007-12-07 08:56

jreese


Details Diff
Fix 0008499: Graphs show 'Not enough data to create data'
Applying Seiji's patch as posted to bug 8499.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4817 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0008499
mod - summary_graph_byseverity.php Diff File
mod - summary_graph_bystatus.php Diff File
mod - summary_graph_bycategory_pct.php Diff File
mod - summary_graph_byresolution.php Diff File
mod - summary_graph_bypriority.php Diff File
mod - summary_graph_bystatus_pct.php Diff File
mod - summary_graph_byseverity_pct.php Diff File
mod - summary_graph_byseverity_mix.php Diff File
mod - summary_graph_byresolution_pct.php Diff File
mod - summary_graph_bypriority_pct.php Diff File
mod - summary_graph_bycategory.php Diff File
mod - summary_graph_byresolution_mix.php Diff File
mod - summary_jpgraph_page.php Diff File
mod - summary_graph_bypriority_mix.php Diff File