View Issue Details

IDProjectCategoryView StatusLast Update
0008032mantisbtfilterspublic2017-04-28 04:12
ReporterEgbert Assigned Tocproensa  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.1.0a3 
Summary0008032: Wrong selection upon Print reports and CSV export
Description

By selecting a hyperlink, e.g. Resolved, from the My view page, the corresponding bug list is shown at the View Issues page, with corresponding filter settings filled in. So far so good.

But, when I select Print Reports or CSV export, a problem occurs: not the correct list is being printed/exported, but the list belonging to previously chosen filter settings.

The same goes for making selections via the Summary page (by selecting hyperlinked figures).

This is really annoying (appearing with wrong bug lists in bug meetings).

Steps To Reproduce
  1. Go to My view
  2. Select Resolved -> correct list is opened in View Issues page
  3. Select Print Reports -> wrong list being displayed
Tagspatch
Attached Files
patch_20071208.txt (2,661 bytes)   
Index: view_all_inc.php
===================================================================
--- view_all_inc.php	(revision 156)
+++ view_all_inc.php	(working copy)
@@ -38,6 +38,8 @@
 		list( $t_dir, ) = split( ',', $t_filter['dir'] );
 	}
 	
+	$f_filter = gpc_get_int( 'filter', 0 );
+	
 	$t_checkboxes_exist = false;
 
 	$t_icon_path = config_get( 'icon_path' );
@@ -103,21 +105,20 @@
 
 		<span class="small"> <?php
 				# -- Print and Export links --
-
-				print_bracket_link( 'print_all_bug_page.php', lang_get( 'print_all_bug_page_link' ) );
+				$t_query_string = ( $f_filter !== 0 ) ? '?filter=' . $f_filter : '';
+				print_bracket_link( 'print_all_bug_page.php' . $t_query_string, lang_get( 'print_all_bug_page_link' ) );
 				echo '&nbsp;';
 				if ( ON == config_get( 'use_jpgraph' ) ) {
-				    print_bracket_link( 'bug_graph_page.php', lang_get( 'graph_bug_page_link' ) );
+				    print_bracket_link( 'bug_graph_page.php' . $t_query_string, lang_get( 'graph_bug_page_link' ) );
 				    echo '&nbsp;';
 				}
-				print_bracket_link( 'csv_export.php', lang_get( 'csv_export' ) );
+				print_bracket_link( 'csv_export.php' . $t_query_string, lang_get( 'csv_export' ) );
 		?> </span>
 	</td>
 
 	<td class="right" colspan="2">
 		<span class="small"> <?php
 			# -- Page number links --
-			$f_filter	= gpc_get_int( 'filter', 0);
 			print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
 		?> </span>
 	</td>
Index: print_all_bug_page.php
===================================================================
--- print_all_bug_page.php	(revision 156)
+++ print_all_bug_page.php	(working copy)
@@ -44,6 +44,7 @@
 
 	$f_search		= gpc_get_string( 'search', false ); # @@@ need a better default
 	$f_offset		= gpc_get_int( 'offset', 0 );
+	$f_filter		= gpc_get_int( 'filter', 0 );
 
 	$t_cookie_value_id = gpc_get_cookie( config_get( 'view_all_cookie' ), '' );
 	$t_cookie_value = filter_db_get_filter( $t_cookie_value_id );
@@ -142,6 +143,7 @@
 			array( 'print_all_bug_page_word', 'word', '', 'fileicons/doc.gif', 'Word 2000' ),
 			array( 'print_all_bug_page_word', 'html', 'target="_blank"', 'ie.gif', 'Word View' ) );
 
+		$t_query_string = ( $f_filter !== 0 ) ? "&amp;filter=" . $f_filter : '';
 		foreach ( $t_icons as $t_icon ) {
 			echo '<a href="' . $t_icon[0] . '.php' .
 				"?search=$t_search" .
@@ -150,6 +152,7 @@
 				'&amp;type_page=' . $t_icon[1] .
 				"&amp;export=$f_export" .
 				"&amp;show_flag=$t_show_flag" .
+				$t_query_string .
 				'" ' . $t_icon[2] . '>' .
 				'<img src="' . $t_icon_path . $t_icon[3] . '" border="0" align="absmiddle" alt="' . $t_icon[4] . '" /></a> ';
 		}
patch_20071208.txt (2,661 bytes)   

Relationships

duplicate of 0008204 closedcproensa Filters not remembered when clicking through from "My View" 
has duplicate 0008045 closedgrangeway Temporary filters are not applied to printing page 
has duplicate 0013105 closedatrol Print bugs list from changelog_page 
has duplicate 0013088 closedatrol Clicking on "Print Reports" printing all issues 
has duplicate 0019622 closedatrol Only Resolved Issues getting exported, not the entire list of open, closed and resolved issues from Summary Page 

Activities

seiji

seiji

2007-12-08 02:52

reporter   ~0016403

I've attached patch.

atrol

atrol

2014-01-21 16:10

developer   ~0039120

Unassigned after having been assigned for a long time without progress.

cproensa

cproensa

2017-04-17 10:55

developer   ~0056601

Closed as duplicate of 0008204