View Issue Details

IDProjectCategoryView StatusLast Update
0007205mantisbtfilterspublic2013-04-17 17:42
Reportermbelley Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.0.1 
Summary0007205: Filter change in view issues
Description

When i'm looking issue from query "Reported by me" and i want to order by ID, the filter is reset.

Seem's to be a trouble in View Issues Page.

Additional Information
  1. In "My View" click on "Reported by me"
  2. Now you are in "View Issue" page
  3. If you want to order by ID the query is different from filter.
TagsNo tags attached.
Attached Files
7205.patch (1,606 bytes)   
Index: core/print_api.php
===================================================================
--- core/print_api.php	(revision 5752)
+++ core/print_api.php	(working copy)
@@ -1438,8 +1438,17 @@
 			# Otherwise always start with ASCending
 			$t_dir = 'ASC';
 		}
-
-		echo '<a href="view_all_set.php?sort=' . $p_sort_field . '&amp;dir=' . $p_dir . '&amp;type=2">' . $p_string . '</a>';
+		//EC RH http://www.mantisbt.org/bugs/view.php?id=7205#c20643
+		if($_SESSION['reporter_filter'] == 'ON')
+		{
+			$r_id=auth_get_current_user_id();
+			echo '<a href="view_all_set.php?temporary=y&amp;&reporter_id=' . $r_id . '&amp;sort=' . $p_sort_field . '&amp;dir=' . $p_dir . '&amp;type=2">' . $p_string .'</a>';
+		}
+		else 
+		{
+			echo '<a href="view_all_set.php?sort=' . $p_sort_field . '&amp;dir=' . $p_dir . '&amp;type=2">' . $p_string .'</a>';
+		}
+		//EC RH end
 	}
 	else {
 		echo $p_string;
Index: view_all_set.php
===================================================================
--- view_all_set.php	(revision 5752)
+++ view_all_set.php	(working copy)
@@ -24,6 +24,7 @@
 	 /**
 	  * Mantis Core API's
 	  */
+
 	require_once( 'core.php' );
 
 	auth_ensure_user_authenticated();
@@ -32,6 +33,9 @@
 	$f_source_query_id		= gpc_get_int( 'source_query_id', -1 );
 	$f_print				= gpc_get_bool( 'print' );
 	$f_temp_filter			= gpc_get_bool( 'temporary' );
+	//EC RH http://www.mantisbt.org/bugs/view.php?id=7205#c20643
+		if($f_temp_filter == 1){$_SESSION['reporter_filter'] = 'ON';}else{$_SESSION['reporter_filter'] = 'OFF';}
+	//EC RH end
 
 	# validate filter type
 	$f_default_view_type = 'simple';
7205.patch (1,606 bytes)   

Relationships

duplicate of 0011601 closedatrol Temporary filters cannot be sorted 
related to 0007735 closedvboctor Filters are lost when clicking on page navigation 

Activities

ecaplan

ecaplan

2006-06-19 10:41

reporter   ~0012987

Last edited: 2007-10-17 03:52

Is this a variation of this issue: 0006491

mbelley

mbelley

2006-06-19 13:28

reporter   ~0012992

Yes it look like this issue. But, my filter is not a saved filter this is a filter from "My View" page.

langis

langis

2007-01-24 12:59

reporter   ~0013958

I believe it is more like the bug 0007735 which reports that the filter persistence is attached to the filters set in the view_issues page and not a filter coming from a my_view page. It seems that if you click on a link for a group of the my_vie pages, it shows you the view_issues page but the filter is immediately switched back to the view_issues page previous filter. From the resulting page, let say that 10 of 50 issues matching the filter is shown, to view the next page or re-sort the page, the page is resorted or the link is established using the view_issues page previous filter. Therefore you cannot massage the data you have just filtered from the my_view page.

This relates to the persistence of the view_issue page filter, it should not be retained once a new filter is applied no matter how.

daryn

daryn

2008-04-25 11:29

reporter   ~0017699

Sorry about that. This is related to but not a duplicate of 7735. The order by is still broken.

daryn

daryn

2008-04-25 11:30

reporter   ~0017700

I'm working on the filter api anyway. I'll look at this one also.

daryn

daryn

2008-09-25 10:57

reporter   ~0019457

This is a mess. The column header links are built by a custom function which calls another function to print the view bug sort link. Some of the values needed are global others are passed in. The link is missing the filter id so it can't find the correct filter once you click on any of the sort links. Will take some more time to figure out a resolution.

rhurtik

rhurtik

2009-01-16 12:29

reporter   ~0020643

It is not only sorting by ID. All of links reset the filter.

I've had look on view_all_set.php. The temporary variable shows up for the first time in gpc_get_bool( 'temporary' ) and disappear when you use the sorting or any other link from the page.

The sorting url works fine as soon as you add the get variable : temporary=y&reporter_id=userId .
The solution would be to store the gpc_get_bool( 'temporary' ) as global and use it as switch to rewrite the url in the “function print_view_bug_sort_link ” => print_api.php line 1405 .

rhurtik

rhurtik

2009-01-20 12:12

reporter   ~0020664

Hi guys the fix is attached as 7205.patch.
Let me know if it suits you.
Regards
Roman.