View Issue Details

IDProjectCategoryView StatusLast Update
0006208mantisbtfeaturepublic2005-10-01 18:17
Reportersiebrand Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version1.0.0rc1 
Summary0006208: Condensed Word report
Description

After we started working with Mantis we also thought it was wise to track all 'non bug stuff' in Mantis to get rid of all sorts of lists that we were keeping everywhere and nowhere that were used in meetings, all with a different scope, but with overlapping issues. Using the standard output of print_all_bug_page_word.php was not really an option, because a lot of space on those reports was taken up by either non information or by empty space, making the output bloated.

Then I started hacking a bit in print_all_bug_page_word.php to make it more like we thought what a 'condensed report' should look like that we could use as a tailor made list in meetings, based on a saved filter. For that I've modified 2 files for which I've attached unified diffs based on the 1.0.0rc1 release files. If others think it to be a nice idea to add an 'condensed report' to export issues, it might be nice to add it to the main product.

Additional Information

Clarification of attachments:

  • original.jpg : screenprint of original template
  • alternative.jpg : screenprint of new template
  • print_all_bug_page_word.php.diff: diff to make new report page (1.58)
  • print_all_bug_page.php.diff : diff to add new export option (1.83)
TagsNo tags attached.
Attached Files
print_all_bug_page.php.diff (773 bytes)   
--- print_all_bug_page.php.orig	Wed Aug 31 13:09:50 2005
+++ print_all_bug_page.php.new	Wed Aug 31 13:14:21 2005
@@ -128,7 +128,8 @@
 			array( 'print_all_bug_page_excel', 'excel', '', 'excelicon.gif', 'Excel 2000' ),
 			array( 'print_all_bug_page_excel', 'html', 'target="_blank"', 'ieicon.gif', 'Excel View' ),
 			array( 'print_all_bug_page_word', 'word', '', 'wordicon.gif', 'Word 2000' ),
