View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006497 | mantisbt | filters | public | 2005-12-14 10:28 | 2014-12-08 00:34 |
Reporter | amit | Assigned To | daryn | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.0.0rc4 | ||||
Target Version | 1.3.0-beta.1 | Fixed in Version | 1.3.0-beta.1 | ||
Summary | 0006497: Setting view_filters to ADVANCED_ONLY or SIMPLE_ONLY only takes into effect after changing a filter | ||||
Description |
| ||||
Tags | No tags attached. | ||||
Attached Files | 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; 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; | ||||
related to | 0015721 | closed | grangeway | Functionality to consider porting to master-2.0.x |
has duplicate | 0016429 | closed | dregad | By using "Advanced Filters" as default filter in config_inc.php the field "Hide Status" is shown anyway. |
related to | 0011007 | closed | cproensa | After setting $g_view_filters = ADVANCED_ONLY in config_inc.php can still end up in simple filter mode. |
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. |
|
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. |
|
Attached fix “6497.patch” modify advanced filter as mentioned in note 19019. Regards |
|
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? |
|
Attached fix patch6497_1.patch hide the “hide status field” status and everything above it. |
|
Daryn, do you have a fix for this? Is there a reason to consider this blocking for 1.2.x release? |
|
I don't believe this resolves 0011007. This simply checks the status and hide status fields and tries to reconcile any differences. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|