View Issue Details

IDProjectCategoryView StatusLast Update
0006497mantisbtfilterspublic2014-12-08 00:34
ReporteramitAssigned Todaryn 
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.0rc4 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0006497: Setting view_filters to ADVANCED_ONLY or SIMPLE_ONLY only takes into effect after changing a filter
Description
  1. I have a project with 345 open issues.
  2. I choose to view them all (by clicking on the "View Issues" toll bar option.
  3. I can see only the first 50 (because the default number of Issues to show per page is currently set to 50).
  4. I click on the "Show" filter and change the number of issues to view to be 500.
  5. ASA I click the "Apply Filter" button the page is refreshed but...
    Now the "Hide Status" Filter suddenly disappears and my page now include ALL issues (even the ones in the "Closed" status".
  6. ASA I choose to Reset the filter the page is refreshed again and I can see the Hide Status filter again.
TagsNo tags attached.

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
has duplicate 0016429 closeddregad By using "Advanced Filters" as default filter in config_inc.php the field "Hide Status" is shown anyway. 
related to 0011007 closedcproensa After setting $g_view_filters = ADVANCED_ONLY in config_inc.php can still end up in simple filter mode. 

Activities

vboctor

vboctor

2007-07-08 19:42

manager   ~0014903

Lets see if this is still reproducible on 1.1.0a4 when released. I've implemented several filter related fixes. This bug tracker is also running on the code with the fixes, so if it can be validates here, then great.

daryn

daryn

2008-08-04 10:28

reporter   ~0019019

I'm going to take this since i'm working on filter api. The hide status field is not available in the advanced filter. My suggestion is to modify the advanced filter so that for the current filter the show_status field defaults to have all the status' selected except the ones in the hide status field.

rhurtik

rhurtik

2009-04-09 06:48

reporter   ~0021451

Attached fix “6497.patch” modify advanced filter as mentioned in note 19019.
It activates all fields in “Status filter” and exclude the one which was selected in “Hide status”.
Conditional statement trigger “Status filter” overriding only in the case a field in “Hide status” has been selected.

Regards
Roman

2009-04-09 06:48

 

6497.patch (721 bytes)
--- view_all_set.php.old	2009-04-09 11:41:00.000000000 +0100
+++ view_all_set.php	2009-04-09 11:38:50.000000000 +0100
@@ -518,6 +518,17 @@
 
 	$tc_setting_arr = filter_ensure_valid_filter( $t_setting_arr );
 
+	//RH@EC
+	if($f_view_type == "advanced"){
+		if($tc_setting_arr['hide_status'][0] > 0)
+		{
+			$t_statuses = MantisEnum::getValues( config_get( 'status_enum_string' ) );
+			$i_to_del = array_search($tc_setting_arr['hide_status'][0],$t_statuses);
+			$tc_setting_arr['show_status'] = $t_statuses;
+			unset($tc_setting_arr['show_status'][$i_to_del]);
+		}
+	}
+	//RH@EC end of
 	$t_settings_serialized = serialize( $tc_setting_arr );
 	$t_settings_string = $t_cookie_version . '#' . $t_settings_serialized;
 
6497.patch (721 bytes)
daryn

daryn

2009-04-10 17:14

reporter   ~0021469

This is still an issue in current trunk and the attached patch doesn't resolve the issue. The hide status field hides the selected status and everything above it. The patch only hides the selected status. This brings up another possible issue. If a person has multi-select on the advanced filter and one or more of the selected status' is also a hidden status...which takes precedence?

rhurtik

rhurtik

2009-04-14 09:44

reporter   ~0021518

Attached fix patch6497_1.patch hide the “hide status field” status and everything above it.
If two identical fields are selected the “show status” will be chosen while the “hide status” will be unset.

2009-04-14 09:45

 

patch6497_1.patch (1,072 bytes)
--- mantisbt-diff/view_all_set.php	2009-04-03 09:03:50.000000000 +0100
+++ mantisbt/view_all_set.php	2009-04-14 14:34:37.000000000 +0100
@@ -518,6 +518,31 @@
 
 	$tc_setting_arr = filter_ensure_valid_filter( $t_setting_arr );
 
+	//RH@EC http://www.mantisbt.org/bugs/view.php?id=6497
+	if($f_view_type == "advanced"){
+		if($tc_setting_arr['hide_status'][0] > 0)
+		{
+			$t_statuses = MantisEnum::getValues( config_get( 'status_enum_string' ) );
+			foreach($t_statuses as $k=>$v){
+				if($v < $tc_setting_arr['hide_status'][0])
+					{
+						$a_chunk[$k] = $v;
+					}
+				}
+			$tc_setting_arr['show_status'] = $a_chunk;
+		}
+	}
+	if($f_view_type == "simple" and $tc_setting_arr['hide_status'][0] > 0)
+	{
+		foreach($tc_setting_arr['show_status'] as $k => $v)
+		{
+			if($tc_setting_arr['show_status'][$k] == $tc_setting_arr['hide_status'][0])
+			{
+				unset($tc_setting_arr['hide_status'][0]); 	
+			}
+		}
+	}
+	//RH@EC end of
 	$t_settings_serialized = serialize( $tc_setting_arr );
 	$t_settings_string = $t_cookie_version . '#' . $t_settings_serialized;
 
patch6497_1.patch (1,072 bytes)
vboctor

vboctor

2009-05-20 03:04

manager   ~0021858

Daryn, do you have a fix for this? Is there a reason to consider this blocking for 1.2.x release?

daryn

daryn

2010-05-11 13:37

reporter   ~0025474

I don't believe this resolves 0011007. This simply checks the status and hide status fields and tries to reconcile any differences.

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036482

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master 731eaf04

2010-05-11 17:33:53

daryn

Details Diff
Fix 0006497 Patch contributed by Roman Hurtik. Modified for formatting and
conflict with trunk changes.
mod - view_all_set.php Diff File

Issue History

Date Modified Username Field Change
2005-12-14 10:28 amit New Issue
2005-12-14 12:03 jlatour Status new => confirmed
2005-12-14 12:03 jlatour Summary "Hide Status" filter disappears when I change the number of issues I would like to view using the "Show" filter. => Setting view_filters to ADVANCED_ONLY or SIMPLE_ONLY only takes into effect after changing a filter
2005-12-14 12:07 jlatour Relationship added child of 0005410
2007-07-08 19:40 vboctor Relationship deleted child of 0005410
2007-07-08 19:42 vboctor Note Added: 0014903
2007-07-08 19:42 vboctor Status confirmed => feedback
2007-07-08 19:42 vboctor Target Version => 1.2.0
2008-07-12 18:19 giallu Target Version => 1.2.0
2008-08-04 09:25 daryn Status feedback => assigned
2008-08-04 09:25 daryn Assigned To => daryn
2008-08-04 10:28 daryn Note Added: 0019019
2009-04-09 06:48 rhurtik Note Added: 0021451
2009-04-09 06:48 rhurtik File Added: 6497.patch
2009-04-10 17:14 daryn Note Added: 0021469
2009-04-10 17:14 daryn Status assigned => feedback
2009-04-14 09:44 rhurtik Note Added: 0021518
2009-04-14 09:45 rhurtik File Added: patch6497_1.patch
2009-05-20 03:04 vboctor Note Added: 0021858
2009-05-20 03:12 vboctor Target Version 1.2.2 => 1.x.x
2009-10-07 04:07 vboctor Relationship added related to 0011007
2010-05-11 13:34 daryn Changeset attached => MantisBT master 731eaf04
2010-05-11 13:34 daryn Resolution open => fixed
2010-05-11 13:34 daryn Fixed in Version => 1.3.0-beta.1
2010-05-11 13:37 daryn Note Added: 0025474
2010-05-11 13:37 daryn Status feedback => resolved
2010-09-19 03:12 dhx Status resolved => closed
2013-04-05 17:57 grangeway Status closed => acknowledged
2013-04-05 17:57 grangeway Note Added: 0036482
2013-04-05 18:07 grangeway Relationship added related to 0015721
2013-04-06 03:44 dregad Status acknowledged => resolved
2013-04-06 07:20 grangeway Status resolved => acknowledged
2013-04-06 09:26 dregad Tag Attached: 2.0.x check
2013-04-06 09:26 dregad Status acknowledged => resolved
2013-10-01 03:26 dregad Relationship added has duplicate 0016429
2014-09-23 18:05 grangeway Tag Detached: 2.0.x check
2014-12-08 00:34 vboctor Status resolved => closed