View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0008734 | mantisbt | filters | public | 2008-01-10 11:27 | 2009-11-19 13:29 |
| Reporter | ebenius | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 1.1.0 | ||||
| Summary | 0008734: Advanced project filter "All Projects" does not match issues in sub projects | ||||
| Description | If "All Projects" is selected in Advanced Filters / Projects, Mantis does not find all issues. The selection of "[current]" (having "All projects" selected on top of the page) works fine. | ||||
| Steps To Reproduce | Environment: You need 3 projects: Project A (1 issue) 1) Select "All Projects" (upper right corner of the page), click "View Issues", reset the filters, select "Advanced Filters": Currently finds 3 Issues 2) Click on "Project" in the filter panel. Select (by multi selection) each project (means: all entries in the list, except "[current]" and "All Projects"), click on "Apply Filter": Currently finds 3 issue 3) Click on "Project" in the filter panel. Select "All Projects" only, click on "Apply Filter": Currently finds 1 issue 4) Click on "Project" in the filter panel. Repeat the selection from 2) plus "All Projects", click on "Apply Filter": Still finds 1 issue, only 5) Click on "Project" in the filter panel. Select (by multi selection) all sub projects (all levels) click on "Apply Filter": Finds 2 issues, which is the difference between results from 1) & 2) and 3) & 4) | ||||
| Tags | No tags attached. | ||||
| Attached Files | issue_8734.patch (931 bytes)
From a217c342993c1d30d70fbe9e7e349e7acc7e6336 Mon Sep 17 00:00:00 2001 From: Chris Fitch <cfitch@redcom.com> Date: Thu, 19 Nov 2009 13:19:30 -0500 Subject: [PATCH] Make all projects filter include subprojects diff --git a/core/filter_api.php b/core/filter_api.php index 771b079..36a2421 100644 --- a/core/filter_api.php +++ b/core/filter_api.php @@ -1107,7 +1107,7 @@ function filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p $t_project_ids = array_map( 'db_prepare_int', $t_filter[FILTER_PROPERTY_PROJECT_ID] ); } - $t_include_sub_projects = (( count( $t_project_ids ) == 1 ) && ( $t_project_ids[0] == META_FILTER_CURRENT ) ); + $t_include_sub_projects = ( ( ( count( $t_project_ids ) == 1 ) && ( $t_project_ids[0] == META_FILTER_CURRENT ) ) || in_array( ALL_PROJECTS, $t_project_ids ) ); } log_event( LOG_FILTERING, 'project_ids = @P' . implode( ', @P', $t_project_ids ) ); -- 1.6.0.4 | ||||