-			array( 'print_all_bug_page_word', 'html', 'target="_blank"', 'ieicon.gif', 'Word View' ) );
+			array( 'print_all_bug_page_word', 'html', 'target="_blank"', 'ieicon.gif', 'Word View' ),
+			array( 'print_all_bug_page_rbi', 'word', '', 'word2icon.gif', 'Word 2000 RBI Meeting Template' ) );
 
 		foreach ( $t_icons as $t_icon ) {
 			echo '<a href="' . $t_icon[0] . '.php' .
print_all_bug_page.php.diff (773 bytes)   
print_all_bug_page_word.php.diff (11,916 bytes)   
--- print_all_bug_page_word.php	Wed Aug 31 13:05:44 2005
+++ print_all_bug_page_rbi.php	Wed Aug 31 16:15:08 2005
@@ -94,28 +94,14 @@
             $row = db_fetch_array( $result3 );
             extract( $row, EXTR_PREFIX_ALL, 'v2' );
 
-            $v_os 						= string_display( $v_os );
-            $v_os_build					= string_display( $v_os_build );
-            $v_platform					= string_display( $v_platform );
-            $v_version 					= string_display( $v_version );
             $v_summary 					= string_display_links( $v_summary );
             $v2_description 			= string_display_links( $v2_description );
             $v2_steps_to_reproduce 		= string_display_links( $v2_steps_to_reproduce );
             $v2_additional_information 	= string_display_links( $v2_additional_information );
             ### note that dates are converted to unix format in filter_get_bug_rows
+
 ?>
-<br />
-<table class="width100" cellspacing="1">
-<tr>
-	<td class="form-title" colspan="3">
-		<?php echo lang_get( 'viewing_bug_advanced_details_title' ) ?>
-	</td>
-</tr>
-<tr>
-	<td class="print-spacer" colspan="6">
-		<hr size="1" width="100%" />
-	</td>
-</tr>
+<table class="width100" cellspacing="1" border="1">
 <tr class="print-category">
 	<td class="print" width="16%">
 		<?php echo lang_get( 'id' ) ?>:
@@ -123,18 +109,15 @@
 	<td class="print" width="16%">
 		<?php echo lang_get( 'category' ) ?>:
 	</td>
-	<td class="print" width="16%">
-		<?php echo lang_get( 'severity' ) ?>:
+	<td class="print" width="32%" colspan="2">
+		<?php echo lang_get( 'summary' ) ?>:
 	</td>
 	<td class="print" width="16%">
-		<?php echo lang_get( 'reproducibility' ) ?>:
+		<?php echo lang_get( 'assigned_to' ) ?>:
 	</td>
 	<td class="print" width="16%">
 		<?php echo lang_get( 'date_submitted' ) ?>:
 	</td>
-	<td class="print" width="16%">
-		<?php echo lang_get( 'last_update' ) ?>:
-	</td>
 </tr>
 <tr class="print">
 	<td class="print">
@@ -143,135 +126,29 @@
 	<td class="print">
 		<?php echo "[$t_project_name] $v_category" ?>
 	</td>
-	<td class="print">
-		<?php echo get_enum_element( 'severity', $v_severity ) ?>
-	</td>
-	<td class="print">
-		<?php echo get_enum_element( 'reproducibility', $v_reproducibility ) ?>
-	</td>
-	<td class="print">
-		<?php print_date( config_get( 'normal_date_format' ), $v_date_submitted ) ?>
-	</td>
-	<td class="print">
-		<?php print_date( config_get( 'normal_date_format' ), $v_last_updated ) ?>
-	</td>
-</tr>
-<tr>
-	<td class="print-spacer" colspan="6">
-		<hr size="1" width="100%" />
-	</td>
-</tr>
-<tr class="print">
-	<td class="print-category">
-		<?php echo lang_get( 'reporter' ) ?>:
-	</td>
-	<td class="print">
-		<?php print_user_with_subject( $v_reporter_id, $v_id ) ?>
-	</td>
-	<td class="print-category">
-		<?php echo lang_get( 'platform' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo $v_platform ?>
-	</td>
-	<td class="print" colspan="2">&nbsp;</td>
-</tr>
-<tr class="print">
-	<td class="print-category">
-		<?php echo lang_get( 'assigned_to' ) ?>:
-	</td>
-	<td class="print">
-		<?php print_user_with_subject( $v_handler_id, $v_id ) ?>
-	</td>
-	<td class="print-category">
-		<?php echo lang_get( 'os' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo $v_os ?>
-	</td>
-	<td class="print" colspan="2">&nbsp;</td>
-</tr>
-<tr class="print">
-	<td class="print-category">
-		<?php echo lang_get( 'priority' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo get_enum_element( 'priority', $v_priority ) ?>
-	</td>
-	<td class="print-category">
-		<?php echo lang_get( 'os_version' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo $v_os_build ?>
-	</td>
-	<td class="print" colspan="2">&nbsp;</td>
-</tr>
-<tr class="print">
-	<td class="print-category">
-		<?php echo lang_get( 'status' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo get_enum_element( 'status', $v_status ) ?>
-	</td>
-	<td class="print-category">
-		<?php echo lang_get( 'product_version' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo $v_version ?>
-	</td>
-	<td class="print" colspan="2">&nbsp;</td>
-</tr>
-<tr class="print">
-	<td class="print-category">
-		<?php echo lang_get( 'product_build' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo $v_build?>
-	</td>
-	<td class="print-category">
-		<?php echo lang_get( 'resolution' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo get_enum_element( 'resolution', $v_resolution ) ?>
-	</td>
-	<td class="print" colspan="2">&nbsp;</td>
-</tr>
-<tr class="print">
-	<td class="print-category">
-		<?php echo lang_get( 'projection' ) ?>:
-	</td>
-	<td class="print">
-		<?php echo get_enum_element( 'projection', $v_projection ) ?>
-	</td>
-	<td class="print-category">
-		<?php
-			if ( !config_get( 'enable_relationship' ) ) {
-				echo lang_get( 'duplicate_id' );
-			} # MASC RELATIONSHIP
-		?>&nbsp;
+	<td class="print" colspan="2">
+		<?php echo $v_summary ?>
 	</td>
 	<td class="print">
 		<?php
-			if ( !config_get( 'enable_relationship' ) ) {
-				print_duplicate_id( $v_duplicate_id );
-			} # MASC RELATIONSHIP
-		?>&nbsp;
-	</td>
-	<td class="print" colspan="2">&nbsp;</td>
-</tr>
-<tr class="print">
-	<td class="print-category">
-		<?php echo lang_get( 'eta' ) ?>:
+			if ( access_has_bug_level( config_get( 'view_handler_threshold' ), $v_id ) ) {
+				print_user_with_subject( $v_handler_id, $v_id );
+			}
+		?>
 	</td>
 	<td class="print">
-		<?php echo get_enum_element( 'eta', $v_eta ) ?>
+		<?php print_date( config_get( 'normal_date_format' ), $v_date_submitted ) ?>
 	</td>
-	<td class="print" colspan="4">&nbsp;</td>
 </tr>
 <?php
 $t_related_custom_field_ids = custom_field_get_linked_ids( $v_project_id );
 foreach( $t_related_custom_field_ids as $t_id ) {
 	$t_def = custom_field_get_definition( $t_id );
+	$cust_temp = string_custom_field_value( $t_def, $t_id, $v_id );
+	if( empty($cust_temp) ) {
+?>
+<?php }
+	else { # print the line containing custom field
 ?>
 <tr class="print">
 	<td class="print-category">
@@ -282,21 +159,9 @@
 	</td>
 </tr>
 <?php
+}	// else
 }       // foreach
 ?>
-<tr>
-	<td class="print-spacer" colspan="6">
-		<hr size="1" width="100%" />
-	</td>
-</tr>
-<tr class="print">
-	<td class="print-category">
-		<?php echo lang_get( 'summary' ) ?>:
-	</td>
-	<td class="print" colspan="5">
-		<?php echo $v_summary ?>
-	</td>
-</tr>
 <tr class="print">
 	<td class="print-category">
 		<?php echo lang_get( 'description' ) ?>:
@@ -305,6 +170,12 @@
 		<?php echo $v2_description ?>
 	</td>
 </tr>
+<?php
+	# no steps_to_reproduce
+	if( empty($v2_steps_to_reproduce) ) {
+	?>
+	<?php }
+	else { # print steps_to_reproduce ?>
 <tr class="print">
 	<td class="print-category">
 		<?php echo lang_get( 'steps_to_reproduce' ) ?>:
@@ -313,6 +184,13 @@
 		<?php echo $v2_steps_to_reproduce ?>
 	</td>
 </tr>
+	<?php } # end else 
+
+	# no additional_information
+	if( empty($v2_additional_information) ) {
+	?>
+	<?php }
+	else { # print v2_additional_information ?>
 <tr class="print">
 	<td class="print-category">
 		<?php echo lang_get( 'additional_information' ) ?>:
@@ -321,6 +199,7 @@
 		<?php echo $v2_additional_information ?>
 	</td>
 </tr>
+	<?php } # end else ?>
 <?php
 	# account profile description
 	if ( $v_profile_id > 0 ) {
@@ -347,18 +226,26 @@
 <?php
 	} # profile description
 ?>
+<?php
+        $t_bug_file_table = config_get( 'mantis_bug_file_table' );
+		$query5 = "SELECT filename, filesize, date_added
+				FROM $t_bug_file_table
+				WHERE bug_id='$v_id'";
+		$result5 = db_query( $query5 );
+		$num_files = db_num_rows( $result5 );
+?>
+<?php
+	if( $num_files == 0 ) {
+?>
+<?php	}
+	else { # show attached files
+?>
 <tr class="print">
 	<td class="print-category">
 		<?php echo lang_get( 'attached_files' ) ?>:
 	</td>
 	<td class="print" colspan="5">
 		<?php
-	        $t_bug_file_table = config_get( 'mantis_bug_file_table' );
-			$query5 = "SELECT filename, filesize, date_added
-					FROM $t_bug_file_table
-					WHERE bug_id='$v_id'";
-			$result5 = db_query( $query5 );
-			$num_files = db_num_rows( $result5 );
 			for ( $i=0;$i<$num_files;$i++ ) {
 				$row = db_fetch_array( $result5 );
 				extract( $row, EXTR_PREFIX_ALL, 'v2' );
@@ -367,9 +254,9 @@
 				$v2_date_added = date( config_get( 'normal_date_format' ), db_unixtimestamp( $v2_date_added ) );
 
 				switch ( $g_file_upload_method ) {
-					case DISK:	PRINT "$v2_filename ($v2_filesize KB) <span class=\"italic\">$v2_date_added</span>";
+					case DISK:	PRINT "$v2_filename ($v2_filesize KB) $v2_date_added";
 							break;
-					case DATABASE:	PRINT "$v2_filename ($v2_filesize KB) <span class=\"italic\">$v2_date_added</span>";
+					case DATABASE:	PRINT "$v2_filename ($v2_filesize KB) $v2_date_added";
 							break;
 				}
 
@@ -381,6 +268,9 @@
 	</td>
 </tr>
 <?php
+	} # end else
+?>
+<?php
 	# get the bugnote data
  	if ( !access_has_bug_level( config_get( 'private_bugnote_threshold' ), $v_id ) ) {
  		$t_restriction = 'AND view_state=' . VS_PUBLIC;
@@ -399,26 +289,13 @@
 	$result6 = db_query( $query6 );
 	$num_notes = db_num_rows( $result6 );
 ?>
-
-<?php # Bugnotes BEGIN ?>
-<br />
-<table class="width100" cellspacing="1">
-<?php
+<?php # Bugnotes BEGIN
 	# no bugnotes
 	if ( 0 == $num_notes ) {
 	?>
-<tr>
-	<td class="print" colspan="2">
-		<?php echo lang_get( 'no_bugnotes_msg' ) ?>
-	</td>
-</tr>
 	<?php }
 		else { # print bugnotes ?>
-<tr>
-	<td class="form-title" colspan="2">
-			<?php echo lang_get( 'bug_notes_title' ) ?>
-	</td>
-</tr>
+<tr class="print">
 	<?php
 		for ( $k=0; $k < $num_notes; $k++ ) {
 			# prefix all bugnote data with v3_
@@ -437,55 +314,32 @@
 
 			$v3_note = string_display_links( $v3_note );
 	?>
-<tr>
-	<td class="print-spacer" colspan="2">
-		<hr size="1" width="100%" />
+	<td class="print" width="16%">
+		<?php print_user( $v3_reporter_id ) ?>
 	</td>
-</tr>
-<tr>
-	<td class="nopad" valign="top" width="20%">
-		<table class="hide" cellspacing="1">
-		<tr>
-			<td class="print">
-				(<?php echo bugnote_format_id( $v3_id ) ?>)
-			</td>
-		</tr>
-		<tr>
-			<td class="print">
-				<?php print_user( $v3_reporter_id ) ?>&nbsp;&nbsp;&nbsp;
-			</td>
-		</tr>
-		<tr>
-			<td class="print">
-				<?php echo $v3_date_submitted ?>&nbsp;&nbsp;&nbsp;
-				<?php if ( db_unixtimestamp( $v3_date_submitted ) != db_unixtimestamp( $v3_last_modified ) ) {
-					echo '<br />(' . lang_get( 'edited_on').' '. $v3_last_modified . ')';
-				} ?>
-			</td>
-		</tr>
-		</table>
-	</td>
-	<td class="nopad" valign="top" width="85%">
-		<table class="hide" cellspacing="1">
-		<tr>
-			<td class="print">
-				<?php
-					switch ( $v3_note_type ) {
-						case REMINDER:
-							echo lang_get( 'reminder_sent_to' ) . ': ';
-							$v3_note_attr = substr( $v3_note_attr, 1, strlen( $v3_note_attr ) - 2 );
-							$t_to = array();
-							foreach ( explode( '|', $v3_note_attr ) as $t_recipient ) {
-								$t_to[] = prepare_user_name( $t_recipient );
-							}
-							echo implode( ', ', $t_to ) . '<br />';
-						default:
-							echo $v3_note;
+	<td class="print" colspan="5" rowspan="2" valign="top">
+		<?php
+			switch ( $v3_note_type ) {
+				case REMINDER:
+					echo lang_get( 'reminder_sent_to' ) . ': ';
+					$v3_note_attr = substr( $v3_note_attr, 1, strlen( $v3_note_attr ) - 2 );
+					$t_to = array();
+					foreach ( explode( '|', $v3_note_attr ) as $t_recipient ) {
+						$t_to[] = prepare_user_name( $t_recipient );
 					}
-				?>
-			</td>
-		</tr>
-		</table>
+					echo implode( ', ', $t_to ) . '<br />';
+				default:
+					echo $v3_note;
+			}
+		?>
+	</td>
+</tr>
+<tr class="print">
+	<td class="print">
+		<?php echo $v3_date_submitted ?>
+		<?php if ( db_unixtimestamp( $v3_date_submitted ) != db_unixtimestamp( $v3_last_modified ) ) {
+			echo '<br />(' . lang_get( 'edited_on').' '. $v3_last_modified . ')';
+		} ?>
 	</td>
 </tr>
 <?php
@@ -493,13 +347,11 @@
 	} # end else
 ?>
 
-</table>
 <?php # Bugnotes END ?>
 </table>
 
 
 <?php
-echo '<br /><br />';
 		} # end in_array
 }  # end main loop
 ?>
alternative.jpg (62,801 bytes)   
alternative.jpg (62,801 bytes)   
original.jpg (90,979 bytes)   
original.jpg (90,979 bytes)   

Activities