View Issue Details

IDProjectCategoryView StatusLast Update
0012286mantisbtfilterspublic2010-12-17 04:40
Reporterdjuntgen Assigned Todhx  
PriorityhighSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.2 
Target Version1.2.4Fixed in Version1.2.4 
Summary0012286: When advanced filter "Project" is set to "All Projects", sub projects are excluded
Description

When advanced filter "Project" is set to "All Projects" sub projects are excluded.

The problem, I believe, is within the filter_api.php line 1110.

Patch:


1110c1110
< $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 ) || ( $t_project_ids[0] == ALL_PROJECTS ) ) );

If $t_proejct_ids[0] == ALL_PROJECTS, then include subprojects.

Steps To Reproduce

1) Create a project called "Parent"
2) Create another project call "Child"
3) Make "Child" a sub project of "Parent"
4) Add an issue to the "Child" project
5) Create a filter in Advanced View
5.1) Select "All Projects" for the "Project" filter
6) Save

Additional Information

Log without fix:


2010-08-23 12:39 EDT filtering START NEW FILTER QUERY
2010-08-23 12:39 EDT filtering Advanced Filter
2010-08-23 12:39 EDT filtering project_ids = @P0
2010-08-23 12:39 EDT filtering include sub-projects = 0
2010-08-23 12:39 EDT filtering all projects selected
2010-08-23 12:39 EDT filtering project_ids after including sub-projects = @P20, @P21, @P6, @P18, @P22, @P7
2010-08-23 12:39 EDT filtering project_ids (with public/private access) = @P20, @P21, @P6, @P18, @P22, @P7
2010-08-23 12:39 EDT filtering project_ids (with public access) = @P
2010-08-23 12:39 EDT filtering project query = ( mantis_bug_table.project_id in (20, 21, 6, 18, 22, 7) )
2010-08-23 12:39 EDT filtering no view_state query
2010-08-23 12:39 EDT filtering no reporter query
2010-08-23 12:39 EDT filtering handler query = ( mantis_bug_table.handler_id in (23, 18, 9) )

Log with fix, noticed sub-projects is = 1.


2010-08-23 12:40 EDT filtering START NEW FILTER QUERY
2010-08-23 12:40 EDT filtering Advanced Filter
2010-08-23 12:40 EDT filtering project_ids = @P0
2010-08-23 12:40 EDT filtering include sub-projects = 1
2010-08-23 12:40 EDT filtering all projects selected
2010-08-23 12:40 EDT filtering Getting sub-projects for project id @P20
2010-08-23 12:40 EDT filtering Getting sub-projects for project id @P21
2010-08-23 12:40 EDT filtering Getting sub-projects for project id @P6
2010-08-23 12:40 EDT filtering Getting sub-projects for project id @P18
2010-08-23 12:40 EDT filtering Getting sub-projects for project id @P22
2010-08-23 12:40 EDT filtering Getting sub-projects for project id @P7
2010-08-23 12:40 EDT filtering project_ids after including sub-projects = @P20, @P21, @P6, @P18, @P22, @P7, @P15, @P16, @P11, @P4, @P23, @P24, @P9, @P8
2010-08-23 12:40 EDT filtering project_ids (with public/private access) = @P20, @P21, @P6, @P18, @P22, @P7, @P15, @P16, @P11, @P4, @P23, @P24, @P9, @P8
2010-08-23 12:40 EDT filtering project_ids (with public access) = @P
2010-08-23 12:40 EDT filtering project query = ( mantis_bug_table.project_id in (20, 21, 6, 18, 22, 7, 15, 16, 11, 4, 23, 24, 9, 8) )
2010-08-23 12:40 EDT filtering no view_state query
2010-08-23 12:40 EDT filtering no reporter query
2010-08-23 12:40 EDT filtering handler query = ( mantis_bug_table.handler_id in (23, 18, 9) )

Tagspatch

Activities

dhx

dhx

2010-09-18 00:29

reporter   ~0026763

Thanks David for a great bug report. I've committed your patch ready for the next release.

Related Changesets

MantisBT: master c4d7ca49

2010-09-18 00:24

djuntgen

Committer: dhx


Details Diff
Fix 0012286: Sub projects not included in advanced filter ALL PROJECTS

When advanced filter "Project" is set to "All Projects" sub projects are
excluded from the results returned by the filter. These sub projects
should be included.

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0012286
mod - core/filter_api.php Diff File

MantisBT: master-1.2.x d1a79720

2010-09-18 00:24

djuntgen

Committer: dhx


Details Diff
Fix 0012286: Sub projects not included in advanced filter ALL PROJECTS

When advanced filter "Project" is set to "All Projects" sub projects are
excluded from the results returned by the filter. These sub projects
should be included.

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0012286
mod - core/filter_api.php Diff File